interview-widget 3.0.4 → 3.0.5

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.
@@ -1,26 +1,18 @@
1
- (function(it,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],y):(it=typeof globalThis<"u"?globalThis:it||self,y(it.InterviewWidget={},it.React,it.ReactDOM))})(this,function(it,y,Zi){"use strict";var u7=Object.defineProperty;var o7=(it,y,Zi)=>y in it?u7(it,y,{enumerable:!0,configurable:!0,writable:!0,value:Zi}):it[y]=Zi;var Qt=(it,y,Zi)=>o7(it,typeof y!="symbol"?y+"":y,Zi);var qo=typeof document<"u"?document.currentScript:null,P2={exports:{}},_r={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Xw=Symbol.for("react.transitional.element"),Qw=Symbol.for("react.fragment");function $2(e,t,n){var i=null;if(n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:Xw,type:e,key:i,ref:t!==void 0?t:null,props:n}}_r.Fragment=Qw,_r.jsx=$2,_r.jsxs=$2,P2.exports=_r;var u=P2.exports;const Fo={},xn={api:{baseUrl:"/api",retryConfig:{attempts:3,backoff:"exponential",baseDelay:1e3}},ui:{baseColor:"#3B82F6",borderRadius:"8px"},interview:{allow_answer_editing:!0,timers:{thinkingDuration:30,answeringDuration:120,editingDuration:30},stt:{provider:"groq",model:"whisper-large-v3-turbo",language:"en"},tts:{provider:"piper"},proctoring:{enabled:!0,gazeAnalysisEnabled:!0}}},Yo="iw-storage";function Zw(){if(!(typeof{url:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:qo&&qo.tagName.toUpperCase()==="SCRIPT"&&qo.src||new URL("widget.umd.js",document.baseURI).href}<"u"&&(Fo!=null&&Fo.VITE_IW_SECRET)))return typeof process<"u"&&process.env.NEXT_PUBLIC_IW_SECRET?process.env.NEXT_PUBLIC_IW_SECRET:typeof window<"u"&&window.__IW_SECRET__?window.__IW_SECRET__:"proctoring-data-seed"}const e1=Zw(),Tr=30,Kw={SCREENSHOT:"screenshot"},Xo="AES-GCM",Qo=12;async function t1(e){const n=new TextEncoder().encode(e),i=await crypto.subtle.digest("SHA-256",n);return crypto.subtle.importKey("raw",i,Xo,!1,["encrypt","decrypt"])}function Iw(){return crypto.getRandomValues(new Uint8Array(Qo))}async function Jw(e,t="default-seed"){try{const n=typeof e=="string"?e:JSON.stringify(e),a=new TextEncoder().encode(n),l=await t1(t),s=Iw(),r=await crypto.subtle.encrypt({name:Xo,iv:s},l,a),o=new Uint8Array(s.length+r.byteLength);return o.set(new Uint8Array(s),0),o.set(new Uint8Array(r),s.length),btoa(String.fromCharCode(...Array.from(o)))}catch(n){throw console.error("Encryption failed:",n),new Error("Failed to encrypt data")}}async function Ww(e,t="default-seed"){try{const n=atob(e),i=new Uint8Array(n.length);for(let c=0;c<n.length;c++)i[c]=n.charCodeAt(c);const a=i.slice(0,Qo),l=i.slice(Qo),s=await t1(t),r=await crypto.subtle.decrypt({name:Xo,iv:a},s,l);return new TextDecoder().decode(r)}catch(n){throw console.error("Decryption failed:",n),new Error("Failed to decrypt data")}}async function Pw(e,t="default-seed"){return Jw(e,t)}async function $w(e,t="default-seed"){const n=await Ww(e,t);try{return JSON.parse(n)}catch{return n}}const Wl=y.createContext(null),e6=async()=>{try{const e=sessionStorage.getItem(Yo);if(e){const n=(await $w(e,e1)).state;return{logViolations:(n==null?void 0:n.logViolations)||[],totalViolations:(n==null?void 0:n.totalViolations)||0,gazeViolationCounters:(n==null?void 0:n.gazeViolationCounters)||{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:(n==null?void 0:n.referenceSet)??!1,referenceRef:(n==null?void 0:n.referenceRef)??{x:.5,y:.5,noseX:.5,noseY:.5}}}}catch(e){console.error("Failed to load proctoring data from session storage:",e)}return{logViolations:[],totalViolations:0,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:!1,referenceRef:{x:.5,y:.5,noseX:.5,noseY:.5}}},Pl=async e=>{try{const t=await Pw({state:e,version:0},e1);sessionStorage.setItem(Yo,t)}catch(t){console.error("Failed to save proctoring data to session storage:",t)}},t6=({children:e})=>{const t=y.useRef({logViolations:[],totalViolations:0,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:!1,referenceRef:{x:.5,y:.5,noseX:.5,noseY:.5}}),n=y.useRef(new Set);y.useEffect(()=>{e6().then(d=>{t.current=d,i()})},[]);const i=y.useCallback(()=>{n.current.forEach(d=>d())},[]),a=y.useCallback(d=>(n.current.add(d),()=>{n.current.delete(d)}),[]),l=y.useCallback(()=>t.current,[]),s=y.useCallback(d=>{t.current={...t.current,logViolations:[...t.current.logViolations,d],totalViolations:t.current.totalViolations+1},Pl(t.current),i()},[i]),r=y.useCallback(d=>{const m={...t.current.gazeViolationCounters};d==="looking_away"&&(m.lookingAwayCount+=1),d==="no_face_detected"&&(m.noFaceDetectedCount+=1),d==="multiple_faces"&&(m.multipleFacesCount+=1),m.totalGazeViolations=m.lookingAwayCount+m.noFaceDetectedCount+m.multipleFacesCount,t.current={...t.current,gazeViolationCounters:m},Pl(t.current),i()},[i]),o=y.useCallback(()=>{t.current={...t.current,logViolations:[],totalViolations:0},Pl(t.current),i()},[i]),c=y.useCallback(()=>{t.current={...t.current,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0}},Pl(t.current),i()},[i]),f=y.useCallback((d,m)=>{t.current={...t.current,referenceSet:d,referenceRef:m},Pl(t.current),i()},[i]),h=y.useMemo(()=>({getState:l,addViolation:s,clearViolations:o,subscribe:a,incrementGazeViolation:r,clearGazeViolationCounters:c,setReferenceData:f}),[l,s,o,a,r,c,f]);return u.jsx(Wl.Provider,{value:h,children:e})},n1=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useProctoringStore must be used within a ProctoringProvider");const t=y.useSyncExternalStore(e.subscribe,e.getState,e.getState);return{logViolations:t.logViolations,totalViolations:t.totalViolations,addViolation:e.addViolation,clearViolations:e.clearViolations,gazeViolationCounters:t.gazeViolationCounters,referenceSet:t.referenceSet,referenceRef:t.referenceRef,incrementGazeViolation:e.incrementGazeViolation,clearGazeViolationCounters:e.clearGazeViolationCounters,setReferenceData:e.setReferenceData}},n6=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useViolations must be used within a ProctoringProvider");return y.useSyncExternalStore(e.subscribe,()=>e.getState().logViolations,()=>e.getState().logViolations)},i6=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useTotalViolations must be used within a ProctoringProvider");return y.useSyncExternalStore(e.subscribe,()=>e.getState().totalViolations,()=>e.getState().totalViolations)},a6=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useProctoringActions must be used within a ProctoringProvider");return{addViolation:e.addViolation,clearViolations:e.clearViolations}},i1=y.createContext(null);function Zo({config:e={},children:t}){var i,a,l,s;const n={api:{...xn.api,...e.api,retryConfig:{...xn.api.retryConfig,...(i=e.api)==null?void 0:i.retryConfig}},ui:{...xn.ui,...e.ui},interview:{...xn.interview,...e.interview,timers:{...xn.interview.timers,...(a=e.interview)==null?void 0:a.timers},stt:{...xn.interview.stt,...(l=e.interview)==null?void 0:l.stt},tts:{...xn.interview.tts,...(s=e.interview)==null?void 0:s.tts}}};return u.jsx(i1.Provider,{value:n,children:u.jsx(t6,{children:t})})}function Ar(){const e=y.useContext(i1);if(!e)throw new Error("useInterviewConfig must be used within an InterviewWidgetProvider. Wrap your component tree with <InterviewWidgetProvider config={...}>");return e}function a1(){return Ar().api||xn.api}function $l(){return Ar().ui||xn.ui}function Ko(){return Ar().interview||xn.interview}function l6(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function s6(e,t,n){return"#"+[e,t,n].map(i=>{const a=Math.round(i).toString(16);return a.length===1?"0"+a:a}).join("")}function r6(e,t){const n=l6(e);if(!n)return e;const i=n.r+(255-n.r)*t,a=n.g+(255-n.g)*t,l=n.b+(255-n.b)*t;return s6(i,a,l)}function u6(e){return new Promise(t=>setTimeout(t,e))}function o6(e){return`linear-gradient(to left, ${r6(e,.4)}, ${e})`}const c6=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);function f6(e){try{const t=e.split(".");if(t.length!==3||!t[1])throw new Error("Invalid JWT token");const i=t[1].replace(/-/g,"+").replace(/_/g,"/"),a=i.padEnd(i.length+(4-i.length%4)%4,"="),l=atob(a);return JSON.parse(l)}catch(t){return console.error("Error decoding JWT:",t),null}}const l1=e=>{var t;return!e||typeof e!="string"?"":(t=e.charAt(0))==null?void 0:t.toUpperCase()},Io=e=>{const t=Math.max(0,Math.floor(e)),n=Math.floor(t/60).toString().padStart(2,"0"),i=(t%60).toString().padStart(2,"0");return`${n}:${i}`},es=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),u.jsx("path",{d:"M12 9v4"}),u.jsx("path",{d:"M12 17h.01"})]}),d6=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-bolt-icon prefix__lucide-bolt",...e,children:[u.jsx("path",{d:"M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z"}),u.jsx("circle",{cx:12,cy:12,r:4})]}),h6=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-camera-off-icon prefix__lucide-camera-off",...e,children:[u.jsx("path",{d:"M14.564 14.558a3 3 0 11-4.122-4.121M2 2l20 20"}),u.jsx("path",{d:"M20 20H4a2 2 0 01-2-2V9a2 2 0 012-2h1.997a2 2 0 00.819-.175M9.695 4.024A2 2 0 0110.004 4h3.993a2 2 0 011.76 1.05l.486.9A2 2 0 0018.003 7H20a2 2 0 012 2v7.344"})]}),Nr=e=>u.jsx("svg",{width:"10",height:"9",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:u.jsx("path",{d:"M0.75 5.5C0.75 5.5 2.35 6.4125 3.15 7.75C3.15 7.75 5.55 2.5 8.75 0.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),s1=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M12 2a10 10 0 0 1 7.38 16.75"}),u.jsx("path",{d:"M12 6v6l4 2"}),u.jsx("path",{d:"M2.5 8.875a10 10 0 0 0-.5 3"}),u.jsx("path",{d:"M2.83 16a10 10 0 0 0 2.43 3.4"}),u.jsx("path",{d:"M4.636 5.235a10 10 0 0 1 .891-.857"}),u.jsx("path",{d:"M8.644 21.42a10 10 0 0 0 7.631-.38"})]}),m6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M12 6v6l4 2"}),u.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),r1=e=>u.jsx("svg",{className:"iw-w-5 iw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",...e,children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),u1=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}),u.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),g6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),u.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),u.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),w6=e=>u.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M2.66797 2H13.3346",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M3.66797 2V3.35359C3.66797 4.18151 4.05252 4.96247 4.70874 5.46726L8.0013 8L11.2938 5.46726C11.9501 4.96247 12.3346 4.18151 12.3346 3.35359V2",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M3.66797 14V12.6464C3.66797 11.8185 4.05252 11.0375 4.70874 10.5327L8.0013 8L11.2938 10.5327C11.9501 11.0375 12.3346 11.8185 12.3346 12.6464V14",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M2.66797 14H13.3346",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"})]}),Jo=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),u.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),u.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),o1=({className:e,...t})=>u.jsx("div",{children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`iw-animate-spin ${e}`,...t,children:[u.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),u.jsx("path",{d:"M12 6l0 -3"}),u.jsx("path",{d:"M16.25 7.75l2.15 -2.15"}),u.jsx("path",{d:"M18 12l3 0"}),u.jsx("path",{d:"M16.25 16.25l2.15 2.15"}),u.jsx("path",{d:"M12 18l0 3"}),u.jsx("path",{d:"M7.75 16.25l-2.15 2.15"}),u.jsx("path",{d:"M6 12l-3 0"}),u.jsx("path",{d:"M7.75 7.75l-2.15 -2.15"})]})}),y6=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M17 7V11C17 13.7614 14.7614 16 12 16C9.23858 16 7 13.7614 7 11V7C7 4.23858 9.23858 2 12 2C14.7614 2 17 4.23858 17 7Z",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M20 11C20 15.4183 16.4183 19 12 19M12 19C7.58172 19 4 15.4183 4 11M12 19V22M12 22H15M12 22H9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),p6=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M2 2L22 22",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M4 11C4 15.4183 7.58172 19 12 19M12 19C13.9545 19 15.7454 18.2991 17.1348 17.1348M12 19V22M12 22H15M12 22H9M20 11C20 12.6514 19.4996 14.1859 18.6422 15.4603",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M7 6.98V11C7 13.7614 9.23858 16 12 16C13.1354 16 14.1647 15.6096 15.004 14.972M16.4387 13.244C16.7973 12.5545 17 11.8309 17 11V6.98C17 4.21858 14.7614 2 12 2C10.1312 2 8.53009 2.96527 7.672 4.484",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"})]}),v6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}),u.jsx("line",{x1:"8",x2:"16",y1:"21",y2:"21"}),u.jsx("line",{x1:"12",x2:"12",y1:"17",y2:"21"})]}),b6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),u.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),u.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),u.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),x6=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}),u.jsx("path",{d:"m9 12 2 2 4-4"})]}),S6=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-target-icon prefix__lucide-target",...e,children:[u.jsx("circle",{cx:12,cy:12,r:10}),u.jsx("circle",{cx:12,cy:12,r:6}),u.jsx("circle",{cx:12,cy:12,r:2})]}),E6=e=>u.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-users-icon prefix__lucide-users",...e,children:[u.jsx("path",{d:"M16 21v-2a4 4 0 00-4-4H6a4 4 0 00-4 4v2M16 3.128a4 4 0 010 7.744M22 21v-2a4 4 0 00-3-3.87"}),u.jsx("circle",{cx:9,cy:7,r:4})]}),_6=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M11 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M2 11C2 7.70017 2 6.05025 3.02513 5.02513C4.05025 4 5.70017 4 9 4H10C13.2998 4 14.9497 4 15.9749 5.02513C17 6.05025 17 7.70017 17 11V13C17 16.2998 17 17.9497 15.9749 18.9749C14.9497 20 13.2998 20 10 20H9C5.70017 20 4.05025 20 3.02513 18.9749C2 17.9497 2 16.2998 2 13V11Z",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M17 8.90585L17.1259 8.80196C19.2417 7.05623 20.2996 6.18336 21.1498 6.60482C22 7.02628 22 8.42355 22 11.2181V12.7819C22 15.5765 22 16.9737 21.1498 17.3952C20.2996 17.8166 19.2417 16.9438 17.1259 15.198L17 15.0941",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),T6=e=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M2.00195 2L21.9773 22",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M16.8517 16.8668C16.7225 17.8052 16.4666 18.4659 15.9596 18.9735C14.9357 19.9987 13.2878 19.9987 9.99206 19.9987H8.99329C5.69755 19.9987 4.04967 19.9987 3.02581 18.9735C2.00195 17.9484 2.00195 16.2985 2.00195 12.9987V10.9987C2.00195 7.69885 2.00195 6.04893 3.02581 5.0238C3.36833 4.68086 3.78068 4.45265 4.3012 4.30078",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),u.jsx("path",{d:"M8.23633 4.00052C8.47821 4 8.73001 4 8.99223 4H9.99099C13.2868 4 14.9347 4 15.9585 5.02513C16.9823 6.05025 16.9823 7.70017 16.9823 11V12.7574M16.9823 9.23142L19.3019 7.52913C20.773 6.54073 21.449 7.17196 21.6675 7.64847C22.1192 8.92813 21.9769 11.3936 21.9769 14.5417C21.8704 16.555 21.5953 16.7719 21.3138 16.9939L21.3108 16.9962",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),ts={FACE_DETECTED:"face_detected",NO_FACE:"no_face_detected",MULTIPLE_FACES:"multiple_faces",LOOKING_AWAY:"looking_away",CAMERA_ERROR:"camera_error"},c1={[ts.FACE_DETECTED]:{icon:u1,iconColor:"iw-text-green-600",iconBg:"iw-bg-green-50",iconBorder:"iw-border-green-100",title:"All Good",subtitle:"Everything looks normal",description:"Your gaze is properly focused on the screen. Continue with your interview.",buttonText:"Continue"},[ts.NO_FACE]:{icon:h6,iconColor:"iw-text-orange-600",iconBg:"iw-bg-orange-50",iconBorder:"iw-border-orange-100",title:"Face Not Detected",subtitle:"We can't see you in the camera",description:"Please ensure you're positioned properly in front of the camera and that your face is clearly visible.",buttonText:"I Understood"},[ts.MULTIPLE_FACES]:{icon:E6,iconColor:"iw-text-red-600",iconBg:"iw-bg-red-50",iconBorder:"iw-border-red-100",title:"Multiple People Detected",subtitle:"More than one person is visible",description:"For interview integrity, please ensure you are alone in the room and only your face is visible to the camera.",buttonText:"I Understood"},[ts.LOOKING_AWAY]:{icon:S6,iconColor:"iw-text-amber-600",iconBg:"iw-bg-amber-50",iconBorder:"iw-border-amber-200/75",title:"Stay Focused",subtitle:"We noticed you looked away from the screen",description:"To ensure interview integrity, please keep your attention on the screen throughout the session.",buttonText:"I Understood"},[ts.CAMERA_ERROR]:{icon:es,iconColor:"iw-text-red-600",iconBg:"iw-bg-red-50",iconBorder:"iw-border-red-100",title:"Camera Issue",subtitle:"There's a problem with your camera",description:"Please check your camera connection and permissions, then refresh the page to continue.",buttonText:"I Understood"}};function A6(e){var t;if(!navigator.onLine)return{type:"network",message:"No internet connection",retryable:!0,userMessage:"Please check your internet connection and try again."};if(e.name==="AbortError"||(t=e.message)!=null&&t.includes("timeout"))return{type:"timeout",message:"Request timed out",retryable:!0,userMessage:"The request is taking longer than expected. Please try again."};if(e.status){const{status:n}=e;if(n===401||n===403)return{type:"auth",status:n,message:"Authentication failed",retryable:!1,userMessage:"Your session has expired. Please refresh the page."};if(n===429)return{type:"rate-limit",status:n,message:"Too many requests",retryable:!0,userMessage:"Please wait a moment before trying again."};if(n>=500)return{type:"server",status:n,message:`Server error: ${n}`,retryable:!0,userMessage:"Our servers are experiencing issues. Please try again in a few moments."};if(n>=400)return{type:"client",status:n,message:`Client error: ${n}`,retryable:!1,userMessage:"There was an issue with your request. Please check your input."}}return{type:"unknown",message:e.message||"Unknown error occurred",retryable:!0,userMessage:"Something unexpected happened. Please try again.",originalError:e}}async function ui(e,t={},n={attempts:3,backoff:"exponential",baseDelay:1e3,maxDelay:1e4,jitter:!0}){let i;for(let a=1;a<=n.attempts;a++)try{const l=new AbortController,s=setTimeout(()=>l.abort(),6e4),r=await fetch(e,{...t,signal:l.signal});if(clearTimeout(s),r.status>=400&&r.status<500&&r.status!==429)return r;if(!r.ok)throw new Error(`HTTP ${r.status}: ${r.statusText}`);return r}catch(l){i=l;const s=A6(l);if(!s.retryable||a===n.attempts)throw s;const r=N6(a,n);console.warn(`API request failed (attempt ${a}/${n.attempts}), retrying in ${r}ms:`,s.message),await new Promise(o=>setTimeout(o,r))}throw i}function N6(e,t){let n;return t.backoff==="exponential"?n=t.baseDelay*Math.pow(2,e-1):n=t.baseDelay,n=Math.min(n,t.maxDelay),t.jitter&&(n=n*(.5+Math.random()*.5)),Math.round(n)}const oi={v2:"/v2"},ci={GENERATE_QUESTION:e=>`${oi.v2}/interviews/${e}/next-question`,SCREENSHOT_UPLOAD:e=>`${oi.v2}/interviews/${e}/assets/upload-url`,CONFIRM_UPLOAD:e=>`${oi.v2}/interviews/assets/${e}/confirm`,TRANSCRIBE_ANSWER:e=>`${oi.v2}/interviews/${e}/transcribe-answer`,SUBMIT_ANSWER:e=>`${oi.v2}/interviews/${e}/submit-answer`,EXIT:e=>`${oi.v2}/interviews/${e}/exit`,CONFIG:e=>`${oi.v2}/interviews/${e}/config`,TRANSCRIPTION:e=>`${oi.v2}/interviews/${e}/transcript`};class f1{constructor(t={}){Qt(this,"config");this.config=t}updateConfig(t){this.config={...this.config,...t}}getHeaders(){var n;const t={"Content-Type":"application/json"};return(n=this.config)!=null&&n.authToken&&(t.Authorization=`Bearer ${this.config.authToken}`),t}getBaseUrl(){var t;return((t=this.config)==null?void 0:t.baseUrl)||"/api"}async generateQuestion({interviewId:t,isInterviewDone:n=!1}){const i=await ui(`${this.getBaseUrl()}${ci.GENERATE_QUESTION(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({interview_id:t,is_interview_done:n})});if(!i.ok)throw new Error(`Failed to get questions: ${i.status}`);return await i.json()}async submitAnswer({interviewId:t,qnaId:n,answer:i}){const a=await ui(`${this.getBaseUrl()}${ci.SUBMIT_ANSWER(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({qna_id:n,answer_text:i})});if(!a.ok)throw new Error(`Failed to submit answer: ${a.status}`);return await a.json()}async exitInterview(t){const n=await ui(`${this.getBaseUrl()}${ci.EXIT(t)}`,{method:"POST",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to exit interview: ${n.status}`)}async getInterviewConfig(t){const n=await ui(`${this.getBaseUrl()}${ci.CONFIG(t)}`,{method:"GET",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to get interview config: ${n.status}`);return await n.json()}async requestScreenshotUploadUrl(t,n=`screenshot-${Date.now()}.jpeg`){const i=await ui(`${this.getBaseUrl()}${ci.SCREENSHOT_UPLOAD(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({filename:n,mime_type:"image/jpeg",asset_type:Kw.SCREENSHOT})});if(!i.ok)throw new Error(`Failed to request screenshot upload URL: ${i.status}`);return await i.json()}async uploadScreenshot(t,n){const i=await fetch(t,{method:"PUT",body:n,headers:{"Content-Type":"image/jpeg"}});if(!i.ok)throw new Error(`Failed to upload screenshot: ${i.status}`)}async confirmScreenshotUpload(t){const n=await ui(`${this.getBaseUrl()}${ci.CONFIRM_UPLOAD(t)}`,{method:"POST",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to confirm screenshot upload: ${n.status}`)}async getInterviewTranscription(t){const n=await ui(`${this.getBaseUrl()}${ci.TRANSCRIPTION(t)}`,{method:"GET",headers:{...this.getHeaders(),"x-auth-token":"interview-engine-api-key"}});if(!n.ok)throw new Error(`Failed to get interview transcription: ${n.status}`);return await n.json()}}const j6=new f1,M6=({gazeAnalysisEnabled:e,isModelLoaded:t,stats:n,statusMessage:i,loadingProgress:a})=>u.jsx("div",{className:"iw-w-full",children:u.jsxs("div",{className:"iw-border-strock iw-rounded-md iw-border iw-bg-gray-50 iw-p-4",children:[u.jsxs("h3",{className:"iw-m-0 iw-mb-2.5",children:["Status: ",i]}),a>0&&a<100&&u.jsxs("div",{className:"iw-mb-2.5",children:[u.jsx("div",{className:"iw-h-2 iw-w-full iw-rounded iw-bg-gray-300",children:u.jsx("div",{className:"iw-h-full iw-rounded iw-bg-blue-600 iw-transition-all iw-duration-300 iw-ease-out",style:{width:`${a}%`}})}),u.jsxs("small",{className:"iw-text-gray-600",children:["Loading model... ",a.toFixed(1),"%"]})]}),u.jsxs("div",{className:"iw-grid iw-grid-cols-2 iw-gap-2.5 iw-text-sm",children:[u.jsxs("div",{children:[u.jsx("strong",{children:"FPS:"})," ",u.jsx("span",{className:n.fps<15?"iw-text-red-600":n.fps<25?"iw-text-orange-500":"iw-text-green-600",children:n.fps})]}),u.jsxs("div",{children:[u.jsx("strong",{children:"Model:"})," ",t?"✓ Loaded":"✗ Loading"]}),e&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[u.jsx("strong",{children:"Engagement:"})," ",n.engagement.toFixed(1),"%"]}),u.jsxs("div",{children:[u.jsx("strong",{children:"Looking:"})," ",u.jsx("span",{className:n.isLookingAway?"iw-text-red-600":"iw-text-green-600",children:n.isLookingAway?"Away":"At Screen"})]})]})]}),n.referenceFaceNotDetected&&u.jsxs("div",{className:"iw-text-gray-dark iw-mt-2.5 iw-w-full iw-rounded-md iw-bg-[#ffeb3b] iw-p-2.5 iw-text-sm",children:[u.jsx("strong",{children:"Reference Face Not Detected"}),u.jsx("br",{}),"The previously set reference face is no longer in view."]}),n.multipleFacesDetected&&u.jsxs("div",{className:"iw-mt-2.5 iw-rounded iw-bg-red-50 iw-p-2.5 iw-text-sm iw-text-red-700",children:[u.jsx("strong",{children:"Multiple Faces Detected"}),u.jsx("br",{}),"Please ensure only one person is in the frame."]}),!e&&u.jsxs("div",{className:"iw-mt-2.5 iw-rounded iw-bg-blue-50 iw-p-2.5 iw-text-sm iw-text-blue-700",children:[u.jsx("strong",{children:"Gaze Analysis Disabled"}),u.jsx("br",{}),"Enable to track engagement and attention levels."]})]})}),C6=({showControls:e,isBubbleOpen:t,setIsBubbleOpen:n,setReference:i,clearCache:a,isModelLoaded:l,gazeAnalysisEnabled:s,referenceSet:r,showLandmarks:o,setShowLandmarks:c,showEngagementBar:f,setShowEngagementBar:h,handleToggleGazeAnalysis:d,stats:m,statusMessage:v,loadingProgress:x})=>e?u.jsxs(u.Fragment,{children:[u.jsx("button",{onClick:()=>n(!t),className:"iw-absolute iw-right-4 iw-bottom-4 iw-z-10 iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-full iw-text-white",children:u.jsx(d6,{className:"iw-size-4.5"})}),t&&u.jsxs("div",{className:"iw-absolute iw-right-4 iw-bottom-16 iw-z-10 iw-max-h-96 iw-w-80 iw-overflow-y-auto iw-rounded-md iw-bg-gray-50 iw-p-4 iw-shadow-lg",children:[u.jsx("h4",{className:"m-0 mb-2.5",children:"Controls"}),u.jsx("button",{onClick:i,disabled:!l||!s,className:`iw-mb-2.5 iw-block iw-w-full iw-rounded border-none iw-px-4 iw-py-2 iw-text-sm iw-text-white ${!l||!s?"iw-cursor-not-allowed iw-bg-gray-400":"iw-cursor-pointer iw-bg-blue-600 hover:iw-bg-blue-700"}`,children:r?"Reference Set ✓":"Set Reference"}),u.jsx("button",{onClick:a,className:"iw-mb-4 iw-block iw-w-full iw-cursor-pointer iw-rounded iw-border-none iw-bg-red-600 iw-px-4 iw-py-2 iw-text-sm iw-text-white hover:iw-bg-red-700",children:"Clear Model Cache"}),u.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-2.5",children:[u.jsxs("label",{className:"iw-flex iw-cursor-pointer iw-items-center iw-gap-2",children:[u.jsx("input",{type:"checkbox",checked:s,onChange:E=>d(E.target.checked)}),u.jsx("strong",{children:"Enable Gaze Analysis"})]}),u.jsxs("label",{className:`iw-flex iw-cursor-pointer iw-items-center iw-gap-2 ${s?"iw-opacity-100":"iw-opacity-60"}`,children:[u.jsx("input",{type:"checkbox",checked:o,onChange:E=>c(E.target.checked),disabled:!s}),"Show Landmarks"]}),u.jsxs("label",{className:`iw-flex iw-cursor-pointer iw-items-center iw-gap-2 ${s?"iw-opacity-100":"iw-opacity-60"}`,children:[u.jsx("input",{type:"checkbox",checked:f,onChange:E=>h(E.target.checked),disabled:!s}),"Show Engagement Bar"]})]}),r&&u.jsx(M6,{gazeAnalysisEnabled:s,isModelLoaded:l,loadingProgress:x,stats:m,statusMessage:v})]})]}):null;var Oa=typeof self<"u"?self:{};function ns(e,t){e:{for(var n=["CLOSURE_FLAGS"],i=Oa,a=0;a<n.length;a++)if((i=i[n[a]])==null){n=null;break e}n=i}return(e=n&&n[e])!=null?e:t}function Ki(){throw Error("Invalid UTF8")}function d1(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}let jr,Wo;const D6=typeof TextDecoder<"u";let O6;const z6=typeof TextEncoder<"u";function h1(e){if(z6)e=(O6||(O6=new TextEncoder)).encode(e);else{let n=0;const i=new Uint8Array(3*e.length);for(let a=0;a<e.length;a++){var t=e.charCodeAt(a);if(t<128)i[n++]=t;else{if(t<2048)i[n++]=t>>6|192;else{if(t>=55296&&t<=57343){if(t<=56319&&a<e.length){const l=e.charCodeAt(++a);if(l>=56320&&l<=57343){t=1024*(t-55296)+l-56320+65536,i[n++]=t>>18|240,i[n++]=t>>12&63|128,i[n++]=t>>6&63|128,i[n++]=63&t|128;continue}a--}t=65533}i[n++]=t>>12|224,i[n++]=t>>6&63|128}i[n++]=63&t|128}}e=n===i.length?i:i.subarray(0,n)}return e}function m1(e){Oa.setTimeout(()=>{throw e},0)}var Po,k6=ns(610401301,!1),g1=ns(748402147,!0),$o=ns(824648567,!0),ec=ns(824656860,ns(1,!0));function w1(){var e=Oa.navigator;return e&&(e=e.userAgent)?e:""}const y1=Oa.navigator;function Mr(e){return Mr[" "](e),e}Po=y1&&y1.userAgentData||null,Mr[" "]=function(){};const p1={};let is=null;function L6(e){const t=e.length;let n=3*t/4;n%3?n=Math.floor(n):"=.".indexOf(e[t-1])!=-1&&(n="=.".indexOf(e[t-2])!=-1?n-2:n-1);const i=new Uint8Array(n);let a=0;return function(l,s){function r(c){for(;o<l.length;){const f=l.charAt(o++),h=is[f];if(h!=null)return h;if(!/^[\s\xa0]*$/.test(f))throw Error("Unknown base64 encoding at char: "+f)}return c}v1();let o=0;for(;;){const c=r(-1),f=r(0),h=r(64),d=r(64);if(d===64&&c===-1)break;s(c<<2|f>>4),h!=64&&(s(f<<4&240|h>>2),d!=64&&s(h<<6&192|d))}}(e,function(l){i[a++]=l}),a!==n?i.subarray(0,a):i}function v1(){if(!is){is={};var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const i=e.concat(t[n].split(""));p1[n]=i;for(let a=0;a<i.length;a++){const l=i[a];is[l]===void 0&&(is[l]=a)}}}}var U6=typeof Uint8Array<"u",b1=!(!(k6&&Po&&Po.brands.length>0)&&(w1().indexOf("Trident")!=-1||w1().indexOf("MSIE")!=-1))&&typeof btoa=="function";const x1=/[-_.]/g,B6={"-":"+",_:"/",".":"="};function R6(e){return B6[e]||""}function S1(e){if(!b1)return L6(e);e=x1.test(e)?e.replace(x1,R6):e,e=atob(e);const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function tc(e){return U6&&e!=null&&e instanceof Uint8Array}var za={};function Ii(){return G6||(G6=new Sn(null,za))}function nc(e){E1(za);var t=e.g;return(t=t==null||tc(t)?t:typeof t=="string"?S1(t):null)==null?t:e.g=t}var Sn=class{h(){return new Uint8Array(nc(this)||0)}constructor(e,t){if(E1(t),this.g=e,e!=null&&e.length===0)throw Error("ByteString should be constructed with non-empty values")}};let G6,H6;function E1(e){if(e!==za)throw Error("illegal external caller")}function _1(e,t){e.__closure__error__context__984382||(e.__closure__error__context__984382={}),e.__closure__error__context__984382.severity=t}function ic(e){return _1(e=Error(e),"warning"),e}function ka(e,t){if(e!=null){var n=H6??(H6={}),i=n[e]||0;i>=t||(n[e]=i+1,_1(e=Error(),"incident"),m1(e))}}function La(){return typeof BigInt=="function"}var Ua=typeof Symbol=="function"&&typeof Symbol()=="symbol";function En(e,t,n=!1){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?n&&Symbol.for&&e?Symbol.for(e):e!=null?Symbol(e):Symbol():t}var V6=En("jas",void 0,!0),T1=En(void 0,"0di"),as=En(void 0,"1oa"),Et=En(void 0,Symbol()),q6=En(void 0,"0ub"),F6=En(void 0,"0ubs"),ac=En(void 0,"0ubsb"),Y6=En(void 0,"0actk"),Ba=En("m_m","Pa",!0),A1=En();const N1={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},j1=Object.defineProperties,O=Ua?V6:"Ga";var Ji;const M1=[];function ls(e,t){Ua||O in e||j1(e,N1),e[O]|=t}function Ge(e,t){Ua||O in e||j1(e,N1),e[O]=t}function ss(e){return ls(e,34),e}function rs(e){return ls(e,8192),e}Ge(M1,7),Ji=Object.freeze(M1);var Ra={};function _t(e,t){return t===void 0?e.h!==Wi&&!!(2&(0|e.v[O])):!!(2&t)&&e.h!==Wi}const Wi={};function lc(e,t){if(e!=null){if(typeof e=="string")e=e?new Sn(e,za):Ii();else if(e.constructor!==Sn)if(tc(e))e=e.length?new Sn(new Uint8Array(e),za):Ii();else{if(!t)throw Error();e=void 0}}return e}class C1{constructor(t,n,i){this.g=t,this.h=n,this.l=i}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}var X6=Object.freeze({});function D1(e,t,n){const i=128&t?0:-1,a=e.length;var l;(l=!!a)&&(l=(l=e[a-1])!=null&&typeof l=="object"&&l.constructor===Object);const s=a+(l?-1:0);for(t=128&t?1:0;t<s;t++)n(t-i,e[t]);if(l){e=e[a-1];for(const r in e)!isNaN(r)&&n(+r,e[r])}}var O1={};function Ga(e){return 128&e?O1:void 0}function Cr(e){return e.Na=!0,e}var Q6=Cr(e=>typeof e=="number"),z1=Cr(e=>typeof e=="string"),Z6=Cr(e=>typeof e=="boolean"),Dr=typeof Oa.BigInt=="function"&&typeof Oa.BigInt(0)=="bigint";function Tt(e){var t=e;if(z1(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(Q6(t)&&!Number.isSafeInteger(t))throw Error(String(t));return Dr?BigInt(e):e=Z6(e)?e?"1":"0":z1(e)?e.trim()||"0":String(e)}var sc=Cr(e=>Dr?e>=I6&&e<=W6:e[0]==="-"?k1(e,K6):k1(e,J6));const K6=Number.MIN_SAFE_INTEGER.toString(),I6=Dr?BigInt(Number.MIN_SAFE_INTEGER):void 0,J6=Number.MAX_SAFE_INTEGER.toString(),W6=Dr?BigInt(Number.MAX_SAFE_INTEGER):void 0;function k1(e,t){if(e.length>t.length)return!1;if(e.length<t.length||e===t)return!0;for(let n=0;n<e.length;n++){const i=e[n],a=t[n];if(i>a)return!1;if(i<a)return!0}}const P6=typeof Uint8Array.prototype.slice=="function";let $6,we=0,De=0;function L1(e){const t=e>>>0;we=t,De=(e-t)/4294967296>>>0}function Ha(e){if(e<0){L1(-e);const[t,n]=fc(we,De);we=t>>>0,De=n>>>0}else L1(e)}function rc(e){const t=$6||($6=new DataView(new ArrayBuffer(8)));t.setFloat32(0,+e,!0),De=0,we=t.getUint32(0,!0)}function uc(e,t){const n=4294967296*t+(e>>>0);return Number.isSafeInteger(n)?n:us(e,t)}function e5(e,t){return Tt(La()?BigInt.asUintN(64,(BigInt(t>>>0)<<BigInt(32))+BigInt(e>>>0)):us(e,t))}function oc(e,t){const n=2147483648&t;return n&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),typeof(e=uc(e,t))=="number"?n?-e:e:n?"-"+e:e}function U1(e,t){return La()?Tt(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(t))<<BigInt(32))+BigInt.asUintN(32,BigInt(e)))):Tt(cc(e,t))}function us(e,t){if(e>>>=0,(t>>>=0)<=2097151)var n=""+(4294967296*t+e);else La()?n=""+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(n=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,e>=1e7&&(n+=e/1e7>>>0,e%=1e7),n>=1e7&&(t+=n/1e7>>>0,n%=1e7),n=t+B1(n)+B1(e));return n}function B1(e){return e=String(e),"0000000".slice(e.length)+e}function cc(e,t){if(2147483648&t)if(La())e=""+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{const[n,i]=fc(e,t);e="-"+us(n,i)}else e=us(e,t);return e}function Or(e){if(e.length<16)Ha(Number(e));else if(La())e=BigInt(e),we=Number(e&BigInt(4294967295))>>>0,De=Number(e>>BigInt(32)&BigInt(4294967295));else{const t=+(e[0]==="-");De=we=0;const n=e.length;for(let i=t,a=(n-t)%6+t;a<=n;i=a,a+=6){const l=Number(e.slice(i,a));De*=1e6,we=1e6*we+l,we>=4294967296&&(De+=Math.trunc(we/4294967296),De>>>=0,we>>>=0)}if(t){const[i,a]=fc(we,De);we=i,De=a}}}function fc(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}function hn(e){return Array.prototype.slice.call(e)}const os=typeof BigInt=="function"?BigInt.asIntN:void 0,t5=typeof BigInt=="function"?BigInt.asUintN:void 0,Pi=Number.isSafeInteger,zr=Number.isFinite,Va=Math.trunc,n5=Tt(0);function cs(e){if(e!=null&&typeof e!="number")throw Error(`Value of float/double field must be a number, found ${typeof e}: ${e}`);return e}function _n(e){return e==null||typeof e=="number"?e:e==="NaN"||e==="Infinity"||e==="-Infinity"?Number(e):void 0}function fs(e){if(e!=null&&typeof e!="boolean"){var t=typeof e;throw Error(`Expected boolean but got ${t!="object"?t:e?Array.isArray(e)?"array":t:"null"}: ${e}`)}return e}function R1(e){return e==null||typeof e=="boolean"?e:typeof e=="number"?!!e:void 0}const i5=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function ds(e){switch(typeof e){case"bigint":return!0;case"number":return zr(e);case"string":return i5.test(e);default:return!1}}function qa(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return zr(e)?0|e:void 0}function G1(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return zr(e)?e>>>0:void 0}function H1(e){const t=e.length;return(e[0]==="-"?t<20||t===20&&e<="-9223372036854775808":t<19||t===19&&e<="9223372036854775807")?e:(Or(e),cc(we,De))}function dc(e){return e=Va(e),Pi(e)||(Ha(e),e=oc(we,De)),e}function V1(e){var t=Va(Number(e));return Pi(t)?String(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),H1(e))}function q1(e){var t=Va(Number(e));return Pi(t)?Tt(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),La()?Tt(os(64,BigInt(e))):Tt(H1(e)))}function F1(e){return Pi(e)?e=Tt(dc(e)):(e=Va(e),Pi(e)?e=String(e):(Ha(e),e=cc(we,De)),e=Tt(e)),e}function a5(e){return e==null?e:typeof e=="bigint"?(sc(e)?e=Number(e):(e=os(64,e),e=sc(e)?Number(e):String(e)),e):ds(e)?typeof e=="number"?dc(e):V1(e):void 0}function kr(e){const t=typeof e;return e==null?e:t==="bigint"?Tt(os(64,e)):ds(e)?t==="string"?q1(e):F1(e):void 0}function Y1(e){if(typeof e!="string")throw Error();return e}function hs(e){if(e!=null&&typeof e!="string")throw Error();return e}function We(e){return e==null||typeof e=="string"?e:void 0}function hc(e,t,n,i){return e!=null&&e[Ba]===Ra?e:Array.isArray(e)?((i=(n=0|e[O])|32&i|2&i)!==n&&Ge(e,i),new t(e)):(n?2&i?((e=t[T1])||(ss((e=new t).v),e=t[T1]=e),t=e):t=new t:t=void 0,t)}function l5(e,t,n){if(t)e:{if(!ds(t=e))throw ic("int64");switch(typeof t){case"string":t=q1(t);break e;case"bigint":t=Tt(os(64,t));break e;default:t=F1(t)}}else t=kr(e);return(e=t)==null?n?n5:void 0:e}const s5={};let r5=function(){try{return Mr(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class mc{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,n){return this.g.set(t,n),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,n){return this.g.forEach(t,n)}[Symbol.iterator](){return this.entries()}}const u5=r5?(Object.setPrototypeOf(mc.prototype,Map.prototype),Object.defineProperties(mc.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),mc):class extends Map{constructor(){super()}};function X1(e){return e}function gc(e){if(2&e.J)throw Error("Cannot mutate an immutable Map")}var Bn=class extends u5{constructor(e,t,n=X1,i=X1){super(),this.J=0|e[O],this.K=t,this.S=n,this.fa=this.K?o5:i;for(let a=0;a<e.length;a++){const l=e[a],s=n(l[0],!1,!0);let r=l[1];t?r===void 0&&(r=null):r=i(l[1],!1,!0,void 0,void 0,this.J),super.set(s,r)}}V(e){return rs(Array.from(super.entries(),e))}clear(){gc(this),super.clear()}delete(e){return gc(this),super.delete(this.S(e,!0,!1))}entries(){if(this.K){var e=super.keys();e=new C1(e,c5,this)}else e=super.entries();return e}values(){if(this.K){var e=super.keys();e=new C1(e,Bn.prototype.get,this)}else e=super.values();return e}forEach(e,t){this.K?super.forEach((n,i,a)=>{e.call(t,a.get(i),i,a)}):super.forEach(e,t)}set(e,t){return gc(this),(e=this.S(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.fa(t,!0,!0,this.K,!1,this.J))}Ma(e){const t=this.S(e[0],!1,!0);e=e[1],e=this.K?e===void 0?null:e:this.fa(e,!1,!0,void 0,!1,this.J),super.set(t,e)}has(e){return super.has(this.S(e,!1,!1))}get(e){e=this.S(e,!1,!1);const t=super.get(e);if(t!==void 0){var n=this.K;return n?((n=this.fa(t,!1,!0,n,this.ra,this.J))!==t&&super.set(e,n),n):t}}[Symbol.iterator](){return this.entries()}};function o5(e,t,n,i,a,l){return e=hc(e,i,n,l),a&&(e=pc(e)),e}function c5(e){return[e,this.get(e)]}let f5;function Q1(){return f5||(f5=new Bn(ss([]),void 0,void 0,void 0,s5))}function Lr(e){return Et?e[Et]:void 0}function Ur(e,t){for(const n in e)!isNaN(n)&&t(e,+n,e[n])}Bn.prototype.toJSON=void 0;var wc=class{};const d5={Ka:!0};function h5(e,t){t<100||ka(F6,1)}function Br(e,t,n,i){const a=i!==void 0;i=!!i;var l,s=Et;!a&&Ua&&s&&(l=e[s])&&Ur(l,h5),s=[];var r=e.length;let o;l=4294967295;let c=!1;const f=!!(64&t),h=f?128&t?0:-1:void 0;1&t||(o=r&&e[r-1],o!=null&&typeof o=="object"&&o.constructor===Object?l=--r:o=void 0,!f||128&t||a||(c=!0,l=l-h+h)),t=void 0;for(var d=0;d<r;d++){let m=e[d];if(m!=null&&(m=n(m,i))!=null)if(f&&d>=l){const v=d-h;(t??(t={}))[v]=m}else s[d]=m}if(o)for(let m in o){if((r=o[m])==null||(r=n(r,i))==null)continue;let v;d=+m,f&&!Number.isNaN(d)&&(v=d+h)<l?s[v]=r:(t??(t={}))[m]=r}return t&&(c?s.push(t):s[l]=t),a&&Et&&(e=Lr(e))&&e instanceof wc&&(s[Et]=function(m){const v=new wc;return Ur(m,(x,E,g)=>{v[E]=hn(g)}),v.da=m.da,v}(e)),s}function m5(e){return e[0]=ms(e[0]),e[1]=ms(e[1]),e}function ms(e){switch(typeof e){case"number":return Number.isFinite(e)?e:""+e;case"bigint":return sc(e)?Number(e):""+e;case"boolean":return e?1:0;case"object":if(Array.isArray(e)){var t=0|e[O];return e.length===0&&1&t?void 0:Br(e,t,ms)}if(e!=null&&e[Ba]===Ra)return Z1(e);if(e instanceof Sn){if((t=e.g)==null)e="";else if(typeof t=="string")e=t;else{if(b1){for(var n="",i=0,a=t.length-10240;i<a;)n+=String.fromCharCode.apply(null,t.subarray(i,i+=10240));n+=String.fromCharCode.apply(null,i?t.subarray(i):t),t=btoa(n)}else{n===void 0&&(n=0),v1(),n=p1[n],i=Array(Math.floor(t.length/3)),a=n[64]||"";let c=0,f=0;for(;c<t.length-2;c+=3){var l=t[c],s=t[c+1],r=t[c+2],o=n[l>>2];l=n[(3&l)<<4|s>>4],s=n[(15&s)<<2|r>>6],r=n[63&r],i[f++]=o+l+s+r}switch(o=0,r=a,t.length-c){case 2:r=n[(15&(o=t[c+1]))<<2]||a;case 1:t=t[c],i[f]=n[t>>2]+n[(3&t)<<4|o>>4]+r+a}t=i.join("")}e=e.g=t}return e}return e instanceof Bn?e=e.size!==0?e.V(m5):void 0:void 0}return e}function Z1(e){return Br(e=e.v,0|e[O],ms)}let g5,w5;function $i(e,t){return K1(e,t[0],t[1])}function K1(e,t,n,i=0){if(e==null){var a=32;n?(e=[n],a|=128):e=[],t&&(a=-16760833&a|(1023&t)<<14)}else{if(!Array.isArray(e))throw Error("narr");if(a=0|e[O],g1&&1&a)throw Error("rfarr");if(2048&a&&!(2&a)&&function(){if(g1)throw Error("carr");ka(Y6,5)}(),256&a)throw Error("farr");if(64&a)return(a|i)!==a&&Ge(e,a|i),e;if(n&&(a|=128,n!==e[0]))throw Error("mid");e:{a|=64;var l=(n=e).length;if(l){var s=l-1;const o=n[s];if(o!=null&&typeof o=="object"&&o.constructor===Object){if((s-=t=128&a?0:-1)>=1024)throw Error("pvtlmt");for(var r in o)(l=+r)<s&&(n[l+t]=o[r],delete o[r]);a=-16760833&a|(1023&s)<<14;break e}}if(t){if((r=Math.max(t,l-(128&a?0:-1)))>1024)throw Error("spvt");a=-16760833&a|(1023&r)<<14}}}return Ge(e,64|a|i),e}function y5(e,t){if(typeof e!="object")return e;if(Array.isArray(e)){var n=0|e[O];return e.length===0&&1&n?void 0:I1(e,n,t)}if(e!=null&&e[Ba]===Ra)return J1(e);if(e instanceof Bn){if(2&(t=e.J))return e;if(!e.size)return;if(n=ss(e.V()),e.K)for(e=0;e<n.length;e++){const i=n[e];let a=i[1];a=a==null||typeof a!="object"?void 0:a!=null&&a[Ba]===Ra?J1(a):Array.isArray(a)?I1(a,0|a[O],!!(32&t)):void 0,i[1]=a}return n}return e instanceof Sn?e:void 0}function I1(e,t,n){return 2&t||(!n||4096&t||16&t?e=Fa(e,t,!1,n&&!(16&t)):(ls(e,34),4&t&&Object.freeze(e))),e}function yc(e,t,n){return e=new e.constructor(t),n&&(e.h=Wi),e.m=Wi,e}function J1(e){const t=e.v,n=0|t[O];return _t(e,n)?e:vc(e,t,n)?yc(e,t):Fa(t,n)}function Fa(e,t,n,i){return i??(i=!!(34&t)),e=Br(e,t,y5,i),i=32,n&&(i|=2),Ge(e,t=16769217&t|i),e}function pc(e){const t=e.v,n=0|t[O];return _t(e,n)?vc(e,t,n)?yc(e,t,!0):new e.constructor(Fa(t,n,!1)):e}function Ya(e){if(e.h!==Wi)return!1;var t=e.v;return ls(t=Fa(t,0|t[O]),2048),e.v=t,e.h=void 0,e.m=void 0,!0}function Xa(e){if(!Ya(e)&&_t(e,0|e.v[O]))throw Error()}function ea(e,t){t===void 0&&(t=0|e[O]),32&t&&!(4096&t)&&Ge(e,4096|t)}function vc(e,t,n){return!!(2&n)||!(!(32&n)||4096&n)&&(Ge(t,2|n),e.h=Wi,!0)}const p5=Tt(0),fi={};function de(e,t,n,i,a){if((t=Rn(e.v,t,n,a))!==null||i&&e.m!==Wi)return t}function Rn(e,t,n,i){if(t===-1)return null;const a=t+(n?0:-1),l=e.length-1;let s,r;if(!(l<1+(n?0:-1))){if(a>=l)if(s=e[l],s!=null&&typeof s=="object"&&s.constructor===Object)n=s[t],r=!0;else{if(a!==l)return;n=s}else n=e[a];if(i&&n!=null){if((i=i(n))==null)return i;if(!Object.is(i,n))return r?s[t]=i:e[a]=i,i}return n}}function ne(e,t,n,i){Xa(e),He(e=e.v,0|e[O],t,n,i)}function He(e,t,n,i,a){const l=n+(a?0:-1);var s=e.length-1;if(s>=1+(a?0:-1)&&l>=s){const r=e[s];if(r!=null&&typeof r=="object"&&r.constructor===Object)return r[n]=i,t}return l<=s?(e[l]=i,t):(i!==void 0&&(n>=(s=(t??(t=0|e[O]))>>14&1023||536870912)?i!=null&&(e[s+(a?0:-1)]={[n]:i}):e[l]=i),t)}function ta(){return X6===void 0?2:4}function na(e,t,n,i,a){let l=e.v,s=0|l[O];i=_t(e,s)?1:i,a=!!a||i===3,i===2&&Ya(e)&&(l=e.v,s=0|l[O]);let r=(e=bc(l,t))===Ji?7:0|e[O],o=xc(r,s);var c=!(4&o);if(c){4&o&&(e=hn(e),r=0,o=aa(o,s),s=He(l,s,t,e));let f=0,h=0;for(;f<e.length;f++){const d=n(e[f]);d!=null&&(e[h++]=d)}h<f&&(e.length=h),n=-513&(4|o),o=n&=-1025,o&=-4097}return o!==r&&(Ge(e,o),2&o&&Object.freeze(e)),W1(e,o,l,s,t,i,c,a)}function W1(e,t,n,i,a,l,s,r){let o=t;return l===1||l===4&&(2&t||!(16&t)&&32&i)?ia(t)||((t|=!e.length||s&&!(4096&t)||32&i&&!(4096&t||16&t)?2:256)!==o&&Ge(e,t),Object.freeze(e)):(l===2&&ia(t)&&(e=hn(e),o=0,t=aa(t,i),i=He(n,i,a,e)),ia(t)||(r||(t|=16),t!==o&&Ge(e,t))),2&t||!(4096&t||16&t)||ea(n,i),e}function bc(e,t,n){return e=Rn(e,t,n),Array.isArray(e)?e:Ji}function xc(e,t){return 2&t&&(e|=2),1|e}function ia(e){return!!(2&e)&&!!(4&e)||!!(256&e)}function P1(e){return lc(e,!0)}function $1(e){e=hn(e);for(let t=0;t<e.length;t++){const n=e[t]=hn(e[t]);Array.isArray(n[1])&&(n[1]=ss(n[1]))}return rs(e)}function di(e,t,n,i){Xa(e),He(e=e.v,0|e[O],t,(i==="0"?Number(n)===0:n===i)?void 0:n)}function Qa(e,t,n){if(2&t)throw Error();const i=Ga(t);let a=bc(e,n,i),l=a===Ji?7:0|a[O],s=xc(l,t);return(2&s||ia(s)||16&s)&&(s===l||ia(s)||Ge(a,s),a=hn(a),l=0,s=aa(s,t),He(e,t,n,a,i)),s&=-13,s!==l&&Ge(a,s),a}function Sc(e,t){var n=l0;return _c(Ec(e=e.v),e,void 0,n)===t?t:-1}function Ec(e){if(Ua)return e[as]??(e[as]=new Map);if(as in e)return e[as];const t=new Map;return Object.defineProperty(e,as,{value:t}),t}function eh(e,t,n,i,a){const l=Ec(e),s=_c(l,e,t,n,a);return s!==i&&(s&&(t=He(e,t,s,void 0,a)),l.set(n,i)),t}function _c(e,t,n,i,a){let l=e.get(i);if(l!=null)return l;l=0;for(let s=0;s<i.length;s++){const r=i[s];Rn(t,r,a)!=null&&(l!==0&&(n=He(t,n,l,void 0,a)),l=r)}return e.set(i,l),l}function Tc(e,t,n){let i=0|e[O];const a=Ga(i),l=Rn(e,n,a);let s;if(l!=null&&l[Ba]===Ra){if(!_t(l))return Ya(l),l.v;s=l.v}else Array.isArray(l)&&(s=l);if(s){const r=0|s[O];2&r&&(s=Fa(s,r))}return s=$i(s,t),s!==l&&He(e,i,n,s,a),s}function th(e,t,n,i,a){let l=!1;if((i=Rn(e,i,a,s=>{const r=hc(s,n,!1,t);return l=r!==s&&r!=null,r}))!=null)return l&&!_t(i)&&ea(e,t),i}function I(e,t,n,i){let a=e.v,l=0|a[O];if((t=th(a,l,t,n,i))==null)return t;if(l=0|a[O],!_t(e,l)){const s=pc(t);s!==t&&(Ya(e)&&(a=e.v,l=0|a[O]),l=He(a,l,n,t=s,i),ea(a,l))}return t}function nh(e,t,n,i,a,l,s,r){var o=_t(e,n);l=o?1:l,s=!!s||l===3,o=r&&!o,(l===2||o)&&Ya(e)&&(n=0|(t=e.v)[O]);var c=(e=bc(t,a))===Ji?7:0|e[O],f=xc(c,n);if(r=!(4&f)){var h=e,d=n;const m=!!(2&f);m&&(d|=2);let v=!m,x=!0,E=0,g=0;for(;E<h.length;E++){const w=hc(h[E],i,!1,d);if(w instanceof i){if(!m){const p=_t(w);v&&(v=!p),x&&(x=p)}h[g++]=w}}g<E&&(h.length=g),f|=4,f=x?-4097&f:4096|f,f=v?8|f:-9&f}if(f!==c&&(Ge(e,f),2&f&&Object.freeze(e)),o&&!(8&f||!e.length&&(l===1||l===4&&(2&f||!(16&f)&&32&n)))){for(ia(f)&&(e=hn(e),f=aa(f,n),n=He(t,n,a,e)),i=e,o=f,c=0;c<i.length;c++)(h=i[c])!==(f=pc(h))&&(i[c]=f);o|=8,Ge(e,f=o=i.length?4096|o:-4097&o)}return W1(e,f,t,n,a,l,r,s)}function Gn(e,t,n){const i=e.v;return nh(e,i,0|i[O],t,n,ta(),!1,!0)}function ih(e){return e==null&&(e=void 0),e}function U(e,t,n,i,a){return ne(e,n,i=ih(i),a),i&&!_t(i)&&ea(e.v),e}function gs(e,t,n,i){e:{var a=i=ih(i);Xa(e);const l=e.v;let s=0|l[O];if(a==null){const r=Ec(l);if(_c(r,l,s,n)!==t)break e;r.set(n,0)}else s=eh(l,s,n,t);He(l,s,t,a)}i&&!_t(i)&&ea(e.v)}function aa(e,t){return-273&(2&t?2|e:-3&e)}function Ac(e,t,n,i){var a=i;Xa(e),e=nh(e,i=e.v,0|i[O],n,t,2,!0),a=a??new n,e.push(a),t=n=e===Ji?7:0|e[O],(a=_t(a))?(n&=-9,e.length===1&&(n&=-4097)):n|=4096,n!==t&&Ge(e,n),a||ea(i)}function Zt(e,t,n){return qa(de(e,t,void 0,n))}function ah(e){return(ec?de(e,2,void 0,void 0,kr):kr(de(e,2)))??p5}function Te(e,t){return de(e,t,void 0,void 0,_n)??0}function Hn(e,t,n){if(n!=null){if(typeof n!="number"||!zr(n))throw ic("int32");n|=0}ne(e,t,n)}function L(e,t,n){ne(e,t,cs(n))}function At(e,t,n){di(e,t,hs(n),"")}function Rr(e,t,n){{Xa(e);const s=e.v;let r=0|s[O];if(n==null)He(s,r,t);else{var i=e=n===Ji?7:0|n[O],a=ia(e),l=a||Object.isFrozen(n);for(a||(e=0),l||(n=hn(n),i=0,e=aa(e,r),l=!1),e|=5,e|=(4&e?512&e?512:1024&e?1024:0:void 0)??(ec?1024:0),a=0;a<n.length;a++){const o=n[a],c=Y1(o);Object.is(o,c)||(l&&(n=hn(n),i=0,e=aa(e,r),l=!1),n[a]=c)}e!==i&&(l&&(n=hn(n),e=aa(e,r)),Ge(n,e)),He(s,r,t,n)}}}function Gr(e,t,n){Xa(e),na(e,t,We,2,!0).push(Y1(n))}var Za=class{constructor(e,t,n){if(this.buffer=e,n&&!t)throw Error();this.g=t}};function Nc(e,t){if(typeof e=="string")return new Za(S1(e),t);if(Array.isArray(e))return new Za(new Uint8Array(e),t);if(e.constructor===Uint8Array)return new Za(e,!1);if(e.constructor===ArrayBuffer)return e=new Uint8Array(e),new Za(e,!1);if(e.constructor===Sn)return t=nc(e)||new Uint8Array(0),new Za(t,!0,e);if(e instanceof Uint8Array)return e=e.constructor===Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Za(e,!1);throw Error()}function Ka(e,t){let n,i=0,a=0,l=0;const s=e.h;let r=e.g;do n=s[r++],i|=(127&n)<<l,l+=7;while(l<32&&128&n);if(l>32)for(a|=(127&n)>>4,l=3;l<32&&128&n;l+=7)n=s[r++],a|=(127&n)<<l;if(la(e,r),!(128&n))return t(i>>>0,a>>>0);throw Error()}function jc(e){let t=0,n=e.g;const i=n+10,a=e.h;for(;n<i;){const l=a[n++];if(t|=l,(128&l)==0)return la(e,n),!!(127&t)}throw Error()}function hi(e){const t=e.h;let n=e.g,i=t[n++],a=127&i;if(128&i&&(i=t[n++],a|=(127&i)<<7,128&i&&(i=t[n++],a|=(127&i)<<14,128&i&&(i=t[n++],a|=(127&i)<<21,128&i&&(i=t[n++],a|=i<<28,128&i&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++])))))throw Error();return la(e,n),a}function Vn(e){return hi(e)>>>0}function Hr(e){var t=e.h;const n=e.g;var i=t[n],a=t[n+1];const l=t[n+2];return t=t[n+3],la(e,e.g+4),e=2*((a=(i<<0|a<<8|l<<16|t<<24)>>>0)>>31)+1,i=a>>>23&255,a&=8388607,i==255?a?NaN:e*(1/0):i==0?1401298464324817e-60*e*a:e*Math.pow(2,i-150)*(a+8388608)}function v5(e){return hi(e)}function la(e,t){if(e.g=t,t>e.l)throw Error()}function lh(e,t){if(t<0)throw Error();const n=e.g;if((t=n+t)>e.l)throw Error();return e.g=t,n}function sh(e,t){if(t==0)return Ii();var n=lh(e,t);return e.Y&&e.j?n=e.h.subarray(n,n+t):(e=e.h,n=n===(t=n+t)?new Uint8Array(0):P6?e.slice(n,t):new Uint8Array(e.subarray(n,t))),n.length==0?Ii():new Sn(n,za)}var rh=[];function uh(e,t,n,i){if(Fr.length){const a=Fr.pop();return a.o(i),a.g.init(e,t,n,i),a}return new b5(e,t,n,i)}function oh(e){e.g.clear(),e.l=-1,e.h=-1,Fr.length<100&&Fr.push(e)}function ch(e){var t=e.g;if(t.g==t.l)return!1;e.m=e.g.g;var n=Vn(e.g);if(t=n>>>3,!((n&=7)>=0&&n<=5)||t<1)throw Error();return e.l=t,e.h=n,!0}function Vr(e){switch(e.h){case 0:e.h!=0?Vr(e):jc(e.g);break;case 1:la(e=e.g,e.g+8);break;case 2:if(e.h!=2)Vr(e);else{var t=Vn(e.g);la(e=e.g,e.g+t)}break;case 5:la(e=e.g,e.g+4);break;case 3:for(t=e.l;;){if(!ch(e))throw Error();if(e.h==4){if(e.l!=t)throw Error();break}Vr(e)}break;default:throw Error()}}function ws(e,t,n){const i=e.g.l;var a=Vn(e.g);let l=(a=e.g.g+a)-i;if(l<=0&&(e.g.l=a,n(t,e,void 0,void 0,void 0),l=a-e.g.g),l)throw Error();return e.g.g=a,e.g.l=i,t}function Mc(e){var t=Vn(e.g),n=lh(e=e.g,t);if(e=e.h,D6){var i,a=e;(i=Wo)||(i=Wo=new TextDecoder("utf-8",{fatal:!0})),t=n+t,a=n===0&&t===a.length?a:a.subarray(n,t);try{var l=i.decode(a)}catch(r){if(jr===void 0){try{i.decode(new Uint8Array([128]))}catch{}try{i.decode(new Uint8Array([97])),jr=!0}catch{jr=!1}}throw!jr&&(Wo=void 0),r}}else{t=(l=n)+t,n=[];let r,o=null;for(;l<t;){var s=e[l++];s<128?n.push(s):s<224?l>=t?Ki():(r=e[l++],s<194||(192&r)!=128?(l--,Ki()):n.push((31&s)<<6|63&r)):s<240?l>=t-1?Ki():(r=e[l++],(192&r)!=128||s===224&&r<160||s===237&&r>=160||(192&(i=e[l++]))!=128?(l--,Ki()):n.push((15&s)<<12|(63&r)<<6|63&i)):s<=244?l>=t-2?Ki():(r=e[l++],(192&r)!=128||r-144+(s<<28)>>30||(192&(i=e[l++]))!=128||(192&(a=e[l++]))!=128?(l--,Ki()):(s=(7&s)<<18|(63&r)<<12|(63&i)<<6|63&a,s-=65536,n.push(55296+(s>>10&1023),56320+(1023&s)))):Ki(),n.length>=8192&&(o=d1(o,n),n.length=0)}l=d1(o,n)}return l}function fh(e){const t=Vn(e.g);return sh(e.g,t)}function qr(e,t,n){var i=Vn(e.g);for(i=e.g.g+i;e.g.g<i;)n.push(t(e.g))}var b5=class{constructor(e,t,n,i){if(rh.length){const a=rh.pop();a.init(e,t,n,i),e=a}else e=new class{constructor(a,l,s,r){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.init(a,l,s,r)}init(a,l,s,{Y:r=!1,ea:o=!1}={}){this.Y=r,this.ea=o,a&&(a=Nc(a,this.ea),this.h=a.buffer,this.j=a.g,this.m=l||0,this.l=s!==void 0?this.m+s:this.h.length,this.g=this.m)}clear(){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.Y=!1}}(e,t,n,i);this.g=e,this.m=this.g.g,this.h=this.l=-1,this.o(i)}o({ha:e=!1}={}){this.ha=e}},Fr=[];function dh(e){return e?/^\d+$/.test(e)?(Or(e),new Cc(we,De)):null:x5||(x5=new Cc(0,0))}var Cc=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let x5;function hh(e){return e?/^-?\d+$/.test(e)?(Or(e),new Dc(we,De)):null:S5||(S5=new Dc(0,0))}var Dc=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let S5;function Ia(e,t,n){for(;n>0||t>127;)e.g.push(127&t|128),t=(t>>>7|n<<25)>>>0,n>>>=7;e.g.push(t)}function Ja(e,t){for(;t>127;)e.g.push(127&t|128),t>>>=7;e.g.push(t)}function Yr(e,t){if(t>=0)Ja(e,t);else{for(let n=0;n<9;n++)e.g.push(127&t|128),t>>=7;e.g.push(1)}}function Oc(e){var t=we;e.g.push(t>>>0&255),e.g.push(t>>>8&255),e.g.push(t>>>16&255),e.g.push(t>>>24&255)}function Wa(e,t){t.length!==0&&(e.l.push(t),e.h+=t.length)}function Kt(e,t,n){Ja(e.g,8*t+n)}function zc(e,t){return Kt(e,t,2),t=e.g.end(),Wa(e,t),t.push(e.h),t}function kc(e,t){var n=t.pop();for(n=e.h+e.g.length()-n;n>127;)t.push(127&n|128),n>>>=7,e.h++;t.push(n),e.h++}function Xr(e,t,n){Kt(e,t,2),Ja(e.g,n.length),Wa(e,e.g.end()),Wa(e,n)}function Qr(e,t,n,i){n!=null&&(t=zc(e,t),i(n,e),kc(e,t))}function Tn(){const e=class{constructor(){throw Error()}};return Object.setPrototypeOf(e,e.prototype),e}var Lc=Tn(),mh=Tn(),Uc=Tn(),Bc=Tn(),gh=Tn(),wh=Tn(),E5=Tn(),Zr=Tn(),yh=Tn(),ph=Tn();function An(e,t,n){var i=e.v;Et&&Et in i&&(i=i[Et])&&delete i[t.g],t.h?t.j(e,t.h,t.g,n,t.l):t.j(e,t.g,n,t.l)}var z=class{constructor(e,t){this.v=K1(e,t,void 0,2048)}toJSON(){return Z1(this)}j(){var a;var e=ly,t=this.v,n=e.g,i=Et;if(Ua&&i&&((a=t[i])==null?void 0:a[n])!=null&&ka(q6,3),t=e.g,A1&&Et&&A1===void 0&&(i=(n=this.v)[Et])&&(i=i.da))try{i(n,t,d5)}catch(l){m1(l)}return e.h?e.m(this,e.h,e.g,e.l):e.m(this,e.g,e.defaultValue,e.l)}clone(){const e=this.v,t=0|e[O];return vc(this,e,t)?yc(this,e,!0):new this.constructor(Fa(e,t,!1))}};z.prototype[Ba]=Ra,z.prototype.toString=function(){return this.v.toString()};var Pa=class{constructor(e,t,n){this.g=e,this.h=t,e=Lc,this.l=!!e&&n===e||!1}};function Kr(e,t){return new Pa(e,t,Lc)}function vh(e,t,n,i,a){Qr(e,n,Th(t,i),a)}const _5=Kr(function(e,t,n,i,a){return e.h===2&&(ws(e,Tc(t,i,n),a),!0)},vh),T5=Kr(function(e,t,n,i,a){return e.h===2&&(ws(e,Tc(t,i,n),a),!0)},vh);var Ir=Symbol(),Jr=Symbol(),Rc=Symbol(),bh=Symbol(),xh=Symbol();let Sh,Eh;function sa(e,t,n,i){var a=i[e];if(a)return a;(a={}).qa=i,a.T=function(h){switch(typeof h){case"boolean":return g5||(g5=[0,void 0,!0]);case"number":return h>0?void 0:h===0?w5||(w5=[0,void 0]):[-h,void 0];case"string":return[0,h];case"object":return h}}(i[0]);var l=i[1];let s=1;l&&l.constructor===Object&&(a.ba=l,typeof(l=i[++s])=="function"&&(a.ma=!0,Sh??(Sh=l),Eh??(Eh=i[s+1]),l=i[s+=2]));const r={};for(;l&&Array.isArray(l)&&l.length&&typeof l[0]=="number"&&l[0]>0;){for(var o=0;o<l.length;o++)r[l[o]]=l;l=i[++s]}for(o=1;l!==void 0;){let h;typeof l=="number"&&(o+=l,l=i[++s]);var c=void 0;if(l instanceof Pa?h=l:(h=_5,s--),h==null?void 0:h.l){l=i[++s],c=i;var f=s;typeof l=="function"&&(l=l(),c[f]=l),c=l}for(f=o+1,typeof(l=i[++s])=="number"&&l<0&&(f-=l,l=i[++s]);o<f;o++){const d=r[o];c?n(a,o,h,c,d):t(a,o,h,d)}}return i[e]=a}function _h(e){return Array.isArray(e)?e[0]instanceof Pa?e:[T5,e]:[e,void 0]}function Th(e,t){return e instanceof z?e.v:Array.isArray(e)?$i(e,t):void 0}function Gc(e,t,n,i){const a=n.g;e[t]=i?(l,s,r)=>a(l,s,r,i):a}function Hc(e,t,n,i,a){const l=n.g;let s,r;e[t]=(o,c,f)=>l(o,c,f,r||(r=sa(Jr,Gc,Hc,i).T),s||(s=Vc(i)),a)}function Vc(e){let t=e[Rc];if(t!=null)return t;const n=sa(Jr,Gc,Hc,e);return t=n.ma?(i,a)=>Sh(i,a,n):(i,a)=>{for(;ch(a)&&a.h!=4;){var l=a.l,s=n[l];if(s==null){var r=n.ba;r&&(r=r[l])&&(r=N5(r))!=null&&(s=n[l]=r)}if(s==null||!s(a,i,l)){if(s=(r=a).m,Vr(r),r.ha)var o=void 0;else o=r.g.g-s,r.g.g=s,o=sh(r.g,o);s=void 0,r=i,o&&((s=r[Et]??(r[Et]=new wc))[l]??(s[l]=[])).push(o)}}return(i=Lr(i))&&(i.da=n.qa[xh]),!0},e[Rc]=t,e[xh]=A5.bind(e),t}function A5(e,t,n,i){var a=this[Jr];const l=this[Rc],s=$i(void 0,a.T),r=Lr(e);if(r){var o=!1,c=a.ba;if(c){if(a=(f,h,d)=>{if(d.length!==0)if(c[h])for(const m of d){f=uh(m);try{o=!0,l(s,f)}finally{oh(f)}}else i==null||i(e,h,d)},t==null)Ur(r,a);else if(r!=null){const f=r[t];f&&a(r,t,f)}if(o){let f=0|e[O];if(2&f&&2048&f&&!(n!=null&&n.Ka))throw Error();const h=Ga(f),d=(m,v)=>{if(Rn(e,m,h)!=null){if((n==null?void 0:n.Qa)===1)return;throw Error()}v!=null&&(f=He(e,f,m,v,h)),delete r[m]};t==null?D1(s,0|s[O],(m,v)=>{d(m,v)}):d(t,Rn(s,t,h))}}}}function N5(e){const t=(e=_h(e))[0].g;if(e=e[1]){const n=Vc(e),i=sa(Jr,Gc,Hc,e).T;return(a,l,s)=>t(a,l,s,i,n)}return t}function Wr(e,t,n){e[t]=n.h}function Pr(e,t,n,i){let a,l;const s=n.h;e[t]=(r,o,c)=>s(r,o,c,l||(l=sa(Ir,Wr,Pr,i).T),a||(a=Ah(i)))}function Ah(e){let t=e[bh];if(!t){const n=sa(Ir,Wr,Pr,e);t=(i,a)=>Nh(i,a,n),e[bh]=t}return t}function Nh(e,t,n){D1(e,0|e[O],(i,a)=>{if(a!=null){var l=function(s,r){var o=s[r];if(o)return o;if((o=s.ba)&&(o=o[r])){var c=(o=_h(o))[0].h;if(o=o[1]){const f=Ah(o),h=sa(Ir,Wr,Pr,o).T;o=s.ma?Eh(h,f):(d,m,v)=>c(d,m,v,h,f)}else o=c;return s[r]=o}}(n,i);l?l(t,a,i):i<500||ka(ac,3)}}),(e=Lr(e))&&Ur(e,(i,a,l)=>{for(Wa(t,t.g.end()),i=0;i<l.length;i++)Wa(t,nc(l[i])||new Uint8Array(0))})}const j5=Tt(0);function $a(e,t){if(Array.isArray(t)){var n=0|t[O];if(4&n)return t;for(var i=0,a=0;i<t.length;i++){const l=e(t[i]);l!=null&&(t[a++]=l)}return a<i&&(t.length=a),(e=-1537&(5|n))!==n&&Ge(t,e),2&e&&Object.freeze(t),t}}function lt(e,t,n){return new Pa(e,t,n)}function el(e,t,n){return new Pa(e,t,n)}function Ye(e,t,n){He(e,0|e[O],t,n,Ga(0|e[O]))}var M5=Kr(function(e,t,n,i,a){if(e.h!==2)return!1;if(e=hn(e=ws(e,$i([void 0,void 0],i),a)),a=Ga(i=0|t[O]),2&i)throw Error();let l=Rn(t,n,a);if(l instanceof Bn)2&l.J?(l=l.V(),l.push(e),He(t,i,n,l,a)):l.Ma(e);else if(Array.isArray(l)){var s=0|l[O];8192&s||Ge(l,s|=8192),2&s&&(l=$1(l),He(t,i,n,l,a)),l.push(e)}else He(t,i,n,rs([e]),a);return!0},function(e,t,n,i,a){if(t instanceof Bn)t.forEach((l,s)=>{Qr(e,n,$i([s,l],i),a)});else if(Array.isArray(t)){for(let l=0;l<t.length;l++){const s=t[l];Array.isArray(s)&&Qr(e,n,$i(s,i),a)}rs(t)}});function jh(e,t,n){(t=_n(t))!=null&&(Kt(e,n,5),e=e.g,rc(t),Oc(e))}function Mh(e,t,n){if(t=function(i){if(i==null)return i;const a=typeof i;if(a==="bigint")return String(os(64,i));if(ds(i)){if(a==="string")return V1(i);if(a==="number")return dc(i)}}(t),t!=null&&(typeof t=="string"&&hh(t),t!=null))switch(Kt(e,n,0),typeof t){case"number":e=e.g,Ha(t),Ia(e,we,De);break;case"bigint":n=BigInt.asUintN(64,t),n=new Dc(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ia(e.g,n.h,n.g);break;default:n=hh(t),Ia(e.g,n.h,n.g)}}function Ch(e,t,n){(t=qa(t))!=null&&t!=null&&(Kt(e,n,0),Yr(e.g,t))}function Dh(e,t,n){(t=R1(t))!=null&&(Kt(e,n,0),e.g.g.push(t?1:0))}function Oh(e,t,n){(t=We(t))!=null&&Xr(e,n,h1(t))}function zh(e,t,n,i,a){Qr(e,n,Th(t,i),a)}function kh(e,t,n){(t=t==null||typeof t=="string"||t instanceof Sn?t:void 0)!=null&&Xr(e,n,Nc(t,!0).buffer)}function Lh(e,t,n){return(e.h===5||e.h===2)&&(t=Qa(t,0|t[O],n),e.h==2?qr(e,Hr,t):t.push(Hr(e.g)),!0)}var Oe=lt(function(e,t,n){return e.h===5&&(Ye(t,n,Hr(e.g)),!0)},jh,Zr),C5=el(Lh,function(e,t,n){if((t=$a(_n,t))!=null)for(let s=0;s<t.length;s++){var i=e,a=n,l=t[s];l!=null&&(Kt(i,a,5),i=i.g,rc(l),Oc(i))}},Zr),qc=el(Lh,function(e,t,n){if((t=$a(_n,t))!=null&&t.length){Kt(e,n,2),Ja(e.g,4*t.length);for(let i=0;i<t.length;i++)n=e.g,rc(t[i]),Oc(n)}},Zr),D5=lt(function(e,t,n){return e.h===5&&(Ye(t,n,(e=Hr(e.g))===0?void 0:e),!0)},jh,Zr),mi=lt(function(e,t,n){return $o?(e.h!==0?e=!1:(Ye(t,n,Ka(e.g,U1)),e=!0),e):e.h===0&&(Ye(t,n,Ka(e.g,oc)),!0)},Mh,wh),Fc=lt(function(e,t,n){return $o?(e.h!==0?t=!1:(Ye(t,n,(e=Ka(e.g,U1))===j5?void 0:e),t=!0),t):e.h===0&&(Ye(t,n,(e=Ka(e.g,oc))===0?void 0:e),!0)},Mh,wh),O5=lt(function(e,t,n){return $o?(e.h!==0?e=!1:(Ye(t,n,Ka(e.g,e5)),e=!0),e):e.h===0&&(Ye(t,n,Ka(e.g,uc)),!0)},function(e,t,n){if(t=function(i){if(i==null)return i;var a=typeof i;if(a==="bigint")return String(t5(64,i));if(ds(i)){if(a==="string")return a=Va(Number(i)),Pi(a)&&a>=0?i=String(a):((a=i.indexOf("."))!==-1&&(i=i.substring(0,a)),(a=i[0]!=="-"&&((a=i.length)<20||a===20&&i<="18446744073709551615"))||(Or(i),i=us(we,De))),i;if(a==="number")return(i=Va(i))>=0&&Pi(i)||(Ha(i),i=uc(we,De)),i}}(t),t!=null&&(typeof t=="string"&&dh(t),t!=null))switch(Kt(e,n,0),typeof t){case"number":e=e.g,Ha(t),Ia(e,we,De);break;case"bigint":n=BigInt.asUintN(64,t),n=new Cc(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ia(e.g,n.h,n.g);break;default:n=dh(t),Ia(e.g,n.h,n.g)}},E5),Xe=lt(function(e,t,n){return e.h===0&&(Ye(t,n,hi(e.g)),!0)},Ch,Bc),ys=el(function(e,t,n){return(e.h===0||e.h===2)&&(t=Qa(t,0|t[O],n),e.h==2?qr(e,hi,t):t.push(hi(e.g)),!0)},function(e,t,n){if((t=$a(qa,t))!=null&&t.length){n=zc(e,n);for(let i=0;i<t.length;i++)Yr(e.g,t[i]);kc(e,n)}},Bc),tl=lt(function(e,t,n){return e.h===0&&(Ye(t,n,(e=hi(e.g))===0?void 0:e),!0)},Ch,Bc),Ae=lt(function(e,t,n){return e.h===0&&(Ye(t,n,jc(e.g)),!0)},Dh,mh),ra=lt(function(e,t,n){return e.h===0&&(Ye(t,n,(e=jc(e.g))===!1?void 0:e),!0)},Dh,mh),at=el(function(e,t,n){return e.h===2&&(e=Mc(e),Qa(t,0|t[O],n).push(e),!0)},function(e,t,n){if((t=$a(We,t))!=null)for(let s=0;s<t.length;s++){var i=e,a=n,l=t[s];l!=null&&Xr(i,a,h1(l))}},Uc),gi=lt(function(e,t,n){return e.h===2&&(Ye(t,n,(e=Mc(e))===""?void 0:e),!0)},Oh,Uc),re=lt(function(e,t,n){return e.h===2&&(Ye(t,n,Mc(e)),!0)},Oh,Uc),Qe=function(e,t,n=Lc){return new Pa(e,t,n)}(function(e,t,n,i,a){return e.h===2&&(i=$i(void 0,i),Qa(t,0|t[O],n).push(i),ws(e,i,a),!0)},function(e,t,n,i,a){if(Array.isArray(t)){for(let l=0;l<t.length;l++)zh(e,t[l],n,i,a);1&(e=0|t[O])||Ge(t,1|e)}}),Ne=Kr(function(e,t,n,i,a,l){if(e.h!==2)return!1;let s=0|t[O];return eh(t,s,l,n,Ga(s)),ws(e,t=Tc(t,i,n),a),!0},zh),Uh=lt(function(e,t,n){return e.h===2&&(Ye(t,n,fh(e)),!0)},kh,yh),z5=el(function(e,t,n){return(e.h===0||e.h===2)&&(t=Qa(t,0|t[O],n),e.h==2?qr(e,Vn,t):t.push(Vn(e.g)),!0)},function(e,t,n){if((t=$a(G1,t))!=null)for(let s=0;s<t.length;s++){var i=e,a=n,l=t[s];l!=null&&(Kt(i,a,0),Ja(i.g,l))}},gh),k5=lt(function(e,t,n){return e.h===0&&(Ye(t,n,(e=Vn(e.g))===0?void 0:e),!0)},function(e,t,n){(t=G1(t))!=null&&t!=null&&(Kt(e,n,0),Ja(e.g,t))},gh),Nt=lt(function(e,t,n){return e.h===0&&(Ye(t,n,hi(e.g)),!0)},function(e,t,n){(t=qa(t))!=null&&(t=parseInt(t,10),Kt(e,n,0),Yr(e.g,t))},ph);class L5{constructor(t,n){var i=jt;this.g=t,this.h=n,this.m=I,this.j=U,this.defaultValue=void 0,this.l=i.Oa!=null?O1:void 0}register(){Mr(this)}}function Nn(e,t){return new L5(e,t)}function wi(e,t){return(n,i)=>{{const l={ea:!0};i&&Object.assign(l,i),n=uh(n,void 0,void 0,l);try{const s=new e,r=s.v;Vc(t)(r,n);var a=s}finally{oh(n)}}return a}}function $r(e){return function(){const t=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const s=this.g;return this.g=[],s}}}};Nh(this.v,t,sa(Ir,Wr,Pr,e)),Wa(t,t.g.end());const n=new Uint8Array(t.h),i=t.l,a=i.length;let l=0;for(let s=0;s<a;s++){const r=i[s];n.set(r,l),l+=r.length}return t.l=[n],n}}var Bh=class extends z{constructor(e){super(e)}},Rh=[0,gi,lt(function(e,t,n){return e.h===2&&(Ye(t,n,(e=fh(e))===Ii()?void 0:e),!0)},function(e,t,n){if(t!=null){if(t instanceof z){const i=t.Ra;return void(i?(t=i(t),t!=null&&Xr(e,n,Nc(t,!0).buffer)):ka(ac,3))}if(Array.isArray(t))return void ka(ac,3)}kh(e,t,n)},yh)];let Yc,Gh=globalThis.trustedTypes;function Hh(e){var t;return Yc===void 0&&(Yc=function(){let n=null;if(!Gh)return n;try{const i=a=>a;n=Gh.createPolicy("goog#html",{createHTML:i,createScript:i,createScriptURL:i})}catch{}return n}()),e=(t=Yc)?t.createScriptURL(e):e,new class{constructor(n){this.g=n}toString(){return this.g+""}}(e)}function U5(e,...t){if(t.length===0)return Hh(e[0]);let n=e[0];for(let i=0;i<t.length;i++)n+=encodeURIComponent(t[i])+e[i+1];return Hh(n)}var Vh=[0,Xe,Nt,Ae,-1,ys,Nt,-1,Ae],B5=class extends z{constructor(e){super(e)}},qh=[0,Ae,re,Ae,Nt,-1,el(function(e,t,n){return(e.h===0||e.h===2)&&(t=Qa(t,0|t[O],n),e.h==2?qr(e,v5,t):t.push(hi(e.g)),!0)},function(e,t,n){if((t=$a(qa,t))!=null&&t.length){n=zc(e,n);for(let i=0;i<t.length;i++)Yr(e.g,t[i]);kc(e,n)}},ph),re,-1,[0,Ae,-1],Nt,Ae,-1],Fh=[0,3,Ae,-1,2,[0,Xe],[0,Nt,Ae],[0,re,-1],[0]],Yh=[0,re,-2],Xh=class extends z{constructor(e){super(e)}},Qh=[0],Zh=[0,Xe,Ae,1,Ae,-4],jt=class extends z{constructor(e){super(e,2)}},Ve={};Ve[336783863]=[0,re,Ae,-1,Xe,[0,[1,2,3,4,5,6,7,8,9],Ne,Qh,Ne,qh,Ne,Yh,Ne,Zh,Ne,Vh,Ne,[0,re,-2],Ne,[0,re,Nt],Ne,Fh,Ne,[0,Nt,-1,Ae]],[0,re],Ae,[0,[1,3],[2,4],Ne,[0,ys],-1,Ne,[0,at],-1,Qe,[0,re,-1]],re];var Kh=[0,Fc,-1,ra,-3,Fc,ys,gi,tl,Fc,-1,ra,tl,ra,-2,gi];function he(e,t){Gr(e,3,t)}function Q(e,t){Gr(e,4,t)}var dt=class extends z{constructor(e){super(e,500)}o(e){return U(this,0,7,e)}},ps=[-1,{}],Ih=[0,re,1,ps],Jh=[0,re,at,ps];function It(e,t){Ac(e,1,dt,t)}function ye(e,t){Gr(e,10,t)}function J(e,t){Gr(e,15,t)}var Mt=class extends z{constructor(e){super(e,500)}o(e){return U(this,0,1001,e)}},Wh=[-500,Qe,[-500,gi,-1,at,-3,[-2,Ve,Ae],Qe,Rh,tl,-1,Ih,Jh,Qe,[0,gi,ra],gi,Kh,tl,at,987,at],4,Qe,[-500,re,-1,[-1,{}],998,re],Qe,[-500,re,at,-1,[-2,{},Ae],997,at,-1],tl,Qe,[-500,re,at,ps,998,at],at,tl,Ih,Jh,Qe,[0,gi,-1,ps],at,-2,Kh,gi,-1,ra,[0,ra,k5],978,ps,Qe,Rh];Mt.prototype.g=$r(Wh);var R5=wi(Mt,Wh),G5=class extends z{constructor(e){super(e)}},Ph=class extends z{constructor(e){super(e)}g(){return Gn(this,G5,1)}},$h=[0,Qe,[0,Xe,Oe,re,-1]],eu=wi(Ph,$h),H5=class extends z{constructor(e){super(e)}},V5=class extends z{constructor(e){super(e)}},Xc=class extends z{constructor(e){super(e)}l(){return I(this,H5,2)}g(){return Gn(this,V5,5)}},e0=wi(class extends z{constructor(e){super(e)}},[0,at,ys,qc,[0,Nt,[0,Xe,-3],[0,Oe,-3],[0,Xe,-1,[0,Qe,[0,Xe,-2]]],Qe,[0,Oe,-1,re,Oe]],re,-1,mi,Qe,[0,Xe,Oe],at,mi]),t0=class extends z{constructor(e){super(e)}},nl=wi(class extends z{constructor(e){super(e)}},[0,Qe,[0,Oe,-4]]),n0=class extends z{constructor(e){super(e)}},vs=wi(class extends z{constructor(e){super(e)}},[0,Qe,[0,Oe,-4]]),q5=class extends z{constructor(e){super(e)}},F5=[0,Xe,-1,qc,Nt],i0=class extends z{constructor(e){super(e)}};i0.prototype.g=$r([0,Oe,-4,mi]);var Y5=class extends z{constructor(e){super(e)}},X5=wi(class extends z{constructor(e){super(e)}},[0,Qe,[0,1,Xe,re,$h],mi]),a0=class extends z{constructor(e){super(e)}},Q5=class extends z{constructor(e){super(e)}na(){const e=de(this,1,void 0,void 0,P1);return e??Ii()}},Z5=class extends z{constructor(e){super(e)}},l0=[1,2],K5=wi(class extends z{constructor(e){super(e)}},[0,Qe,[0,l0,Ne,[0,qc],Ne,[0,Uh],Xe,re],mi]),Qc=class extends z{constructor(e){super(e)}},s0=[0,re,Xe,Oe,at,-1],r0=class extends z{constructor(e){super(e)}},I5=[0,Ae,-1],u0=class extends z{constructor(e){super(e)}},tu=[1,2,3,4,5,6],nu=class extends z{constructor(e){super(e)}g(){return de(this,1,void 0,void 0,P1)!=null}l(){return We(de(this,2))!=null}},ve=class extends z{constructor(e){super(e)}g(){return R1(de(this,2))??!1}},o0=[0,Uh,re,[0,Xe,mi,-1],[0,O5,mi]],ze=[0,o0,Ae,[0,tu,Ne,Zh,Ne,qh,Ne,Vh,Ne,Qh,Ne,Yh,Ne,Fh],Nt],iu=class extends z{constructor(e){super(e)}},Zc=[0,ze,Oe,-1,Xe],J5=Nn(502141897,iu);Ve[502141897]=Zc;var W5=wi(class extends z{constructor(e){super(e)}},[0,[0,Nt,-1,C5,z5],F5]),c0=class extends z{constructor(e){super(e)}},f0=class extends z{constructor(e){super(e)}},Kc=[0,ze,Oe,[0,ze],Ae],P5=Nn(508968150,f0);Ve[508968150]=[0,ze,Zc,Kc,Oe,[0,[0,o0]]],Ve[508968149]=Kc;var il=class extends z{constructor(e){super(e)}l(){return I(this,Qc,2)}g(){ne(this,2)}},d0=[0,ze,s0];Ve[478825465]=d0;var $5=class extends z{constructor(e){super(e)}},h0=class extends z{constructor(e){super(e)}},Ic=class extends z{constructor(e){super(e)}},Jc=class extends z{constructor(e){super(e)}},m0=class extends z{constructor(e){super(e)}},g0=[0,ze,[0,ze],d0,-1],w0=[0,ze,Oe,Xe],Wc=[0,ze,Oe],y0=[0,ze,w0,Wc,Oe],ey=Nn(479097054,m0);Ve[479097054]=[0,ze,y0,g0],Ve[463370452]=g0,Ve[464864288]=w0;var ty=Nn(462713202,Jc);Ve[462713202]=y0,Ve[474472470]=Wc;var ny=class extends z{constructor(e){super(e)}},p0=class extends z{constructor(e){super(e)}},v0=class extends z{constructor(e){super(e)}},b0=class extends z{constructor(e){super(e)}},Pc=[0,ze,Oe,-1,Xe],$c=[0,ze,Oe,Ae];b0.prototype.g=$r([0,ze,Wc,[0,ze],Zc,Kc,Pc,$c]);var x0=class extends z{constructor(e){super(e)}},iy=Nn(456383383,x0);Ve[456383383]=[0,ze,s0];var S0=class extends z{constructor(e){super(e)}},ay=Nn(476348187,S0);Ve[476348187]=[0,ze,I5];var E0=class extends z{constructor(e){super(e)}},_0=class extends z{constructor(e){super(e)}},T0=[0,Nt,-1],ly=Nn(458105876,class extends z{constructor(e){super(e)}g(){let e;var t=this.v;const n=0|t[O];return e=_t(this,n),t=function(i,a,l,s){var r=_0;!s&&Ya(i)&&(l=0|(a=i.v)[O]);var o=Rn(a,2);if(i=!1,o==null){if(s)return Q1();o=[]}else if(o.constructor===Bn){if(!(2&o.J)||s)return o;o=o.V()}else Array.isArray(o)?i=!!(2&(0|o[O])):o=[];if(s){if(!o.length)return Q1();i||(i=!0,ss(o))}else i&&(i=!1,rs(o),o=$1(o));return!i&&32&l&&ls(o,32),l=He(a,l,2,s=new Bn(o,r,l5,void 0)),i||ea(a,l),s}(this,t,n,e),!e&&_0&&(t.ra=!0),t}});Ve[458105876]=[0,T0,M5,[!0,mi,[0,re,-1,at]],[0,ys,Ae,Nt]];var ef=class extends z{constructor(e){super(e)}},A0=Nn(458105758,ef);Ve[458105758]=[0,ze,re,T0];var tf=class extends z{constructor(e){super(e)}},N0=[0,D5,-1,ra],sy=class extends z{constructor(e){super(e)}},j0=class extends z{constructor(e){super(e)}},nf=[1,2];j0.prototype.g=$r([0,nf,Ne,N0,Ne,[0,Qe,N0]]);var M0=class extends z{constructor(e){super(e)}},ry=Nn(443442058,M0);Ve[443442058]=[0,ze,re,Xe,Oe,at,-1,Ae,Oe],Ve[514774813]=Pc;var C0=class extends z{constructor(e){super(e)}},uy=Nn(516587230,C0);function af(e,t){return t=t?t.clone():new Qc,e.displayNamesLocale!==void 0?ne(t,1,hs(e.displayNamesLocale)):e.displayNamesLocale===void 0&&ne(t,1),e.maxResults!==void 0?Hn(t,2,e.maxResults):"maxResults"in e&&ne(t,2),e.scoreThreshold!==void 0?L(t,3,e.scoreThreshold):"scoreThreshold"in e&&ne(t,3),e.categoryAllowlist!==void 0?Rr(t,4,e.categoryAllowlist):"categoryAllowlist"in e&&ne(t,4),e.categoryDenylist!==void 0?Rr(t,5,e.categoryDenylist):"categoryDenylist"in e&&ne(t,5),t}function D0(e){const t=Number(e);return Number.isSafeInteger(t)?t:String(e)}function lf(e,t=-1,n=""){return{categories:e.map(i=>({index:Zt(i,1)??0??-1,score:Te(i,2)??0,categoryName:We(de(i,3))??""??"",displayName:We(de(i,4))??""??""})),headIndex:t,headName:n}}function oy(e){const t={classifications:Gn(e,Y5,1).map(n=>{var i;return lf(((i=I(n,Ph,4))==null?void 0:i.g())??[],Zt(n,2)??0,We(de(n,3))??"")})};return function(n){return a5(ec?de(n,2,void 0,void 0,kr):de(n,2))}(e)!=null&&(t.timestampMs=D0(ah(e))),t}function O0(e){var s,r;var t=na(e,3,_n,ta()),n=na(e,2,qa,ta()),i=na(e,1,We,ta()),a=na(e,9,We,ta());const l={categories:[],keypoints:[]};for(let o=0;o<t.length;o++)l.categories.push({score:t[o],index:n[o]??-1,categoryName:i[o]??"",displayName:a[o]??""});if((t=(s=I(e,Xc,4))==null?void 0:s.l())&&(l.boundingBox={originX:Zt(t,1,fi)??0,originY:Zt(t,2,fi)??0,width:Zt(t,3,fi)??0,height:Zt(t,4,fi)??0,angle:0}),(r=I(e,Xc,4))==null?void 0:r.g().length)for(const o of I(e,Xc,4).g())l.keypoints.push({x:de(o,1,void 0,fi,_n)??0,y:de(o,2,void 0,fi,_n)??0,score:de(o,4,void 0,fi,_n)??0,label:We(de(o,3,void 0,fi))??""});return l}function au(e){const t=[];for(const n of Gn(e,n0,1))t.push({x:Te(n,1)??0,y:Te(n,2)??0,z:Te(n,3)??0,visibility:Te(n,4)??0});return t}function bs(e){const t=[];for(const n of Gn(e,t0,1))t.push({x:Te(n,1)??0,y:Te(n,2)??0,z:Te(n,3)??0,visibility:Te(n,4)??0});return t}function z0(e){return Array.from(e,t=>t>127?t-256:t)}function k0(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);let n=0,i=0,a=0;for(let l=0;l<e.length;l++)n+=e[l]*t[l],i+=e[l]*e[l],a+=t[l]*t[l];if(i<=0||a<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(i*a)}let lu;Ve[516587230]=[0,ze,Pc,$c,Oe],Ve[518928384]=$c;const cy=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function L0(){if(lu===void 0)try{await WebAssembly.instantiate(cy),lu=!0}catch{lu=!1}return lu}async function xs(e,t=U5``){const n=await L0()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${t}/${e}_${n}.js`,wasmBinaryPath:`${t}/${e}_${n}.wasm`}}var ua=class{};function U0(){var e=navigator;return typeof OffscreenCanvas<"u"&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(e)||!!((e=e.userAgent.match(/Version\/([\d]+).*Safari/))&&e.length>=1&&Number(e[1])>=17))}async function B0(e){if(typeof importScripts!="function"){const t=document.createElement("script");return t.src=e.toString(),t.crossOrigin="anonymous",new Promise((n,i)=>{t.addEventListener("load",()=>{n()},!1),t.addEventListener("error",a=>{i(a)},!1),document.body.appendChild(t)})}try{importScripts(e.toString())}catch(t){if(!(t instanceof TypeError))throw t;await self.import(e.toString())}}function R0(e){return e.videoWidth!==void 0?[e.videoWidth,e.videoHeight]:e.naturalWidth!==void 0?[e.naturalWidth,e.naturalHeight]:e.displayWidth!==void 0?[e.displayWidth,e.displayHeight]:[e.width,e.height]}function k(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(t=e.i.stringToNewUTF8(t)),e.i._free(t)}function G0(e,t,n){if(!e.i.canvas)throw Error("No OpenGL canvas configured.");if(n?e.i._bindTextureToStream(n):e.i._bindTextureToCanvas(),!(n=e.i.canvas.getContext("webgl2")||e.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[i,a]=R0(t);return!e.l||i===e.i.canvas.width&&a===e.i.canvas.height||(e.i.canvas.width=i,e.i.canvas.height=a),[i,a]}function H0(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const i=new Uint32Array(t.length);for(let a=0;a<t.length;a++)i[a]=e.i.stringToNewUTF8(t[a]);t=e.i._malloc(4*i.length),e.i.HEAPU32.set(i,t>>2),n(t);for(const a of i)e.i._free(a);e.i._free(t)}function jn(e,t,n){e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=n}function yi(e,t,n){let i=[];e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=(a,l,s)=>{l?(n(i,s),i=[]):i.push(a)}}ua.forVisionTasks=function(e){return xs("vision",e)},ua.forTextTasks=function(e){return xs("text",e)},ua.forGenAiExperimentalTasks=function(e){return xs("genai_experimental",e)},ua.forGenAiTasks=function(e){return xs("genai",e)},ua.forAudioTasks=function(e){return xs("audio",e)},ua.isSimdSupported=function(){return L0()};async function fy(e,t,n,i){return e=await(async(a,l,s,r,o)=>{if(l&&await B0(l),!self.ModuleFactory||s&&(await B0(s),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&o&&((l=self.Module).locateFile=o.locateFile,o.mainScriptUrlOrBlob&&(l.mainScriptUrlOrBlob=o.mainScriptUrlOrBlob)),o=await self.ModuleFactory(self.Module||o),self.ModuleFactory=self.Module=void 0,new a(o,r)})(e,n.wasmLoaderPath,n.assetLoaderPath,t,{locateFile:a=>a.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&a.endsWith(".data")?n.assetBinaryPath.toString():a}),await e.o(i),e}function sf(e,t){const n=I(e.baseOptions,nu,1)||new nu;typeof t=="string"?(ne(n,2,hs(t)),ne(n,1)):t instanceof Uint8Array&&(ne(n,1,lc(t,!1)),ne(n,2)),U(e.baseOptions,0,1,n)}function V0(e){try{const t=e.H.length;if(t===1)throw Error(e.H[0].message);if(t>1)throw Error("Encountered multiple errors: "+e.H.map(n=>n.message).join(", "))}finally{e.H=[]}}function C(e,t){e.C=Math.max(e.C,t)}function su(e,t){e.B=new dt,At(e.B,2,"PassThroughCalculator"),he(e.B,"free_memory"),Q(e.B,"free_memory_unused_out"),ye(t,"free_memory"),It(t,e.B)}function al(e,t){he(e.B,t),Q(e.B,t+"_unused_out")}function ru(e){e.g.addBoolToStream(!0,"free_memory",e.C)}var rf=class{constructor(e){this.g=e,this.H=[],this.C=0,this.g.setAutoRenderToScreen(!1)}l(e,t=!0){var n,i,a,l,s,r;if(t){const o=e.baseOptions||{};if((n=e.baseOptions)!=null&&n.modelAssetBuffer&&((i=e.baseOptions)!=null&&i.modelAssetPath))throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!((a=I(this.baseOptions,nu,1))!=null&&a.g()||(l=I(this.baseOptions,nu,1))!=null&&l.l()||(s=e.baseOptions)!=null&&s.modelAssetBuffer||(r=e.baseOptions)!=null&&r.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(c,f){let h=I(c.baseOptions,u0,3);if(!h){var d=h=new u0,m=new Xh;gs(d,4,tu,m)}"delegate"in f&&(f.delegate==="GPU"?(f=h,d=new B5,gs(f,2,tu,d)):(f=h,d=new Xh,gs(f,4,tu,d))),U(c.baseOptions,0,3,h)}(this,o),o.modelAssetPath)return fetch(o.modelAssetPath.toString()).then(c=>{if(c.ok)return c.arrayBuffer();throw Error(`Failed to fetch model: ${o.modelAssetPath} (${c.status})`)}).then(c=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(c),!0,!1,!1),sf(this,"/model.dat"),this.m(),this.L()});if(o.modelAssetBuffer instanceof Uint8Array)sf(this,o.modelAssetBuffer);else if(o.modelAssetBuffer)return async function(c){const f=[];for(var h=0;;){const{done:d,value:m}=await c.read();if(d)break;f.push(m),h+=m.length}if(f.length===0)return new Uint8Array(0);if(f.length===1)return f[0];c=new Uint8Array(h),h=0;for(const d of f)c.set(d,h),h+=d.length;return c}(o.modelAssetBuffer).then(c=>{sf(this,c),this.m(),this.L()})}return this.m(),this.L(),Promise.resolve()}L(){}ca(){let e;if(this.g.ca(t=>{e=R5(t)}),!e)throw Error("Failed to retrieve CalculatorGraphConfig");return e}setGraph(e,t){this.g.attachErrorListener((n,i)=>{this.H.push(Error(i))}),this.g.Ja(),this.g.setGraph(e,t),this.B=void 0,V0(this)}finishProcessing(){this.g.finishProcessing(),V0(this)}close(){this.B=void 0,this.g.closeGraph()}};function pi(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}rf.prototype.close=rf.prototype.close;class dy{constructor(t,n,i,a){this.g=t,this.h=n,this.m=i,this.l=a}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function q0(e,t,n){const i=e.g;if(n=pi(i.createShader(n),"Failed to create WebGL shader"),i.shaderSource(n,t),i.compileShader(n),!i.getShaderParameter(n,i.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${i.getShaderInfoLog(n)}`);return i.attachShader(e.h,n),n}function F0(e,t){const n=e.g,i=pi(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(i);const a=pi(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,a),n.enableVertexAttribArray(e.O),n.vertexAttribPointer(e.O,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const l=pi(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,l),n.enableVertexAttribArray(e.L),n.vertexAttribPointer(e.L,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(t?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new dy(n,i,a,l)}function uf(e,t){if(e.g){if(t!==e.g)throw Error("Cannot change GL context once initialized")}else e.g=t}function hy(e,t,n,i){return uf(e,t),e.h||(e.m(),e.D()),n?(e.u||(e.u=F0(e,!0)),n=e.u):(e.A||(e.A=F0(e,!1)),n=e.A),t.useProgram(e.h),n.bind(),e.l(),e=i(),n.g.bindVertexArray(null),e}function Y0(e,t,n){return uf(e,t),e=pi(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n??t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n??t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e}function X0(e,t,n){uf(e,t),e.B||(e.B=pi(t.createFramebuffer(),"Failed to create framebuffe.")),t.bindFramebuffer(t.FRAMEBUFFER,e.B),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)}function my(e){var t;(t=e.g)==null||t.bindFramebuffer(e.g.FRAMEBUFFER,null)}var Q0=class{H(){return`
1
+ (function(Re,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],o):(Re=typeof globalThis<"u"?globalThis:Re||self,o(Re.InterviewWidget={},Re.jsxRuntime,Re.React,Re.ReactDOM))})(this,function(Re,o,y,W2){"use strict";var a7=Object.defineProperty;var i7=(Re,o,y)=>o in Re?a7(Re,o,{enumerable:!0,configurable:!0,writable:!0,value:y}):Re[o]=y;var Kt=(Re,o,y)=>i7(Re,typeof o!="symbol"?o+"":o,y);var Vc=typeof document<"u"?document.currentScript:null;const qc={},Sn={api:{baseUrl:"/api",retryConfig:{attempts:3,backoff:"exponential",baseDelay:1e3}},ui:{baseColor:"#3B82F6",borderRadius:"8px"},interview:{allow_answer_editing:!0,timers:{thinkingDuration:30,answeringDuration:120,editingDuration:30},stt:{provider:"groq",model:"whisper-large-v3-turbo",language:"en"},tts:{provider:"piper"},proctoring:{enabled:!0,gazeAnalysisEnabled:!0}}},Fc="iw-storage";function Fm(){if(!(typeof{url:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Vc&&Vc.tagName.toUpperCase()==="SCRIPT"&&Vc.src||new URL("widget.umd.js",document.baseURI).href}<"u"&&(qc!=null&&qc.VITE_IW_SECRET)))return typeof process<"u"&&process.env.NEXT_PUBLIC_IW_SECRET?process.env.NEXT_PUBLIC_IW_SECRET:typeof window<"u"&&window.__IW_SECRET__?window.__IW_SECRET__:"proctoring-data-seed"}const R2=Fm(),_s=30,Ym={SCREENSHOT:"screenshot"},Yc="AES-GCM",Xc=12;async function P2(e){const n=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",n);return crypto.subtle.importKey("raw",a,Yc,!1,["encrypt","decrypt"])}function Xm(){return crypto.getRandomValues(new Uint8Array(Xc))}async function Qm(e,t="default-seed"){try{const n=typeof e=="string"?e:JSON.stringify(e),i=new TextEncoder().encode(n),l=await P2(t),r=Xm(),s=await crypto.subtle.encrypt({name:Yc,iv:r},l,i),c=new Uint8Array(r.length+s.byteLength);return c.set(new Uint8Array(r),0),c.set(new Uint8Array(s),r.length),btoa(String.fromCharCode(...Array.from(c)))}catch(n){throw console.error("Encryption failed:",n),new Error("Failed to encrypt data")}}async function Km(e,t="default-seed"){try{const n=atob(e),a=new Uint8Array(n.length);for(let u=0;u<n.length;u++)a[u]=n.charCodeAt(u);const i=a.slice(0,Xc),l=a.slice(Xc),r=await P2(t),s=await crypto.subtle.decrypt({name:Yc,iv:i},r,l);return new TextDecoder().decode(s)}catch(n){throw console.error("Decryption failed:",n),new Error("Failed to decrypt data")}}async function Zm(e,t="default-seed"){return Qm(e,t)}async function Im(e,t="default-seed"){const n=await Km(e,t);try{return JSON.parse(n)}catch{return n}}const Wl=y.createContext(null),Jm=async()=>{try{const e=sessionStorage.getItem(Fc);if(e){const n=(await Im(e,R2)).state;return{logViolations:(n==null?void 0:n.logViolations)||[],totalViolations:(n==null?void 0:n.totalViolations)||0,gazeViolationCounters:(n==null?void 0:n.gazeViolationCounters)||{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:(n==null?void 0:n.referenceSet)??!1,referenceRef:(n==null?void 0:n.referenceRef)??{x:.5,y:.5,noseX:.5,noseY:.5}}}}catch(e){console.error("Failed to load proctoring data from session storage:",e)}return{logViolations:[],totalViolations:0,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:!1,referenceRef:{x:.5,y:.5,noseX:.5,noseY:.5}}},Rl=async e=>{try{const t=await Zm({state:e,version:0},R2);sessionStorage.setItem(Fc,t)}catch(t){console.error("Failed to save proctoring data to session storage:",t)}},Wm=({children:e})=>{const t=y.useRef({logViolations:[],totalViolations:0,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0},referenceSet:!1,referenceRef:{x:.5,y:.5,noseX:.5,noseY:.5}}),n=y.useRef(new Set);y.useEffect(()=>{Jm().then(d=>{t.current=d,a()})},[]);const a=y.useCallback(()=>{n.current.forEach(d=>d())},[]),i=y.useCallback(d=>(n.current.add(d),()=>{n.current.delete(d)}),[]),l=y.useCallback(()=>t.current,[]),r=y.useCallback(d=>{t.current={...t.current,logViolations:[...t.current.logViolations,d],totalViolations:t.current.totalViolations+1},Rl(t.current),a()},[a]),s=y.useCallback(d=>{const g={...t.current.gazeViolationCounters};d==="looking_away"&&(g.lookingAwayCount+=1),d==="no_face_detected"&&(g.noFaceDetectedCount+=1),d==="multiple_faces"&&(g.multipleFacesCount+=1),g.totalGazeViolations=g.lookingAwayCount+g.noFaceDetectedCount+g.multipleFacesCount,t.current={...t.current,gazeViolationCounters:g},Rl(t.current),a()},[a]),c=y.useCallback(()=>{t.current={...t.current,logViolations:[],totalViolations:0},Rl(t.current),a()},[a]),u=y.useCallback(()=>{t.current={...t.current,gazeViolationCounters:{lookingAwayCount:0,noFaceDetectedCount:0,multipleFacesCount:0,totalGazeViolations:0}},Rl(t.current),a()},[a]),f=y.useCallback((d,g)=>{t.current={...t.current,referenceSet:d,referenceRef:g},Rl(t.current),a()},[a]),h=y.useMemo(()=>({getState:l,addViolation:r,clearViolations:c,subscribe:i,incrementGazeViolation:s,clearGazeViolationCounters:u,setReferenceData:f}),[l,r,c,i,s,u,f]);return o.jsx(Wl.Provider,{value:h,children:e})},$2=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useProctoringStore must be used within a ProctoringProvider");const t=y.useSyncExternalStore(e.subscribe,e.getState,e.getState);return{logViolations:t.logViolations,totalViolations:t.totalViolations,addViolation:e.addViolation,clearViolations:e.clearViolations,gazeViolationCounters:t.gazeViolationCounters,referenceSet:t.referenceSet,referenceRef:t.referenceRef,incrementGazeViolation:e.incrementGazeViolation,clearGazeViolationCounters:e.clearGazeViolationCounters,setReferenceData:e.setReferenceData}},Rm=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useViolations must be used within a ProctoringProvider");return y.useSyncExternalStore(e.subscribe,()=>e.getState().logViolations,()=>e.getState().logViolations)},Pm=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useTotalViolations must be used within a ProctoringProvider");return y.useSyncExternalStore(e.subscribe,()=>e.getState().totalViolations,()=>e.getState().totalViolations)},$m=()=>{const e=y.useContext(Wl);if(!e)throw new Error("useProctoringActions must be used within a ProctoringProvider");return{addViolation:e.addViolation,clearViolations:e.clearViolations}},e1=y.createContext(null);function Qc({config:e={},children:t}){var a,i,l,r;const n={api:{...Sn.api,...e.api,retryConfig:{...Sn.api.retryConfig,...(a=e.api)==null?void 0:a.retryConfig}},ui:{...Sn.ui,...e.ui},interview:{...Sn.interview,...e.interview,timers:{...Sn.interview.timers,...(i=e.interview)==null?void 0:i.timers},stt:{...Sn.interview.stt,...(l=e.interview)==null?void 0:l.stt},tts:{...Sn.interview.tts,...(r=e.interview)==null?void 0:r.tts}}};return o.jsx(e1.Provider,{value:n,children:o.jsx(Wm,{children:t})})}function xs(){const e=y.useContext(e1);if(!e)throw new Error("useInterviewConfig must be used within an InterviewWidgetProvider. Wrap your component tree with <InterviewWidgetProvider config={...}>");return e}function t1(){return xs().api||Sn.api}function Pl(){return xs().ui||Sn.ui}function Kc(){return xs().interview||Sn.interview}function e6(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function t6(e,t,n){return"#"+[e,t,n].map(a=>{const i=Math.round(a).toString(16);return i.length===1?"0"+i:i}).join("")}function n6(e,t){const n=e6(e);if(!n)return e;const a=n.r+(255-n.r)*t,i=n.g+(255-n.g)*t,l=n.b+(255-n.b)*t;return t6(a,i,l)}function a6(e){return new Promise(t=>setTimeout(t,e))}function i6(e){return`linear-gradient(to left, ${n6(e,.4)}, ${e})`}const l6=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);function r6(e){try{const t=e.split(".");if(t.length!==3||!t[1])throw new Error("Invalid JWT token");const a=t[1].replace(/-/g,"+").replace(/_/g,"/"),i=a.padEnd(a.length+(4-a.length%4)%4,"="),l=atob(i);return JSON.parse(l)}catch(t){return console.error("Error decoding JWT:",t),null}}const n1=e=>{var t;return!e||typeof e!="string"?"":(t=e.charAt(0))==null?void 0:t.toUpperCase()},Zc=e=>{const t=Math.max(0,Math.floor(e)),n=Math.floor(t/60).toString().padStart(2,"0"),a=(t%60).toString().padStart(2,"0");return`${n}:${a}`},$l=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),o.jsx("path",{d:"M12 9v4"}),o.jsx("path",{d:"M12 17h.01"})]}),s6=e=>o.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-bolt-icon prefix__lucide-bolt",...e,children:[o.jsx("path",{d:"M21 16V8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z"}),o.jsx("circle",{cx:12,cy:12,r:4})]}),o6=e=>o.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-camera-off-icon prefix__lucide-camera-off",...e,children:[o.jsx("path",{d:"M14.564 14.558a3 3 0 11-4.122-4.121M2 2l20 20"}),o.jsx("path",{d:"M20 20H4a2 2 0 01-2-2V9a2 2 0 012-2h1.997a2 2 0 00.819-.175M9.695 4.024A2 2 0 0110.004 4h3.993a2 2 0 011.76 1.05l.486.9A2 2 0 0018.003 7H20a2 2 0 012 2v7.344"})]}),As=e=>o.jsx("svg",{width:"10",height:"9",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:o.jsx("path",{d:"M0.75 5.5C0.75 5.5 2.35 6.4125 3.15 7.75C3.15 7.75 5.55 2.5 8.75 0.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),a1=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("path",{d:"M12 2a10 10 0 0 1 7.38 16.75"}),o.jsx("path",{d:"M12 6v6l4 2"}),o.jsx("path",{d:"M2.5 8.875a10 10 0 0 0-.5 3"}),o.jsx("path",{d:"M2.83 16a10 10 0 0 0 2.43 3.4"}),o.jsx("path",{d:"M4.636 5.235a10 10 0 0 1 .891-.857"}),o.jsx("path",{d:"M8.644 21.42a10 10 0 0 0 7.631-.38"})]}),c6=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("path",{d:"M12 6v6l4 2"}),o.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),i1=e=>o.jsx("svg",{className:"iw-w-5 iw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",...e,children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),l1=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}),o.jsx("circle",{cx:"12",cy:"12",r:"3"})]}),u6=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("circle",{cx:"12",cy:"12",r:"3"}),o.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),o.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),o.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),o.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),f6=e=>o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[o.jsx("path",{d:"M2.66797 2H13.3346",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M3.66797 2V3.35359C3.66797 4.18151 4.05252 4.96247 4.70874 5.46726L8.0013 8L11.2938 5.46726C11.9501 4.96247 12.3346 4.18151 12.3346 3.35359V2",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M3.66797 14V12.6464C3.66797 11.8185 4.05252 11.0375 4.70874 10.5327L8.0013 8L11.2938 10.5327C11.9501 11.0375 12.3346 11.8185 12.3346 12.6464V14",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"}),o.jsx("path",{d:"M2.66797 14H13.3346",stroke:"#5C6686",strokeLinecap:"round",strokeLinejoin:"round"})]}),Ic=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("circle",{cx:"12",cy:"12",r:"3"}),o.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),o.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),o.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),o.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),r1=({className:e,...t})=>o.jsx("div",{children:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`iw-animate-spin ${e}`,...t,children:[o.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.jsx("path",{d:"M12 6l0 -3"}),o.jsx("path",{d:"M16.25 7.75l2.15 -2.15"}),o.jsx("path",{d:"M18 12l3 0"}),o.jsx("path",{d:"M16.25 16.25l2.15 2.15"}),o.jsx("path",{d:"M12 18l0 3"}),o.jsx("path",{d:"M7.75 16.25l-2.15 2.15"}),o.jsx("path",{d:"M6 12l-3 0"}),o.jsx("path",{d:"M7.75 7.75l-2.15 -2.15"})]})}),d6=e=>o.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[o.jsx("path",{d:"M17 7V11C17 13.7614 14.7614 16 12 16C9.23858 16 7 13.7614 7 11V7C7 4.23858 9.23858 2 12 2C14.7614 2 17 4.23858 17 7Z",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"M20 11C20 15.4183 16.4183 19 12 19M12 19C7.58172 19 4 15.4183 4 11M12 19V22M12 22H15M12 22H9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),h6=e=>o.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[o.jsx("path",{d:"M2 2L22 22",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),o.jsx("path",{d:"M4 11C4 15.4183 7.58172 19 12 19M12 19C13.9545 19 15.7454 18.2991 17.1348 17.1348M12 19V22M12 22H15M12 22H9M20 11C20 12.6514 19.4996 14.1859 18.6422 15.4603",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),o.jsx("path",{d:"M7 6.98V11C7 13.7614 9.23858 16 12 16C13.1354 16 14.1647 15.6096 15.004 14.972M16.4387 13.244C16.7973 12.5545 17 11.8309 17 11V6.98C17 4.21858 14.7614 2 12 2C10.1312 2 8.53009 2.96527 7.672 4.484",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"})]}),g6=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}),o.jsx("line",{x1:"8",x2:"16",y1:"21",y2:"21"}),o.jsx("line",{x1:"12",x2:"12",y1:"17",y2:"21"})]}),w6=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("circle",{cx:"12",cy:"12",r:"3"}),o.jsx("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),o.jsx("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),o.jsx("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),o.jsx("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})]}),m6=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}),o.jsx("path",{d:"m9 12 2 2 4-4"})]}),y6=e=>o.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-target-icon prefix__lucide-target",...e,children:[o.jsx("circle",{cx:12,cy:12,r:10}),o.jsx("circle",{cx:12,cy:12,r:6}),o.jsx("circle",{cx:12,cy:12,r:2})]}),p6=e=>o.jsxs("svg",{width:24,height:24,fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"prefix__lucide prefix__lucide-users-icon prefix__lucide-users",...e,children:[o.jsx("path",{d:"M16 21v-2a4 4 0 00-4-4H6a4 4 0 00-4 4v2M16 3.128a4 4 0 010 7.744M22 21v-2a4 4 0 00-3-3.87"}),o.jsx("circle",{cx:9,cy:7,r:4})]}),v6=e=>o.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[o.jsx("path",{d:"M11 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),o.jsx("path",{d:"M2 11C2 7.70017 2 6.05025 3.02513 5.02513C4.05025 4 5.70017 4 9 4H10C13.2998 4 14.9497 4 15.9749 5.02513C17 6.05025 17 7.70017 17 11V13C17 16.2998 17 17.9497 15.9749 18.9749C14.9497 20 13.2998 20 10 20H9C5.70017 20 4.05025 20 3.02513 18.9749C2 17.9497 2 16.2998 2 13V11Z",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"M17 8.90585L17.1259 8.80196C19.2417 7.05623 20.2996 6.18336 21.1498 6.60482C22 7.02628 22 8.42355 22 11.2181V12.7819C22 15.5765 22 16.9737 21.1498 17.3952C20.2996 17.8166 19.2417 16.9438 17.1259 15.198L17 15.0941",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),b6=e=>o.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[o.jsx("path",{d:"M2.00195 2L21.9773 22",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),o.jsx("path",{d:"M16.8517 16.8668C16.7225 17.8052 16.4666 18.4659 15.9596 18.9735C14.9357 19.9987 13.2878 19.9987 9.99206 19.9987H8.99329C5.69755 19.9987 4.04967 19.9987 3.02581 18.9735C2.00195 17.9484 2.00195 16.2985 2.00195 12.9987V10.9987C2.00195 7.69885 2.00195 6.04893 3.02581 5.0238C3.36833 4.68086 3.78068 4.45265 4.3012 4.30078",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round"}),o.jsx("path",{d:"M8.23633 4.00052C8.47821 4 8.73001 4 8.99223 4H9.99099C13.2868 4 14.9347 4 15.9585 5.02513C16.9823 6.05025 16.9823 7.70017 16.9823 11V12.7574M16.9823 9.23142L19.3019 7.52913C20.773 6.54073 21.449 7.17196 21.6675 7.64847C22.1192 8.92813 21.9769 11.3936 21.9769 14.5417C21.8704 16.555 21.5953 16.7719 21.3138 16.9939L21.3108 16.9962",stroke:"#062260",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),er={FACE_DETECTED:"face_detected",NO_FACE:"no_face_detected",MULTIPLE_FACES:"multiple_faces",LOOKING_AWAY:"looking_away",CAMERA_ERROR:"camera_error"},s1={[er.FACE_DETECTED]:{icon:l1,iconColor:"iw-text-green-600",iconBg:"iw-bg-green-50",iconBorder:"iw-border-green-100",title:"All Good",subtitle:"Everything looks normal",description:"Your gaze is properly focused on the screen. Continue with your interview.",buttonText:"Continue"},[er.NO_FACE]:{icon:o6,iconColor:"iw-text-orange-600",iconBg:"iw-bg-orange-50",iconBorder:"iw-border-orange-100",title:"Face Not Detected",subtitle:"We can't see you in the camera",description:"Please ensure you're positioned properly in front of the camera and that your face is clearly visible.",buttonText:"I Understood"},[er.MULTIPLE_FACES]:{icon:p6,iconColor:"iw-text-red-600",iconBg:"iw-bg-red-50",iconBorder:"iw-border-red-100",title:"Multiple People Detected",subtitle:"More than one person is visible",description:"For interview integrity, please ensure you are alone in the room and only your face is visible to the camera.",buttonText:"I Understood"},[er.LOOKING_AWAY]:{icon:y6,iconColor:"iw-text-amber-600",iconBg:"iw-bg-amber-50",iconBorder:"iw-border-amber-200/75",title:"Stay Focused",subtitle:"We noticed you looked away from the screen",description:"To ensure interview integrity, please keep your attention on the screen throughout the session.",buttonText:"I Understood"},[er.CAMERA_ERROR]:{icon:$l,iconColor:"iw-text-red-600",iconBg:"iw-bg-red-50",iconBorder:"iw-border-red-100",title:"Camera Issue",subtitle:"There's a problem with your camera",description:"Please check your camera connection and permissions, then refresh the page to continue.",buttonText:"I Understood"}};function S6(e){var t;if(!navigator.onLine)return{type:"network",message:"No internet connection",retryable:!0,userMessage:"Please check your internet connection and try again."};if(e.name==="AbortError"||(t=e.message)!=null&&t.includes("timeout"))return{type:"timeout",message:"Request timed out",retryable:!0,userMessage:"The request is taking longer than expected. Please try again."};if(e.status){const{status:n}=e;if(n===401||n===403)return{type:"auth",status:n,message:"Authentication failed",retryable:!1,userMessage:"Your session has expired. Please refresh the page."};if(n===429)return{type:"rate-limit",status:n,message:"Too many requests",retryable:!0,userMessage:"Please wait a moment before trying again."};if(n>=500)return{type:"server",status:n,message:`Server error: ${n}`,retryable:!0,userMessage:"Our servers are experiencing issues. Please try again in a few moments."};if(n>=400)return{type:"client",status:n,message:`Client error: ${n}`,retryable:!1,userMessage:"There was an issue with your request. Please check your input."}}return{type:"unknown",message:e.message||"Unknown error occurred",retryable:!0,userMessage:"Something unexpected happened. Please try again.",originalError:e}}async function oa(e,t={},n={attempts:3,backoff:"exponential",baseDelay:1e3,maxDelay:1e4,jitter:!0}){let a;for(let i=1;i<=n.attempts;i++)try{const l=new AbortController,r=setTimeout(()=>l.abort(),6e4),s=await fetch(e,{...t,signal:l.signal});if(clearTimeout(r),s.status>=400&&s.status<500&&s.status!==429)return s;if(!s.ok)throw new Error(`HTTP ${s.status}: ${s.statusText}`);return s}catch(l){a=l;const r=S6(l);if(!r.retryable||i===n.attempts)throw r;const s=E6(i,n);console.warn(`API request failed (attempt ${i}/${n.attempts}), retrying in ${s}ms:`,r.message),await new Promise(c=>setTimeout(c,s))}throw a}function E6(e,t){let n;return t.backoff==="exponential"?n=t.baseDelay*Math.pow(2,e-1):n=t.baseDelay,n=Math.min(n,t.maxDelay),t.jitter&&(n=n*(.5+Math.random()*.5)),Math.round(n)}const ca={v2:"/v2"},ua={GENERATE_QUESTION:e=>`${ca.v2}/interviews/${e}/next-question`,SCREENSHOT_UPLOAD:e=>`${ca.v2}/interviews/${e}/assets/upload-url`,CONFIRM_UPLOAD:e=>`${ca.v2}/interviews/assets/${e}/confirm`,TRANSCRIBE_ANSWER:e=>`${ca.v2}/interviews/${e}/transcribe-answer`,SUBMIT_ANSWER:e=>`${ca.v2}/interviews/${e}/submit-answer`,EXIT:e=>`${ca.v2}/interviews/${e}/exit`,CONFIG:e=>`${ca.v2}/interviews/${e}/config`,TRANSCRIPTION:e=>`${ca.v2}/interviews/${e}/transcript`};class o1{constructor(t={}){Kt(this,"config");this.config=t}updateConfig(t){this.config={...this.config,...t}}getHeaders(){var n;const t={"Content-Type":"application/json"};return(n=this.config)!=null&&n.authToken&&(t.Authorization=`Bearer ${this.config.authToken}`),t}getBaseUrl(){var t;return((t=this.config)==null?void 0:t.baseUrl)||"/api"}async generateQuestion({interviewId:t,isInterviewDone:n=!1}){const a=await oa(`${this.getBaseUrl()}${ua.GENERATE_QUESTION(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({interview_id:t,is_interview_done:n})});if(!a.ok)throw new Error(`Failed to get questions: ${a.status}`);return await a.json()}async submitAnswer({interviewId:t,qnaId:n,answer:a}){const i=await oa(`${this.getBaseUrl()}${ua.SUBMIT_ANSWER(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({qna_id:n,answer_text:a})});if(!i.ok)throw new Error(`Failed to submit answer: ${i.status}`);return await i.json()}async exitInterview(t){const n=await oa(`${this.getBaseUrl()}${ua.EXIT(t)}`,{method:"POST",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to exit interview: ${n.status}`)}async getInterviewConfig(t){const n=await oa(`${this.getBaseUrl()}${ua.CONFIG(t)}`,{method:"GET",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to get interview config: ${n.status}`);return await n.json()}async requestScreenshotUploadUrl(t,n=`screenshot-${Date.now()}.jpeg`){const a=await oa(`${this.getBaseUrl()}${ua.SCREENSHOT_UPLOAD(t)}`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({filename:n,mime_type:"image/jpeg",asset_type:Ym.SCREENSHOT})});if(!a.ok)throw new Error(`Failed to request screenshot upload URL: ${a.status}`);return await a.json()}async uploadScreenshot(t,n){const a=await fetch(t,{method:"PUT",body:n,headers:{"Content-Type":"image/jpeg"}});if(!a.ok)throw new Error(`Failed to upload screenshot: ${a.status}`)}async confirmScreenshotUpload(t){const n=await oa(`${this.getBaseUrl()}${ua.CONFIRM_UPLOAD(t)}`,{method:"POST",headers:this.getHeaders()});if(!n.ok)throw new Error(`Failed to confirm screenshot upload: ${n.status}`)}async getInterviewTranscription(t){const n=await oa(`${this.getBaseUrl()}${ua.TRANSCRIPTION(t)}`,{method:"GET",headers:{...this.getHeaders(),"x-auth-token":"interview-engine-api-key"}});if(!n.ok)throw new Error(`Failed to get interview transcription: ${n.status}`);return await n.json()}}const _6=new o1,x6=({gazeAnalysisEnabled:e,isModelLoaded:t,stats:n,statusMessage:a,loadingProgress:i})=>o.jsx("div",{className:"iw-w-full",children:o.jsxs("div",{className:"iw-border-strock iw-rounded-md iw-border iw-bg-gray-50 iw-p-4",children:[o.jsxs("h3",{className:"iw-m-0 iw-mb-2.5",children:["Status: ",a]}),i>0&&i<100&&o.jsxs("div",{className:"iw-mb-2.5",children:[o.jsx("div",{className:"iw-h-2 iw-w-full iw-rounded iw-bg-gray-300",children:o.jsx("div",{className:"iw-h-full iw-rounded iw-bg-blue-600 iw-transition-all iw-duration-300 iw-ease-out",style:{width:`${i}%`}})}),o.jsxs("small",{className:"iw-text-gray-600",children:["Loading model... ",i.toFixed(1),"%"]})]}),o.jsxs("div",{className:"iw-grid iw-grid-cols-2 iw-gap-2.5 iw-text-sm",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"FPS:"})," ",o.jsx("span",{className:n.fps<15?"iw-text-red-600":n.fps<25?"iw-text-orange-500":"iw-text-green-600",children:n.fps})]}),o.jsxs("div",{children:[o.jsx("strong",{children:"Model:"})," ",t?"✓ Loaded":"✗ Loading"]}),e&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{children:[o.jsx("strong",{children:"Engagement:"})," ",n.engagement.toFixed(1),"%"]}),o.jsxs("div",{children:[o.jsx("strong",{children:"Looking:"})," ",o.jsx("span",{className:n.isLookingAway?"iw-text-red-600":"iw-text-green-600",children:n.isLookingAway?"Away":"At Screen"})]})]})]}),n.referenceFaceNotDetected&&o.jsxs("div",{className:"iw-text-gray-dark iw-mt-2.5 iw-w-full iw-rounded-md iw-bg-[#ffeb3b] iw-p-2.5 iw-text-sm",children:[o.jsx("strong",{children:"Reference Face Not Detected"}),o.jsx("br",{}),"The previously set reference face is no longer in view."]}),n.multipleFacesDetected&&o.jsxs("div",{className:"iw-mt-2.5 iw-rounded iw-bg-red-50 iw-p-2.5 iw-text-sm iw-text-red-700",children:[o.jsx("strong",{children:"Multiple Faces Detected"}),o.jsx("br",{}),"Please ensure only one person is in the frame."]}),!e&&o.jsxs("div",{className:"iw-mt-2.5 iw-rounded iw-bg-blue-50 iw-p-2.5 iw-text-sm iw-text-blue-700",children:[o.jsx("strong",{children:"Gaze Analysis Disabled"}),o.jsx("br",{}),"Enable to track engagement and attention levels."]})]})}),A6=({showControls:e,isBubbleOpen:t,setIsBubbleOpen:n,setReference:a,clearCache:i,isModelLoaded:l,gazeAnalysisEnabled:r,referenceSet:s,showLandmarks:c,setShowLandmarks:u,showEngagementBar:f,setShowEngagementBar:h,handleToggleGazeAnalysis:d,stats:g,statusMessage:v,loadingProgress:S})=>e?o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>n(!t),className:"iw-absolute iw-right-4 iw-bottom-4 iw-z-10 iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-full iw-text-white",children:o.jsx(s6,{className:"iw-size-4.5"})}),t&&o.jsxs("div",{className:"iw-absolute iw-right-4 iw-bottom-16 iw-z-10 iw-max-h-96 iw-w-80 iw-overflow-y-auto iw-rounded-md iw-bg-gray-50 iw-p-4 iw-shadow-lg",children:[o.jsx("h4",{className:"m-0 mb-2.5",children:"Controls"}),o.jsx("button",{onClick:a,disabled:!l||!r,className:`iw-mb-2.5 iw-block iw-w-full iw-rounded border-none iw-px-4 iw-py-2 iw-text-sm iw-text-white ${!l||!r?"iw-cursor-not-allowed iw-bg-gray-400":"iw-cursor-pointer iw-bg-blue-600 hover:iw-bg-blue-700"}`,children:s?"Reference Set ✓":"Set Reference"}),o.jsx("button",{onClick:i,className:"iw-mb-4 iw-block iw-w-full iw-cursor-pointer iw-rounded iw-border-none iw-bg-red-600 iw-px-4 iw-py-2 iw-text-sm iw-text-white hover:iw-bg-red-700",children:"Clear Model Cache"}),o.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-2.5",children:[o.jsxs("label",{className:"iw-flex iw-cursor-pointer iw-items-center iw-gap-2",children:[o.jsx("input",{type:"checkbox",checked:r,onChange:_=>d(_.target.checked)}),o.jsx("strong",{children:"Enable Gaze Analysis"})]}),o.jsxs("label",{className:`iw-flex iw-cursor-pointer iw-items-center iw-gap-2 ${r?"iw-opacity-100":"iw-opacity-60"}`,children:[o.jsx("input",{type:"checkbox",checked:c,onChange:_=>u(_.target.checked),disabled:!r}),"Show Landmarks"]}),o.jsxs("label",{className:`iw-flex iw-cursor-pointer iw-items-center iw-gap-2 ${r?"iw-opacity-100":"iw-opacity-60"}`,children:[o.jsx("input",{type:"checkbox",checked:f,onChange:_=>h(_.target.checked),disabled:!r}),"Show Engagement Bar"]})]}),s&&o.jsx(x6,{gazeAnalysisEnabled:r,isModelLoaded:l,loadingProgress:S,stats:g,statusMessage:v})]})]}):null;var Oi=typeof self<"u"?self:{};function tr(e,t){e:{for(var n=["CLOSURE_FLAGS"],a=Oi,i=0;i<n.length;i++)if((a=a[n[i]])==null){n=null;break e}n=a}return(e=n&&n[e])!=null?e:t}function Za(){throw Error("Invalid UTF8")}function c1(e,t){return t=String.fromCharCode.apply(null,t),e==null?t:e+t}let Ts,Jc;const T6=typeof TextDecoder<"u";let N6;const M6=typeof TextEncoder<"u";function u1(e){if(M6)e=(N6||(N6=new TextEncoder)).encode(e);else{let n=0;const a=new Uint8Array(3*e.length);for(let i=0;i<e.length;i++){var t=e.charCodeAt(i);if(t<128)a[n++]=t;else{if(t<2048)a[n++]=t>>6|192;else{if(t>=55296&&t<=57343){if(t<=56319&&i<e.length){const l=e.charCodeAt(++i);if(l>=56320&&l<=57343){t=1024*(t-55296)+l-56320+65536,a[n++]=t>>18|240,a[n++]=t>>12&63|128,a[n++]=t>>6&63|128,a[n++]=63&t|128;continue}i--}t=65533}a[n++]=t>>12|224,a[n++]=t>>6&63|128}a[n++]=63&t|128}}e=n===a.length?a:a.subarray(0,n)}return e}function f1(e){Oi.setTimeout(()=>{throw e},0)}var Wc,C6=tr(610401301,!1),d1=tr(748402147,!0),Rc=tr(824648567,!0),Pc=tr(824656860,tr(1,!0));function h1(){var e=Oi.navigator;return e&&(e=e.userAgent)?e:""}const g1=Oi.navigator;function Ns(e){return Ns[" "](e),e}Wc=g1&&g1.userAgentData||null,Ns[" "]=function(){};const w1={};let nr=null;function D6(e){const t=e.length;let n=3*t/4;n%3?n=Math.floor(n):"=.".indexOf(e[t-1])!=-1&&(n="=.".indexOf(e[t-2])!=-1?n-2:n-1);const a=new Uint8Array(n);let i=0;return function(l,r){function s(u){for(;c<l.length;){const f=l.charAt(c++),h=nr[f];if(h!=null)return h;if(!/^[\s\xa0]*$/.test(f))throw Error("Unknown base64 encoding at char: "+f)}return u}m1();let c=0;for(;;){const u=s(-1),f=s(0),h=s(64),d=s(64);if(d===64&&u===-1)break;r(u<<2|f>>4),h!=64&&(r(f<<4&240|h>>2),d!=64&&r(h<<6&192|d))}}(e,function(l){a[i++]=l}),i!==n?a.subarray(0,i):a}function m1(){if(!nr){nr={};var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"];for(let n=0;n<5;n++){const a=e.concat(t[n].split(""));w1[n]=a;for(let i=0;i<a.length;i++){const l=a[i];nr[l]===void 0&&(nr[l]=i)}}}}var O6=typeof Uint8Array<"u",y1=!(!(C6&&Wc&&Wc.brands.length>0)&&(h1().indexOf("Trident")!=-1||h1().indexOf("MSIE")!=-1))&&typeof btoa=="function";const p1=/[-_.]/g,z6={"-":"+",_:"/",".":"="};function k6(e){return z6[e]||""}function v1(e){if(!y1)return D6(e);e=p1.test(e)?e.replace(p1,k6):e,e=atob(e);const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function $c(e){return O6&&e!=null&&e instanceof Uint8Array}var zi={};function Ia(){return L6||(L6=new En(null,zi))}function eu(e){b1(zi);var t=e.g;return(t=t==null||$c(t)?t:typeof t=="string"?v1(t):null)==null?t:e.g=t}var En=class{h(){return new Uint8Array(eu(this)||0)}constructor(e,t){if(b1(t),this.g=e,e!=null&&e.length===0)throw Error("ByteString should be constructed with non-empty values")}};let L6,U6;function b1(e){if(e!==zi)throw Error("illegal external caller")}function S1(e,t){e.__closure__error__context__984382||(e.__closure__error__context__984382={}),e.__closure__error__context__984382.severity=t}function tu(e){return S1(e=Error(e),"warning"),e}function ki(e,t){if(e!=null){var n=U6??(U6={}),a=n[e]||0;a>=t||(n[e]=a+1,S1(e=Error(),"incident"),f1(e))}}function Li(){return typeof BigInt=="function"}var Ui=typeof Symbol=="function"&&typeof Symbol()=="symbol";function _n(e,t,n=!1){return typeof Symbol=="function"&&typeof Symbol()=="symbol"?n&&Symbol.for&&e?Symbol.for(e):e!=null?Symbol(e):Symbol():t}var B6=_n("jas",void 0,!0),E1=_n(void 0,"0di"),ar=_n(void 0,"1oa"),_t=_n(void 0,Symbol()),G6=_n(void 0,"0ub"),H6=_n(void 0,"0ubs"),nu=_n(void 0,"0ubsb"),j6=_n(void 0,"0actk"),Bi=_n("m_m","Pa",!0),_1=_n();const x1={Ga:{value:0,configurable:!0,writable:!0,enumerable:!1}},A1=Object.defineProperties,z=Ui?B6:"Ga";var Ja;const T1=[];function ir(e,t){Ui||z in e||A1(e,x1),e[z]|=t}function je(e,t){Ui||z in e||A1(e,x1),e[z]=t}function lr(e){return ir(e,34),e}function rr(e){return ir(e,8192),e}je(T1,7),Ja=Object.freeze(T1);var Gi={};function xt(e,t){return t===void 0?e.h!==Wa&&!!(2&(0|e.v[z])):!!(2&t)&&e.h!==Wa}const Wa={};function au(e,t){if(e!=null){if(typeof e=="string")e=e?new En(e,zi):Ia();else if(e.constructor!==En)if($c(e))e=e.length?new En(new Uint8Array(e),zi):Ia();else{if(!t)throw Error();e=void 0}}return e}class N1{constructor(t,n,a){this.g=t,this.h=n,this.l=a}next(){const t=this.g.next();return t.done||(t.value=this.h.call(this.l,t.value)),t}[Symbol.iterator](){return this}}var V6=Object.freeze({});function M1(e,t,n){const a=128&t?0:-1,i=e.length;var l;(l=!!i)&&(l=(l=e[i-1])!=null&&typeof l=="object"&&l.constructor===Object);const r=i+(l?-1:0);for(t=128&t?1:0;t<r;t++)n(t-a,e[t]);if(l){e=e[i-1];for(const s in e)!isNaN(s)&&n(+s,e[s])}}var C1={};function Hi(e){return 128&e?C1:void 0}function Ms(e){return e.Na=!0,e}var q6=Ms(e=>typeof e=="number"),D1=Ms(e=>typeof e=="string"),F6=Ms(e=>typeof e=="boolean"),Cs=typeof Oi.BigInt=="function"&&typeof Oi.BigInt(0)=="bigint";function At(e){var t=e;if(D1(t)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t))throw Error(String(t))}else if(q6(t)&&!Number.isSafeInteger(t))throw Error(String(t));return Cs?BigInt(e):e=F6(e)?e?"1":"0":D1(e)?e.trim()||"0":String(e)}var iu=Ms(e=>Cs?e>=X6&&e<=K6:e[0]==="-"?O1(e,Y6):O1(e,Q6));const Y6=Number.MIN_SAFE_INTEGER.toString(),X6=Cs?BigInt(Number.MIN_SAFE_INTEGER):void 0,Q6=Number.MAX_SAFE_INTEGER.toString(),K6=Cs?BigInt(Number.MAX_SAFE_INTEGER):void 0;function O1(e,t){if(e.length>t.length)return!1;if(e.length<t.length||e===t)return!0;for(let n=0;n<e.length;n++){const a=e[n],i=t[n];if(a>i)return!1;if(a<i)return!0}}const Z6=typeof Uint8Array.prototype.slice=="function";let I6,me=0,Oe=0;function z1(e){const t=e>>>0;me=t,Oe=(e-t)/4294967296>>>0}function ji(e){if(e<0){z1(-e);const[t,n]=cu(me,Oe);me=t>>>0,Oe=n>>>0}else z1(e)}function lu(e){const t=I6||(I6=new DataView(new ArrayBuffer(8)));t.setFloat32(0,+e,!0),Oe=0,me=t.getUint32(0,!0)}function ru(e,t){const n=4294967296*t+(e>>>0);return Number.isSafeInteger(n)?n:sr(e,t)}function J6(e,t){return At(Li()?BigInt.asUintN(64,(BigInt(t>>>0)<<BigInt(32))+BigInt(e>>>0)):sr(e,t))}function su(e,t){const n=2147483648&t;return n&&(t=~t>>>0,(e=1+~e>>>0)==0&&(t=t+1>>>0)),typeof(e=ru(e,t))=="number"?n?-e:e:n?"-"+e:e}function k1(e,t){return Li()?At(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(t))<<BigInt(32))+BigInt.asUintN(32,BigInt(e)))):At(ou(e,t))}function sr(e,t){if(e>>>=0,(t>>>=0)<=2097151)var n=""+(4294967296*t+e);else Li()?n=""+(BigInt(t)<<BigInt(32)|BigInt(e)):(e=(16777215&e)+6777216*(n=16777215&(e>>>24|t<<8))+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,e>=1e7&&(n+=e/1e7>>>0,e%=1e7),n>=1e7&&(t+=n/1e7>>>0,n%=1e7),n=t+L1(n)+L1(e));return n}function L1(e){return e=String(e),"0000000".slice(e.length)+e}function ou(e,t){if(2147483648&t)if(Li())e=""+(BigInt(0|t)<<BigInt(32)|BigInt(e>>>0));else{const[n,a]=cu(e,t);e="-"+sr(n,a)}else e=sr(e,t);return e}function Ds(e){if(e.length<16)ji(Number(e));else if(Li())e=BigInt(e),me=Number(e&BigInt(4294967295))>>>0,Oe=Number(e>>BigInt(32)&BigInt(4294967295));else{const t=+(e[0]==="-");Oe=me=0;const n=e.length;for(let a=t,i=(n-t)%6+t;i<=n;a=i,i+=6){const l=Number(e.slice(a,i));Oe*=1e6,me=1e6*me+l,me>=4294967296&&(Oe+=Math.trunc(me/4294967296),Oe>>>=0,me>>>=0)}if(t){const[a,i]=cu(me,Oe);me=a,Oe=i}}}function cu(e,t){return t=~t,e?e=1+~e:t+=1,[e,t]}function hn(e){return Array.prototype.slice.call(e)}const or=typeof BigInt=="function"?BigInt.asIntN:void 0,W6=typeof BigInt=="function"?BigInt.asUintN:void 0,Ra=Number.isSafeInteger,Os=Number.isFinite,Vi=Math.trunc,R6=At(0);function cr(e){if(e!=null&&typeof e!="number")throw Error(`Value of float/double field must be a number, found ${typeof e}: ${e}`);return e}function xn(e){return e==null||typeof e=="number"?e:e==="NaN"||e==="Infinity"||e==="-Infinity"?Number(e):void 0}function ur(e){if(e!=null&&typeof e!="boolean"){var t=typeof e;throw Error(`Expected boolean but got ${t!="object"?t:e?Array.isArray(e)?"array":t:"null"}: ${e}`)}return e}function U1(e){return e==null||typeof e=="boolean"?e:typeof e=="number"?!!e:void 0}const P6=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;function fr(e){switch(typeof e){case"bigint":return!0;case"number":return Os(e);case"string":return P6.test(e);default:return!1}}function qi(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return Os(e)?0|e:void 0}function B1(e){if(e==null)return e;if(typeof e=="string"&&e)e=+e;else if(typeof e!="number")return;return Os(e)?e>>>0:void 0}function G1(e){const t=e.length;return(e[0]==="-"?t<20||t===20&&e<="-9223372036854775808":t<19||t===19&&e<="9223372036854775807")?e:(Ds(e),ou(me,Oe))}function uu(e){return e=Vi(e),Ra(e)||(ji(e),e=su(me,Oe)),e}function H1(e){var t=Vi(Number(e));return Ra(t)?String(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),G1(e))}function j1(e){var t=Vi(Number(e));return Ra(t)?At(t):((t=e.indexOf("."))!==-1&&(e=e.substring(0,t)),Li()?At(or(64,BigInt(e))):At(G1(e)))}function V1(e){return Ra(e)?e=At(uu(e)):(e=Vi(e),Ra(e)?e=String(e):(ji(e),e=ou(me,Oe)),e=At(e)),e}function $6(e){return e==null?e:typeof e=="bigint"?(iu(e)?e=Number(e):(e=or(64,e),e=iu(e)?Number(e):String(e)),e):fr(e)?typeof e=="number"?uu(e):H1(e):void 0}function zs(e){const t=typeof e;return e==null?e:t==="bigint"?At(or(64,e)):fr(e)?t==="string"?j1(e):V1(e):void 0}function q1(e){if(typeof e!="string")throw Error();return e}function dr(e){if(e!=null&&typeof e!="string")throw Error();return e}function Pe(e){return e==null||typeof e=="string"?e:void 0}function fu(e,t,n,a){return e!=null&&e[Bi]===Gi?e:Array.isArray(e)?((a=(n=0|e[z])|32&a|2&a)!==n&&je(e,a),new t(e)):(n?2&a?((e=t[E1])||(lr((e=new t).v),e=t[E1]=e),t=e):t=new t:t=void 0,t)}function e5(e,t,n){if(t)e:{if(!fr(t=e))throw tu("int64");switch(typeof t){case"string":t=j1(t);break e;case"bigint":t=At(or(64,t));break e;default:t=V1(t)}}else t=zs(e);return(e=t)==null?n?R6:void 0:e}const t5={};let n5=function(){try{return Ns(new class extends Map{constructor(){super()}}),!1}catch{return!0}}();class du{constructor(){this.g=new Map}get(t){return this.g.get(t)}set(t,n){return this.g.set(t,n),this.size=this.g.size,this}delete(t){return t=this.g.delete(t),this.size=this.g.size,t}clear(){this.g.clear(),this.size=this.g.size}has(t){return this.g.has(t)}entries(){return this.g.entries()}keys(){return this.g.keys()}values(){return this.g.values()}forEach(t,n){return this.g.forEach(t,n)}[Symbol.iterator](){return this.entries()}}const a5=n5?(Object.setPrototypeOf(du.prototype,Map.prototype),Object.defineProperties(du.prototype,{size:{value:0,configurable:!0,enumerable:!0,writable:!0}}),du):class extends Map{constructor(){super()}};function F1(e){return e}function hu(e){if(2&e.J)throw Error("Cannot mutate an immutable Map")}var Gn=class extends a5{constructor(e,t,n=F1,a=F1){super(),this.J=0|e[z],this.K=t,this.S=n,this.fa=this.K?i5:a;for(let i=0;i<e.length;i++){const l=e[i],r=n(l[0],!1,!0);let s=l[1];t?s===void 0&&(s=null):s=a(l[1],!1,!0,void 0,void 0,this.J),super.set(r,s)}}V(e){return rr(Array.from(super.entries(),e))}clear(){hu(this),super.clear()}delete(e){return hu(this),super.delete(this.S(e,!0,!1))}entries(){if(this.K){var e=super.keys();e=new N1(e,l5,this)}else e=super.entries();return e}values(){if(this.K){var e=super.keys();e=new N1(e,Gn.prototype.get,this)}else e=super.values();return e}forEach(e,t){this.K?super.forEach((n,a,i)=>{e.call(t,i.get(a),a,i)}):super.forEach(e,t)}set(e,t){return hu(this),(e=this.S(e,!0,!1))==null?this:t==null?(super.delete(e),this):super.set(e,this.fa(t,!0,!0,this.K,!1,this.J))}Ma(e){const t=this.S(e[0],!1,!0);e=e[1],e=this.K?e===void 0?null:e:this.fa(e,!1,!0,void 0,!1,this.J),super.set(t,e)}has(e){return super.has(this.S(e,!1,!1))}get(e){e=this.S(e,!1,!1);const t=super.get(e);if(t!==void 0){var n=this.K;return n?((n=this.fa(t,!1,!0,n,this.ra,this.J))!==t&&super.set(e,n),n):t}}[Symbol.iterator](){return this.entries()}};function i5(e,t,n,a,i,l){return e=fu(e,a,n,l),i&&(e=mu(e)),e}function l5(e){return[e,this.get(e)]}let r5;function Y1(){return r5||(r5=new Gn(lr([]),void 0,void 0,void 0,t5))}function ks(e){return _t?e[_t]:void 0}function Ls(e,t){for(const n in e)!isNaN(n)&&t(e,+n,e[n])}Gn.prototype.toJSON=void 0;var gu=class{};const s5={Ka:!0};function o5(e,t){t<100||ki(H6,1)}function Us(e,t,n,a){const i=a!==void 0;a=!!a;var l,r=_t;!i&&Ui&&r&&(l=e[r])&&Ls(l,o5),r=[];var s=e.length;let c;l=4294967295;let u=!1;const f=!!(64&t),h=f?128&t?0:-1:void 0;1&t||(c=s&&e[s-1],c!=null&&typeof c=="object"&&c.constructor===Object?l=--s:c=void 0,!f||128&t||i||(u=!0,l=l-h+h)),t=void 0;for(var d=0;d<s;d++){let g=e[d];if(g!=null&&(g=n(g,a))!=null)if(f&&d>=l){const v=d-h;(t??(t={}))[v]=g}else r[d]=g}if(c)for(let g in c){if((s=c[g])==null||(s=n(s,a))==null)continue;let v;d=+g,f&&!Number.isNaN(d)&&(v=d+h)<l?r[v]=s:(t??(t={}))[g]=s}return t&&(u?r.push(t):r[l]=t),i&&_t&&(e=ks(e))&&e instanceof gu&&(r[_t]=function(g){const v=new gu;return Ls(g,(S,_,w)=>{v[_]=hn(w)}),v.da=g.da,v}(e)),r}function c5(e){return e[0]=hr(e[0]),e[1]=hr(e[1]),e}function hr(e){switch(typeof e){case"number":return Number.isFinite(e)?e:""+e;case"bigint":return iu(e)?Number(e):""+e;case"boolean":return e?1:0;case"object":if(Array.isArray(e)){var t=0|e[z];return e.length===0&&1&t?void 0:Us(e,t,hr)}if(e!=null&&e[Bi]===Gi)return X1(e);if(e instanceof En){if((t=e.g)==null)e="";else if(typeof t=="string")e=t;else{if(y1){for(var n="",a=0,i=t.length-10240;a<i;)n+=String.fromCharCode.apply(null,t.subarray(a,a+=10240));n+=String.fromCharCode.apply(null,a?t.subarray(a):t),t=btoa(n)}else{n===void 0&&(n=0),m1(),n=w1[n],a=Array(Math.floor(t.length/3)),i=n[64]||"";let u=0,f=0;for(;u<t.length-2;u+=3){var l=t[u],r=t[u+1],s=t[u+2],c=n[l>>2];l=n[(3&l)<<4|r>>4],r=n[(15&r)<<2|s>>6],s=n[63&s],a[f++]=c+l+r+s}switch(c=0,s=i,t.length-u){case 2:s=n[(15&(c=t[u+1]))<<2]||i;case 1:t=t[u],a[f]=n[t>>2]+n[(3&t)<<4|c>>4]+s+i}t=a.join("")}e=e.g=t}return e}return e instanceof Gn?e=e.size!==0?e.V(c5):void 0:void 0}return e}function X1(e){return Us(e=e.v,0|e[z],hr)}let u5,f5;function Pa(e,t){return Q1(e,t[0],t[1])}function Q1(e,t,n,a=0){if(e==null){var i=32;n?(e=[n],i|=128):e=[],t&&(i=-16760833&i|(1023&t)<<14)}else{if(!Array.isArray(e))throw Error("narr");if(i=0|e[z],d1&&1&i)throw Error("rfarr");if(2048&i&&!(2&i)&&function(){if(d1)throw Error("carr");ki(j6,5)}(),256&i)throw Error("farr");if(64&i)return(i|a)!==i&&je(e,i|a),e;if(n&&(i|=128,n!==e[0]))throw Error("mid");e:{i|=64;var l=(n=e).length;if(l){var r=l-1;const c=n[r];if(c!=null&&typeof c=="object"&&c.constructor===Object){if((r-=t=128&i?0:-1)>=1024)throw Error("pvtlmt");for(var s in c)(l=+s)<r&&(n[l+t]=c[s],delete c[s]);i=-16760833&i|(1023&r)<<14;break e}}if(t){if((s=Math.max(t,l-(128&i?0:-1)))>1024)throw Error("spvt");i=-16760833&i|(1023&s)<<14}}}return je(e,64|i|a),e}function d5(e,t){if(typeof e!="object")return e;if(Array.isArray(e)){var n=0|e[z];return e.length===0&&1&n?void 0:K1(e,n,t)}if(e!=null&&e[Bi]===Gi)return Z1(e);if(e instanceof Gn){if(2&(t=e.J))return e;if(!e.size)return;if(n=lr(e.V()),e.K)for(e=0;e<n.length;e++){const a=n[e];let i=a[1];i=i==null||typeof i!="object"?void 0:i!=null&&i[Bi]===Gi?Z1(i):Array.isArray(i)?K1(i,0|i[z],!!(32&t)):void 0,a[1]=i}return n}return e instanceof En?e:void 0}function K1(e,t,n){return 2&t||(!n||4096&t||16&t?e=Fi(e,t,!1,n&&!(16&t)):(ir(e,34),4&t&&Object.freeze(e))),e}function wu(e,t,n){return e=new e.constructor(t),n&&(e.h=Wa),e.m=Wa,e}function Z1(e){const t=e.v,n=0|t[z];return xt(e,n)?e:yu(e,t,n)?wu(e,t):Fi(t,n)}function Fi(e,t,n,a){return a??(a=!!(34&t)),e=Us(e,t,d5,a),a=32,n&&(a|=2),je(e,t=16769217&t|a),e}function mu(e){const t=e.v,n=0|t[z];return xt(e,n)?yu(e,t,n)?wu(e,t,!0):new e.constructor(Fi(t,n,!1)):e}function Yi(e){if(e.h!==Wa)return!1;var t=e.v;return ir(t=Fi(t,0|t[z]),2048),e.v=t,e.h=void 0,e.m=void 0,!0}function Xi(e){if(!Yi(e)&&xt(e,0|e.v[z]))throw Error()}function $a(e,t){t===void 0&&(t=0|e[z]),32&t&&!(4096&t)&&je(e,4096|t)}function yu(e,t,n){return!!(2&n)||!(!(32&n)||4096&n)&&(je(t,2|n),e.h=Wa,!0)}const h5=At(0),fa={};function de(e,t,n,a,i){if((t=Hn(e.v,t,n,i))!==null||a&&e.m!==Wa)return t}function Hn(e,t,n,a){if(t===-1)return null;const i=t+(n?0:-1),l=e.length-1;let r,s;if(!(l<1+(n?0:-1))){if(i>=l)if(r=e[l],r!=null&&typeof r=="object"&&r.constructor===Object)n=r[t],s=!0;else{if(i!==l)return;n=r}else n=e[i];if(a&&n!=null){if((a=a(n))==null)return a;if(!Object.is(a,n))return s?r[t]=a:e[i]=a,a}return n}}function ne(e,t,n,a){Xi(e),Ve(e=e.v,0|e[z],t,n,a)}function Ve(e,t,n,a,i){const l=n+(i?0:-1);var r=e.length-1;if(r>=1+(i?0:-1)&&l>=r){const s=e[r];if(s!=null&&typeof s=="object"&&s.constructor===Object)return s[n]=a,t}return l<=r?(e[l]=a,t):(a!==void 0&&(n>=(r=(t??(t=0|e[z]))>>14&1023||536870912)?a!=null&&(e[r+(i?0:-1)]={[n]:a}):e[l]=a),t)}function ei(){return V6===void 0?2:4}function ti(e,t,n,a,i){let l=e.v,r=0|l[z];a=xt(e,r)?1:a,i=!!i||a===3,a===2&&Yi(e)&&(l=e.v,r=0|l[z]);let s=(e=pu(l,t))===Ja?7:0|e[z],c=vu(s,r);var u=!(4&c);if(u){4&c&&(e=hn(e),s=0,c=ai(c,r),r=Ve(l,r,t,e));let f=0,h=0;for(;f<e.length;f++){const d=n(e[f]);d!=null&&(e[h++]=d)}h<f&&(e.length=h),n=-513&(4|c),c=n&=-1025,c&=-4097}return c!==s&&(je(e,c),2&c&&Object.freeze(e)),I1(e,c,l,r,t,a,u,i)}function I1(e,t,n,a,i,l,r,s){let c=t;return l===1||l===4&&(2&t||!(16&t)&&32&a)?ni(t)||((t|=!e.length||r&&!(4096&t)||32&a&&!(4096&t||16&t)?2:256)!==c&&je(e,t),Object.freeze(e)):(l===2&&ni(t)&&(e=hn(e),c=0,t=ai(t,a),a=Ve(n,a,i,e)),ni(t)||(s||(t|=16),t!==c&&je(e,t))),2&t||!(4096&t||16&t)||$a(n,a),e}function pu(e,t,n){return e=Hn(e,t,n),Array.isArray(e)?e:Ja}function vu(e,t){return 2&t&&(e|=2),1|e}function ni(e){return!!(2&e)&&!!(4&e)||!!(256&e)}function J1(e){return au(e,!0)}function W1(e){e=hn(e);for(let t=0;t<e.length;t++){const n=e[t]=hn(e[t]);Array.isArray(n[1])&&(n[1]=lr(n[1]))}return rr(e)}function da(e,t,n,a){Xi(e),Ve(e=e.v,0|e[z],t,(a==="0"?Number(n)===0:n===a)?void 0:n)}function Qi(e,t,n){if(2&t)throw Error();const a=Hi(t);let i=pu(e,n,a),l=i===Ja?7:0|i[z],r=vu(l,t);return(2&r||ni(r)||16&r)&&(r===l||ni(r)||je(i,r),i=hn(i),l=0,r=ai(r,t),Ve(e,t,n,i,a)),r&=-13,r!==l&&je(i,r),i}function bu(e,t){var n=n0;return Eu(Su(e=e.v),e,void 0,n)===t?t:-1}function Su(e){if(Ui)return e[ar]??(e[ar]=new Map);if(ar in e)return e[ar];const t=new Map;return Object.defineProperty(e,ar,{value:t}),t}function R1(e,t,n,a,i){const l=Su(e),r=Eu(l,e,t,n,i);return r!==a&&(r&&(t=Ve(e,t,r,void 0,i)),l.set(n,a)),t}function Eu(e,t,n,a,i){let l=e.get(a);if(l!=null)return l;l=0;for(let r=0;r<a.length;r++){const s=a[r];Hn(t,s,i)!=null&&(l!==0&&(n=Ve(t,n,l,void 0,i)),l=s)}return e.set(a,l),l}function _u(e,t,n){let a=0|e[z];const i=Hi(a),l=Hn(e,n,i);let r;if(l!=null&&l[Bi]===Gi){if(!xt(l))return Yi(l),l.v;r=l.v}else Array.isArray(l)&&(r=l);if(r){const s=0|r[z];2&s&&(r=Fi(r,s))}return r=Pa(r,t),r!==l&&Ve(e,a,n,r,i),r}function P1(e,t,n,a,i){let l=!1;if((a=Hn(e,a,i,r=>{const s=fu(r,n,!1,t);return l=s!==r&&s!=null,s}))!=null)return l&&!xt(a)&&$a(e,t),a}function J(e,t,n,a){let i=e.v,l=0|i[z];if((t=P1(i,l,t,n,a))==null)return t;if(l=0|i[z],!xt(e,l)){const r=mu(t);r!==t&&(Yi(e)&&(i=e.v,l=0|i[z]),l=Ve(i,l,n,t=r,a),$a(i,l))}return t}function $1(e,t,n,a,i,l,r,s){var c=xt(e,n);l=c?1:l,r=!!r||l===3,c=s&&!c,(l===2||c)&&Yi(e)&&(n=0|(t=e.v)[z]);var u=(e=pu(t,i))===Ja?7:0|e[z],f=vu(u,n);if(s=!(4&f)){var h=e,d=n;const g=!!(2&f);g&&(d|=2);let v=!g,S=!0,_=0,w=0;for(;_<h.length;_++){const m=fu(h[_],a,!1,d);if(m instanceof a){if(!g){const p=xt(m);v&&(v=!p),S&&(S=p)}h[w++]=m}}w<_&&(h.length=w),f|=4,f=S?-4097&f:4096|f,f=v?8|f:-9&f}if(f!==u&&(je(e,f),2&f&&Object.freeze(e)),c&&!(8&f||!e.length&&(l===1||l===4&&(2&f||!(16&f)&&32&n)))){for(ni(f)&&(e=hn(e),f=ai(f,n),n=Ve(t,n,i,e)),a=e,c=f,u=0;u<a.length;u++)(h=a[u])!==(f=mu(h))&&(a[u]=f);c|=8,je(e,f=c=a.length?4096|c:-4097&c)}return I1(e,f,t,n,i,l,s,r)}function jn(e,t,n){const a=e.v;return $1(e,a,0|a[z],t,n,ei(),!1,!0)}function eh(e){return e==null&&(e=void 0),e}function B(e,t,n,a,i){return ne(e,n,a=eh(a),i),a&&!xt(a)&&$a(e.v),e}function gr(e,t,n,a){e:{var i=a=eh(a);Xi(e);const l=e.v;let r=0|l[z];if(i==null){const s=Su(l);if(Eu(s,l,r,n)!==t)break e;s.set(n,0)}else r=R1(l,r,n,t);Ve(l,r,t,i)}a&&!xt(a)&&$a(e.v)}function ai(e,t){return-273&(2&t?2|e:-3&e)}function xu(e,t,n,a){var i=a;Xi(e),e=$1(e,a=e.v,0|a[z],n,t,2,!0),i=i??new n,e.push(i),t=n=e===Ja?7:0|e[z],(i=xt(i))?(n&=-9,e.length===1&&(n&=-4097)):n|=4096,n!==t&&je(e,n),i||$a(a)}function Zt(e,t,n){return qi(de(e,t,void 0,n))}function th(e){return(Pc?de(e,2,void 0,void 0,zs):zs(de(e,2)))??h5}function Ae(e,t){return de(e,t,void 0,void 0,xn)??0}function Vn(e,t,n){if(n!=null){if(typeof n!="number"||!Os(n))throw tu("int32");n|=0}ne(e,t,n)}function U(e,t,n){ne(e,t,cr(n))}function Tt(e,t,n){da(e,t,dr(n),"")}function Bs(e,t,n){{Xi(e);const r=e.v;let s=0|r[z];if(n==null)Ve(r,s,t);else{var a=e=n===Ja?7:0|n[z],i=ni(e),l=i||Object.isFrozen(n);for(i||(e=0),l||(n=hn(n),a=0,e=ai(e,s),l=!1),e|=5,e|=(4&e?512&e?512:1024&e?1024:0:void 0)??(Pc?1024:0),i=0;i<n.length;i++){const c=n[i],u=q1(c);Object.is(c,u)||(l&&(n=hn(n),a=0,e=ai(e,s),l=!1),n[i]=u)}e!==a&&(l&&(n=hn(n),e=ai(e,s)),je(n,e)),Ve(r,s,t,n)}}}function Gs(e,t,n){Xi(e),ti(e,t,Pe,2,!0).push(q1(n))}var Ki=class{constructor(e,t,n){if(this.buffer=e,n&&!t)throw Error();this.g=t}};function Au(e,t){if(typeof e=="string")return new Ki(v1(e),t);if(Array.isArray(e))return new Ki(new Uint8Array(e),t);if(e.constructor===Uint8Array)return new Ki(e,!1);if(e.constructor===ArrayBuffer)return e=new Uint8Array(e),new Ki(e,!1);if(e.constructor===En)return t=eu(e)||new Uint8Array(0),new Ki(t,!0,e);if(e instanceof Uint8Array)return e=e.constructor===Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Ki(e,!1);throw Error()}function Zi(e,t){let n,a=0,i=0,l=0;const r=e.h;let s=e.g;do n=r[s++],a|=(127&n)<<l,l+=7;while(l<32&&128&n);if(l>32)for(i|=(127&n)>>4,l=3;l<32&&128&n;l+=7)n=r[s++],i|=(127&n)<<l;if(ii(e,s),!(128&n))return t(a>>>0,i>>>0);throw Error()}function Tu(e){let t=0,n=e.g;const a=n+10,i=e.h;for(;n<a;){const l=i[n++];if(t|=l,(128&l)==0)return ii(e,n),!!(127&t)}throw Error()}function ha(e){const t=e.h;let n=e.g,a=t[n++],i=127&a;if(128&a&&(a=t[n++],i|=(127&a)<<7,128&a&&(a=t[n++],i|=(127&a)<<14,128&a&&(a=t[n++],i|=(127&a)<<21,128&a&&(a=t[n++],i|=a<<28,128&a&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++]&&128&t[n++])))))throw Error();return ii(e,n),i}function qn(e){return ha(e)>>>0}function Hs(e){var t=e.h;const n=e.g;var a=t[n],i=t[n+1];const l=t[n+2];return t=t[n+3],ii(e,e.g+4),e=2*((i=(a<<0|i<<8|l<<16|t<<24)>>>0)>>31)+1,a=i>>>23&255,i&=8388607,a==255?i?NaN:e*(1/0):a==0?1401298464324817e-60*e*i:e*Math.pow(2,a-150)*(i+8388608)}function g5(e){return ha(e)}function ii(e,t){if(e.g=t,t>e.l)throw Error()}function nh(e,t){if(t<0)throw Error();const n=e.g;if((t=n+t)>e.l)throw Error();return e.g=t,n}function ah(e,t){if(t==0)return Ia();var n=nh(e,t);return e.Y&&e.j?n=e.h.subarray(n,n+t):(e=e.h,n=n===(t=n+t)?new Uint8Array(0):Z6?e.slice(n,t):new Uint8Array(e.subarray(n,t))),n.length==0?Ia():new En(n,zi)}var ih=[];function lh(e,t,n,a){if(qs.length){const i=qs.pop();return i.o(a),i.g.init(e,t,n,a),i}return new w5(e,t,n,a)}function rh(e){e.g.clear(),e.l=-1,e.h=-1,qs.length<100&&qs.push(e)}function sh(e){var t=e.g;if(t.g==t.l)return!1;e.m=e.g.g;var n=qn(e.g);if(t=n>>>3,!((n&=7)>=0&&n<=5)||t<1)throw Error();return e.l=t,e.h=n,!0}function js(e){switch(e.h){case 0:e.h!=0?js(e):Tu(e.g);break;case 1:ii(e=e.g,e.g+8);break;case 2:if(e.h!=2)js(e);else{var t=qn(e.g);ii(e=e.g,e.g+t)}break;case 5:ii(e=e.g,e.g+4);break;case 3:for(t=e.l;;){if(!sh(e))throw Error();if(e.h==4){if(e.l!=t)throw Error();break}js(e)}break;default:throw Error()}}function wr(e,t,n){const a=e.g.l;var i=qn(e.g);let l=(i=e.g.g+i)-a;if(l<=0&&(e.g.l=i,n(t,e,void 0,void 0,void 0),l=i-e.g.g),l)throw Error();return e.g.g=i,e.g.l=a,t}function Nu(e){var t=qn(e.g),n=nh(e=e.g,t);if(e=e.h,T6){var a,i=e;(a=Jc)||(a=Jc=new TextDecoder("utf-8",{fatal:!0})),t=n+t,i=n===0&&t===i.length?i:i.subarray(n,t);try{var l=a.decode(i)}catch(s){if(Ts===void 0){try{a.decode(new Uint8Array([128]))}catch{}try{a.decode(new Uint8Array([97])),Ts=!0}catch{Ts=!1}}throw!Ts&&(Jc=void 0),s}}else{t=(l=n)+t,n=[];let s,c=null;for(;l<t;){var r=e[l++];r<128?n.push(r):r<224?l>=t?Za():(s=e[l++],r<194||(192&s)!=128?(l--,Za()):n.push((31&r)<<6|63&s)):r<240?l>=t-1?Za():(s=e[l++],(192&s)!=128||r===224&&s<160||r===237&&s>=160||(192&(a=e[l++]))!=128?(l--,Za()):n.push((15&r)<<12|(63&s)<<6|63&a)):r<=244?l>=t-2?Za():(s=e[l++],(192&s)!=128||s-144+(r<<28)>>30||(192&(a=e[l++]))!=128||(192&(i=e[l++]))!=128?(l--,Za()):(r=(7&r)<<18|(63&s)<<12|(63&a)<<6|63&i,r-=65536,n.push(55296+(r>>10&1023),56320+(1023&r)))):Za(),n.length>=8192&&(c=c1(c,n),n.length=0)}l=c1(c,n)}return l}function oh(e){const t=qn(e.g);return ah(e.g,t)}function Vs(e,t,n){var a=qn(e.g);for(a=e.g.g+a;e.g.g<a;)n.push(t(e.g))}var w5=class{constructor(e,t,n,a){if(ih.length){const i=ih.pop();i.init(e,t,n,a),e=i}else e=new class{constructor(i,l,r,s){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.init(i,l,r,s)}init(i,l,r,{Y:s=!1,ea:c=!1}={}){this.Y=s,this.ea=c,i&&(i=Au(i,this.ea),this.h=i.buffer,this.j=i.g,this.m=l||0,this.l=r!==void 0?this.m+r:this.h.length,this.g=this.m)}clear(){this.h=null,this.j=!1,this.g=this.l=this.m=0,this.Y=!1}}(e,t,n,a);this.g=e,this.m=this.g.g,this.h=this.l=-1,this.o(a)}o({ha:e=!1}={}){this.ha=e}},qs=[];function ch(e){return e?/^\d+$/.test(e)?(Ds(e),new Mu(me,Oe)):null:m5||(m5=new Mu(0,0))}var Mu=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let m5;function uh(e){return e?/^-?\d+$/.test(e)?(Ds(e),new Cu(me,Oe)):null:y5||(y5=new Cu(0,0))}var Cu=class{constructor(e,t){this.h=e>>>0,this.g=t>>>0}};let y5;function Ii(e,t,n){for(;n>0||t>127;)e.g.push(127&t|128),t=(t>>>7|n<<25)>>>0,n>>>=7;e.g.push(t)}function Ji(e,t){for(;t>127;)e.g.push(127&t|128),t>>>=7;e.g.push(t)}function Fs(e,t){if(t>=0)Ji(e,t);else{for(let n=0;n<9;n++)e.g.push(127&t|128),t>>=7;e.g.push(1)}}function Du(e){var t=me;e.g.push(t>>>0&255),e.g.push(t>>>8&255),e.g.push(t>>>16&255),e.g.push(t>>>24&255)}function Wi(e,t){t.length!==0&&(e.l.push(t),e.h+=t.length)}function It(e,t,n){Ji(e.g,8*t+n)}function Ou(e,t){return It(e,t,2),t=e.g.end(),Wi(e,t),t.push(e.h),t}function zu(e,t){var n=t.pop();for(n=e.h+e.g.length()-n;n>127;)t.push(127&n|128),n>>>=7,e.h++;t.push(n),e.h++}function Ys(e,t,n){It(e,t,2),Ji(e.g,n.length),Wi(e,e.g.end()),Wi(e,n)}function Xs(e,t,n,a){n!=null&&(t=Ou(e,t),a(n,e),zu(e,t))}function An(){const e=class{constructor(){throw Error()}};return Object.setPrototypeOf(e,e.prototype),e}var ku=An(),fh=An(),Lu=An(),Uu=An(),dh=An(),hh=An(),p5=An(),Qs=An(),gh=An(),wh=An();function Tn(e,t,n){var a=e.v;_t&&_t in a&&(a=a[_t])&&delete a[t.g],t.h?t.j(e,t.h,t.g,n,t.l):t.j(e,t.g,n,t.l)}var k=class{constructor(e,t){this.v=Q1(e,t,void 0,2048)}toJSON(){return X1(this)}j(){var i;var e=ey,t=this.v,n=e.g,a=_t;if(Ui&&a&&((i=t[a])==null?void 0:i[n])!=null&&ki(G6,3),t=e.g,_1&&_t&&_1===void 0&&(a=(n=this.v)[_t])&&(a=a.da))try{a(n,t,s5)}catch(l){f1(l)}return e.h?e.m(this,e.h,e.g,e.l):e.m(this,e.g,e.defaultValue,e.l)}clone(){const e=this.v,t=0|e[z];return yu(this,e,t)?wu(this,e,!0):new this.constructor(Fi(e,t,!1))}};k.prototype[Bi]=Gi,k.prototype.toString=function(){return this.v.toString()};var Ri=class{constructor(e,t,n){this.g=e,this.h=t,e=ku,this.l=!!e&&n===e||!1}};function Ks(e,t){return new Ri(e,t,ku)}function mh(e,t,n,a,i){Xs(e,n,Eh(t,a),i)}const v5=Ks(function(e,t,n,a,i){return e.h===2&&(wr(e,_u(t,a,n),i),!0)},mh),b5=Ks(function(e,t,n,a,i){return e.h===2&&(wr(e,_u(t,a,n),i),!0)},mh);var Zs=Symbol(),Is=Symbol(),Bu=Symbol(),yh=Symbol(),ph=Symbol();let vh,bh;function li(e,t,n,a){var i=a[e];if(i)return i;(i={}).qa=a,i.T=function(h){switch(typeof h){case"boolean":return u5||(u5=[0,void 0,!0]);case"number":return h>0?void 0:h===0?f5||(f5=[0,void 0]):[-h,void 0];case"string":return[0,h];case"object":return h}}(a[0]);var l=a[1];let r=1;l&&l.constructor===Object&&(i.ba=l,typeof(l=a[++r])=="function"&&(i.ma=!0,vh??(vh=l),bh??(bh=a[r+1]),l=a[r+=2]));const s={};for(;l&&Array.isArray(l)&&l.length&&typeof l[0]=="number"&&l[0]>0;){for(var c=0;c<l.length;c++)s[l[c]]=l;l=a[++r]}for(c=1;l!==void 0;){let h;typeof l=="number"&&(c+=l,l=a[++r]);var u=void 0;if(l instanceof Ri?h=l:(h=v5,r--),h==null?void 0:h.l){l=a[++r],u=a;var f=r;typeof l=="function"&&(l=l(),u[f]=l),u=l}for(f=c+1,typeof(l=a[++r])=="number"&&l<0&&(f-=l,l=a[++r]);c<f;c++){const d=s[c];u?n(i,c,h,u,d):t(i,c,h,d)}}return a[e]=i}function Sh(e){return Array.isArray(e)?e[0]instanceof Ri?e:[b5,e]:[e,void 0]}function Eh(e,t){return e instanceof k?e.v:Array.isArray(e)?Pa(e,t):void 0}function Gu(e,t,n,a){const i=n.g;e[t]=a?(l,r,s)=>i(l,r,s,a):i}function Hu(e,t,n,a,i){const l=n.g;let r,s;e[t]=(c,u,f)=>l(c,u,f,s||(s=li(Is,Gu,Hu,a).T),r||(r=ju(a)),i)}function ju(e){let t=e[Bu];if(t!=null)return t;const n=li(Is,Gu,Hu,e);return t=n.ma?(a,i)=>vh(a,i,n):(a,i)=>{for(;sh(i)&&i.h!=4;){var l=i.l,r=n[l];if(r==null){var s=n.ba;s&&(s=s[l])&&(s=E5(s))!=null&&(r=n[l]=s)}if(r==null||!r(i,a,l)){if(r=(s=i).m,js(s),s.ha)var c=void 0;else c=s.g.g-r,s.g.g=r,c=ah(s.g,c);r=void 0,s=a,c&&((r=s[_t]??(s[_t]=new gu))[l]??(r[l]=[])).push(c)}}return(a=ks(a))&&(a.da=n.qa[ph]),!0},e[Bu]=t,e[ph]=S5.bind(e),t}function S5(e,t,n,a){var i=this[Is];const l=this[Bu],r=Pa(void 0,i.T),s=ks(e);if(s){var c=!1,u=i.ba;if(u){if(i=(f,h,d)=>{if(d.length!==0)if(u[h])for(const g of d){f=lh(g);try{c=!0,l(r,f)}finally{rh(f)}}else a==null||a(e,h,d)},t==null)Ls(s,i);else if(s!=null){const f=s[t];f&&i(s,t,f)}if(c){let f=0|e[z];if(2&f&&2048&f&&!(n!=null&&n.Ka))throw Error();const h=Hi(f),d=(g,v)=>{if(Hn(e,g,h)!=null){if((n==null?void 0:n.Qa)===1)return;throw Error()}v!=null&&(f=Ve(e,f,g,v,h)),delete s[g]};t==null?M1(r,0|r[z],(g,v)=>{d(g,v)}):d(t,Hn(r,t,h))}}}}function E5(e){const t=(e=Sh(e))[0].g;if(e=e[1]){const n=ju(e),a=li(Is,Gu,Hu,e).T;return(i,l,r)=>t(i,l,r,a,n)}return t}function Js(e,t,n){e[t]=n.h}function Ws(e,t,n,a){let i,l;const r=n.h;e[t]=(s,c,u)=>r(s,c,u,l||(l=li(Zs,Js,Ws,a).T),i||(i=_h(a)))}function _h(e){let t=e[yh];if(!t){const n=li(Zs,Js,Ws,e);t=(a,i)=>xh(a,i,n),e[yh]=t}return t}function xh(e,t,n){M1(e,0|e[z],(a,i)=>{if(i!=null){var l=function(r,s){var c=r[s];if(c)return c;if((c=r.ba)&&(c=c[s])){var u=(c=Sh(c))[0].h;if(c=c[1]){const f=_h(c),h=li(Zs,Js,Ws,c).T;c=r.ma?bh(h,f):(d,g,v)=>u(d,g,v,h,f)}else c=u;return r[s]=c}}(n,a);l?l(t,i,a):a<500||ki(nu,3)}}),(e=ks(e))&&Ls(e,(a,i,l)=>{for(Wi(t,t.g.end()),a=0;a<l.length;a++)Wi(t,eu(l[a])||new Uint8Array(0))})}const _5=At(0);function Pi(e,t){if(Array.isArray(t)){var n=0|t[z];if(4&n)return t;for(var a=0,i=0;a<t.length;a++){const l=e(t[a]);l!=null&&(t[i++]=l)}return i<a&&(t.length=i),(e=-1537&(5|n))!==n&&je(t,e),2&e&&Object.freeze(t),t}}function lt(e,t,n){return new Ri(e,t,n)}function $i(e,t,n){return new Ri(e,t,n)}function Xe(e,t,n){Ve(e,0|e[z],t,n,Hi(0|e[z]))}var x5=Ks(function(e,t,n,a,i){if(e.h!==2)return!1;if(e=hn(e=wr(e,Pa([void 0,void 0],a),i)),i=Hi(a=0|t[z]),2&a)throw Error();let l=Hn(t,n,i);if(l instanceof Gn)2&l.J?(l=l.V(),l.push(e),Ve(t,a,n,l,i)):l.Ma(e);else if(Array.isArray(l)){var r=0|l[z];8192&r||je(l,r|=8192),2&r&&(l=W1(l),Ve(t,a,n,l,i)),l.push(e)}else Ve(t,a,n,rr([e]),i);return!0},function(e,t,n,a,i){if(t instanceof Gn)t.forEach((l,r)=>{Xs(e,n,Pa([r,l],a),i)});else if(Array.isArray(t)){for(let l=0;l<t.length;l++){const r=t[l];Array.isArray(r)&&Xs(e,n,Pa(r,a),i)}rr(t)}});function Ah(e,t,n){(t=xn(t))!=null&&(It(e,n,5),e=e.g,lu(t),Du(e))}function Th(e,t,n){if(t=function(a){if(a==null)return a;const i=typeof a;if(i==="bigint")return String(or(64,a));if(fr(a)){if(i==="string")return H1(a);if(i==="number")return uu(a)}}(t),t!=null&&(typeof t=="string"&&uh(t),t!=null))switch(It(e,n,0),typeof t){case"number":e=e.g,ji(t),Ii(e,me,Oe);break;case"bigint":n=BigInt.asUintN(64,t),n=new Cu(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ii(e.g,n.h,n.g);break;default:n=uh(t),Ii(e.g,n.h,n.g)}}function Nh(e,t,n){(t=qi(t))!=null&&t!=null&&(It(e,n,0),Fs(e.g,t))}function Mh(e,t,n){(t=U1(t))!=null&&(It(e,n,0),e.g.g.push(t?1:0))}function Ch(e,t,n){(t=Pe(t))!=null&&Ys(e,n,u1(t))}function Dh(e,t,n,a,i){Xs(e,n,Eh(t,a),i)}function Oh(e,t,n){(t=t==null||typeof t=="string"||t instanceof En?t:void 0)!=null&&Ys(e,n,Au(t,!0).buffer)}function zh(e,t,n){return(e.h===5||e.h===2)&&(t=Qi(t,0|t[z],n),e.h==2?Vs(e,Hs,t):t.push(Hs(e.g)),!0)}var ze=lt(function(e,t,n){return e.h===5&&(Xe(t,n,Hs(e.g)),!0)},Ah,Qs),A5=$i(zh,function(e,t,n){if((t=Pi(xn,t))!=null)for(let r=0;r<t.length;r++){var a=e,i=n,l=t[r];l!=null&&(It(a,i,5),a=a.g,lu(l),Du(a))}},Qs),Vu=$i(zh,function(e,t,n){if((t=Pi(xn,t))!=null&&t.length){It(e,n,2),Ji(e.g,4*t.length);for(let a=0;a<t.length;a++)n=e.g,lu(t[a]),Du(n)}},Qs),T5=lt(function(e,t,n){return e.h===5&&(Xe(t,n,(e=Hs(e.g))===0?void 0:e),!0)},Ah,Qs),ga=lt(function(e,t,n){return Rc?(e.h!==0?e=!1:(Xe(t,n,Zi(e.g,k1)),e=!0),e):e.h===0&&(Xe(t,n,Zi(e.g,su)),!0)},Th,hh),qu=lt(function(e,t,n){return Rc?(e.h!==0?t=!1:(Xe(t,n,(e=Zi(e.g,k1))===_5?void 0:e),t=!0),t):e.h===0&&(Xe(t,n,(e=Zi(e.g,su))===0?void 0:e),!0)},Th,hh),N5=lt(function(e,t,n){return Rc?(e.h!==0?e=!1:(Xe(t,n,Zi(e.g,J6)),e=!0),e):e.h===0&&(Xe(t,n,Zi(e.g,ru)),!0)},function(e,t,n){if(t=function(a){if(a==null)return a;var i=typeof a;if(i==="bigint")return String(W6(64,a));if(fr(a)){if(i==="string")return i=Vi(Number(a)),Ra(i)&&i>=0?a=String(i):((i=a.indexOf("."))!==-1&&(a=a.substring(0,i)),(i=a[0]!=="-"&&((i=a.length)<20||i===20&&a<="18446744073709551615"))||(Ds(a),a=sr(me,Oe))),a;if(i==="number")return(a=Vi(a))>=0&&Ra(a)||(ji(a),a=ru(me,Oe)),a}}(t),t!=null&&(typeof t=="string"&&ch(t),t!=null))switch(It(e,n,0),typeof t){case"number":e=e.g,ji(t),Ii(e,me,Oe);break;case"bigint":n=BigInt.asUintN(64,t),n=new Mu(Number(n&BigInt(4294967295)),Number(n>>BigInt(32))),Ii(e.g,n.h,n.g);break;default:n=ch(t),Ii(e.g,n.h,n.g)}},p5),Qe=lt(function(e,t,n){return e.h===0&&(Xe(t,n,ha(e.g)),!0)},Nh,Uu),mr=$i(function(e,t,n){return(e.h===0||e.h===2)&&(t=Qi(t,0|t[z],n),e.h==2?Vs(e,ha,t):t.push(ha(e.g)),!0)},function(e,t,n){if((t=Pi(qi,t))!=null&&t.length){n=Ou(e,n);for(let a=0;a<t.length;a++)Fs(e.g,t[a]);zu(e,n)}},Uu),el=lt(function(e,t,n){return e.h===0&&(Xe(t,n,(e=ha(e.g))===0?void 0:e),!0)},Nh,Uu),Te=lt(function(e,t,n){return e.h===0&&(Xe(t,n,Tu(e.g)),!0)},Mh,fh),ri=lt(function(e,t,n){return e.h===0&&(Xe(t,n,(e=Tu(e.g))===!1?void 0:e),!0)},Mh,fh),it=$i(function(e,t,n){return e.h===2&&(e=Nu(e),Qi(t,0|t[z],n).push(e),!0)},function(e,t,n){if((t=Pi(Pe,t))!=null)for(let r=0;r<t.length;r++){var a=e,i=n,l=t[r];l!=null&&Ys(a,i,u1(l))}},Lu),wa=lt(function(e,t,n){return e.h===2&&(Xe(t,n,(e=Nu(e))===""?void 0:e),!0)},Ch,Lu),se=lt(function(e,t,n){return e.h===2&&(Xe(t,n,Nu(e)),!0)},Ch,Lu),Ke=function(e,t,n=ku){return new Ri(e,t,n)}(function(e,t,n,a,i){return e.h===2&&(a=Pa(void 0,a),Qi(t,0|t[z],n).push(a),wr(e,a,i),!0)},function(e,t,n,a,i){if(Array.isArray(t)){for(let l=0;l<t.length;l++)Dh(e,t[l],n,a,i);1&(e=0|t[z])||je(t,1|e)}}),Ne=Ks(function(e,t,n,a,i,l){if(e.h!==2)return!1;let r=0|t[z];return R1(t,r,l,n,Hi(r)),wr(e,t=_u(t,a,n),i),!0},Dh),kh=lt(function(e,t,n){return e.h===2&&(Xe(t,n,oh(e)),!0)},Oh,gh),M5=$i(function(e,t,n){return(e.h===0||e.h===2)&&(t=Qi(t,0|t[z],n),e.h==2?Vs(e,qn,t):t.push(qn(e.g)),!0)},function(e,t,n){if((t=Pi(B1,t))!=null)for(let r=0;r<t.length;r++){var a=e,i=n,l=t[r];l!=null&&(It(a,i,0),Ji(a.g,l))}},dh),C5=lt(function(e,t,n){return e.h===0&&(Xe(t,n,(e=qn(e.g))===0?void 0:e),!0)},function(e,t,n){(t=B1(t))!=null&&t!=null&&(It(e,n,0),Ji(e.g,t))},dh),Nt=lt(function(e,t,n){return e.h===0&&(Xe(t,n,ha(e.g)),!0)},function(e,t,n){(t=qi(t))!=null&&(t=parseInt(t,10),It(e,n,0),Fs(e.g,t))},wh);class D5{constructor(t,n){var a=Mt;this.g=t,this.h=n,this.m=J,this.j=B,this.defaultValue=void 0,this.l=a.Oa!=null?C1:void 0}register(){Ns(this)}}function Nn(e,t){return new D5(e,t)}function ma(e,t){return(n,a)=>{{const l={ea:!0};a&&Object.assign(l,a),n=lh(n,void 0,void 0,l);try{const r=new e,s=r.v;ju(t)(s,n);var i=r}finally{rh(n)}}return i}}function Rs(e){return function(){const t=new class{constructor(){this.l=[],this.h=0,this.g=new class{constructor(){this.g=[]}length(){return this.g.length}end(){const r=this.g;return this.g=[],r}}}};xh(this.v,t,li(Zs,Js,Ws,e)),Wi(t,t.g.end());const n=new Uint8Array(t.h),a=t.l,i=a.length;let l=0;for(let r=0;r<i;r++){const s=a[r];n.set(s,l),l+=s.length}return t.l=[n],n}}var Lh=class extends k{constructor(e){super(e)}},Uh=[0,wa,lt(function(e,t,n){return e.h===2&&(Xe(t,n,(e=oh(e))===Ia()?void 0:e),!0)},function(e,t,n){if(t!=null){if(t instanceof k){const a=t.Ra;return void(a?(t=a(t),t!=null&&Ys(e,n,Au(t,!0).buffer)):ki(nu,3))}if(Array.isArray(t))return void ki(nu,3)}Oh(e,t,n)},gh)];let Fu,Bh=globalThis.trustedTypes;function Gh(e){var t;return Fu===void 0&&(Fu=function(){let n=null;if(!Bh)return n;try{const a=i=>i;n=Bh.createPolicy("goog#html",{createHTML:a,createScript:a,createScriptURL:a})}catch{}return n}()),e=(t=Fu)?t.createScriptURL(e):e,new class{constructor(n){this.g=n}toString(){return this.g+""}}(e)}function O5(e,...t){if(t.length===0)return Gh(e[0]);let n=e[0];for(let a=0;a<t.length;a++)n+=encodeURIComponent(t[a])+e[a+1];return Gh(n)}var Hh=[0,Qe,Nt,Te,-1,mr,Nt,-1,Te],z5=class extends k{constructor(e){super(e)}},jh=[0,Te,se,Te,Nt,-1,$i(function(e,t,n){return(e.h===0||e.h===2)&&(t=Qi(t,0|t[z],n),e.h==2?Vs(e,g5,t):t.push(ha(e.g)),!0)},function(e,t,n){if((t=Pi(qi,t))!=null&&t.length){n=Ou(e,n);for(let a=0;a<t.length;a++)Fs(e.g,t[a]);zu(e,n)}},wh),se,-1,[0,Te,-1],Nt,Te,-1],Vh=[0,3,Te,-1,2,[0,Qe],[0,Nt,Te],[0,se,-1],[0]],qh=[0,se,-2],Fh=class extends k{constructor(e){super(e)}},Yh=[0],Xh=[0,Qe,Te,1,Te,-4],Mt=class extends k{constructor(e){super(e,2)}},qe={};qe[336783863]=[0,se,Te,-1,Qe,[0,[1,2,3,4,5,6,7,8,9],Ne,Yh,Ne,jh,Ne,qh,Ne,Xh,Ne,Hh,Ne,[0,se,-2],Ne,[0,se,Nt],Ne,Vh,Ne,[0,Nt,-1,Te]],[0,se],Te,[0,[1,3],[2,4],Ne,[0,mr],-1,Ne,[0,it],-1,Ke,[0,se,-1]],se];var Qh=[0,qu,-1,ri,-3,qu,mr,wa,el,qu,-1,ri,el,ri,-2,wa];function he(e,t){Gs(e,3,t)}function K(e,t){Gs(e,4,t)}var dt=class extends k{constructor(e){super(e,500)}o(e){return B(this,0,7,e)}},yr=[-1,{}],Kh=[0,se,1,yr],Zh=[0,se,it,yr];function Jt(e,t){xu(e,1,dt,t)}function ye(e,t){Gs(e,10,t)}function W(e,t){Gs(e,15,t)}var Ct=class extends k{constructor(e){super(e,500)}o(e){return B(this,0,1001,e)}},Ih=[-500,Ke,[-500,wa,-1,it,-3,[-2,qe,Te],Ke,Uh,el,-1,Kh,Zh,Ke,[0,wa,ri],wa,Qh,el,it,987,it],4,Ke,[-500,se,-1,[-1,{}],998,se],Ke,[-500,se,it,-1,[-2,{},Te],997,it,-1],el,Ke,[-500,se,it,yr,998,it],it,el,Kh,Zh,Ke,[0,wa,-1,yr],it,-2,Qh,wa,-1,ri,[0,ri,C5],978,yr,Ke,Uh];Ct.prototype.g=Rs(Ih);var k5=ma(Ct,Ih),L5=class extends k{constructor(e){super(e)}},Jh=class extends k{constructor(e){super(e)}g(){return jn(this,L5,1)}},Wh=[0,Ke,[0,Qe,ze,se,-1]],Ps=ma(Jh,Wh),U5=class extends k{constructor(e){super(e)}},B5=class extends k{constructor(e){super(e)}},Yu=class extends k{constructor(e){super(e)}l(){return J(this,U5,2)}g(){return jn(this,B5,5)}},Rh=ma(class extends k{constructor(e){super(e)}},[0,it,mr,Vu,[0,Nt,[0,Qe,-3],[0,ze,-3],[0,Qe,-1,[0,Ke,[0,Qe,-2]]],Ke,[0,ze,-1,se,ze]],se,-1,ga,Ke,[0,Qe,ze],it,ga]),Ph=class extends k{constructor(e){super(e)}},tl=ma(class extends k{constructor(e){super(e)}},[0,Ke,[0,ze,-4]]),$h=class extends k{constructor(e){super(e)}},pr=ma(class extends k{constructor(e){super(e)}},[0,Ke,[0,ze,-4]]),G5=class extends k{constructor(e){super(e)}},H5=[0,Qe,-1,Vu,Nt],e0=class extends k{constructor(e){super(e)}};e0.prototype.g=Rs([0,ze,-4,ga]);var j5=class extends k{constructor(e){super(e)}},V5=ma(class extends k{constructor(e){super(e)}},[0,Ke,[0,1,Qe,se,Wh],ga]),t0=class extends k{constructor(e){super(e)}},q5=class extends k{constructor(e){super(e)}na(){const e=de(this,1,void 0,void 0,J1);return e??Ia()}},F5=class extends k{constructor(e){super(e)}},n0=[1,2],Y5=ma(class extends k{constructor(e){super(e)}},[0,Ke,[0,n0,Ne,[0,Vu],Ne,[0,kh],Qe,se],ga]),Xu=class extends k{constructor(e){super(e)}},a0=[0,se,Qe,ze,it,-1],i0=class extends k{constructor(e){super(e)}},X5=[0,Te,-1],l0=class extends k{constructor(e){super(e)}},$s=[1,2,3,4,5,6],eo=class extends k{constructor(e){super(e)}g(){return de(this,1,void 0,void 0,J1)!=null}l(){return Pe(de(this,2))!=null}},ve=class extends k{constructor(e){super(e)}g(){return U1(de(this,2))??!1}},r0=[0,kh,se,[0,Qe,ga,-1],[0,N5,ga]],ke=[0,r0,Te,[0,$s,Ne,Xh,Ne,jh,Ne,Hh,Ne,Yh,Ne,qh,Ne,Vh],Nt],to=class extends k{constructor(e){super(e)}},Qu=[0,ke,ze,-1,Qe],Q5=Nn(502141897,to);qe[502141897]=Qu;var K5=ma(class extends k{constructor(e){super(e)}},[0,[0,Nt,-1,A5,M5],H5]),s0=class extends k{constructor(e){super(e)}},o0=class extends k{constructor(e){super(e)}},Ku=[0,ke,ze,[0,ke],Te],Z5=Nn(508968150,o0);qe[508968150]=[0,ke,Qu,Ku,ze,[0,[0,r0]]],qe[508968149]=Ku;var nl=class extends k{constructor(e){super(e)}l(){return J(this,Xu,2)}g(){ne(this,2)}},c0=[0,ke,a0];qe[478825465]=c0;var I5=class extends k{constructor(e){super(e)}},u0=class extends k{constructor(e){super(e)}},Zu=class extends k{constructor(e){super(e)}},Iu=class extends k{constructor(e){super(e)}},f0=class extends k{constructor(e){super(e)}},d0=[0,ke,[0,ke],c0,-1],h0=[0,ke,ze,Qe],Ju=[0,ke,ze],g0=[0,ke,h0,Ju,ze],J5=Nn(479097054,f0);qe[479097054]=[0,ke,g0,d0],qe[463370452]=d0,qe[464864288]=h0;var W5=Nn(462713202,Iu);qe[462713202]=g0,qe[474472470]=Ju;var R5=class extends k{constructor(e){super(e)}},w0=class extends k{constructor(e){super(e)}},m0=class extends k{constructor(e){super(e)}},y0=class extends k{constructor(e){super(e)}},Wu=[0,ke,ze,-1,Qe],Ru=[0,ke,ze,Te];y0.prototype.g=Rs([0,ke,Ju,[0,ke],Qu,Ku,Wu,Ru]);var p0=class extends k{constructor(e){super(e)}},P5=Nn(456383383,p0);qe[456383383]=[0,ke,a0];var v0=class extends k{constructor(e){super(e)}},$5=Nn(476348187,v0);qe[476348187]=[0,ke,X5];var b0=class extends k{constructor(e){super(e)}},S0=class extends k{constructor(e){super(e)}},E0=[0,Nt,-1],ey=Nn(458105876,class extends k{constructor(e){super(e)}g(){let e;var t=this.v;const n=0|t[z];return e=xt(this,n),t=function(a,i,l,r){var s=S0;!r&&Yi(a)&&(l=0|(i=a.v)[z]);var c=Hn(i,2);if(a=!1,c==null){if(r)return Y1();c=[]}else if(c.constructor===Gn){if(!(2&c.J)||r)return c;c=c.V()}else Array.isArray(c)?a=!!(2&(0|c[z])):c=[];if(r){if(!c.length)return Y1();a||(a=!0,lr(c))}else a&&(a=!1,rr(c),c=W1(c));return!a&&32&l&&ir(c,32),l=Ve(i,l,2,r=new Gn(c,s,e5,void 0)),a||$a(i,l),r}(this,t,n,e),!e&&S0&&(t.ra=!0),t}});qe[458105876]=[0,E0,x5,[!0,ga,[0,se,-1,it]],[0,mr,Te,Nt]];var Pu=class extends k{constructor(e){super(e)}},_0=Nn(458105758,Pu);qe[458105758]=[0,ke,se,E0];var $u=class extends k{constructor(e){super(e)}},x0=[0,T5,-1,ri],ty=class extends k{constructor(e){super(e)}},A0=class extends k{constructor(e){super(e)}},ef=[1,2];A0.prototype.g=Rs([0,ef,Ne,x0,Ne,[0,Ke,x0]]);var T0=class extends k{constructor(e){super(e)}},ny=Nn(443442058,T0);qe[443442058]=[0,ke,se,Qe,ze,it,-1,Te,ze],qe[514774813]=Wu;var N0=class extends k{constructor(e){super(e)}},ay=Nn(516587230,N0);function tf(e,t){return t=t?t.clone():new Xu,e.displayNamesLocale!==void 0?ne(t,1,dr(e.displayNamesLocale)):e.displayNamesLocale===void 0&&ne(t,1),e.maxResults!==void 0?Vn(t,2,e.maxResults):"maxResults"in e&&ne(t,2),e.scoreThreshold!==void 0?U(t,3,e.scoreThreshold):"scoreThreshold"in e&&ne(t,3),e.categoryAllowlist!==void 0?Bs(t,4,e.categoryAllowlist):"categoryAllowlist"in e&&ne(t,4),e.categoryDenylist!==void 0?Bs(t,5,e.categoryDenylist):"categoryDenylist"in e&&ne(t,5),t}function M0(e){const t=Number(e);return Number.isSafeInteger(t)?t:String(e)}function nf(e,t=-1,n=""){return{categories:e.map(a=>({index:Zt(a,1)??0??-1,score:Ae(a,2)??0,categoryName:Pe(de(a,3))??""??"",displayName:Pe(de(a,4))??""??""})),headIndex:t,headName:n}}function iy(e){const t={classifications:jn(e,j5,1).map(n=>{var a;return nf(((a=J(n,Jh,4))==null?void 0:a.g())??[],Zt(n,2)??0,Pe(de(n,3))??"")})};return function(n){return $6(Pc?de(n,2,void 0,void 0,zs):de(n,2))}(e)!=null&&(t.timestampMs=M0(th(e))),t}function C0(e){var r,s;var t=ti(e,3,xn,ei()),n=ti(e,2,qi,ei()),a=ti(e,1,Pe,ei()),i=ti(e,9,Pe,ei());const l={categories:[],keypoints:[]};for(let c=0;c<t.length;c++)l.categories.push({score:t[c],index:n[c]??-1,categoryName:a[c]??"",displayName:i[c]??""});if((t=(r=J(e,Yu,4))==null?void 0:r.l())&&(l.boundingBox={originX:Zt(t,1,fa)??0,originY:Zt(t,2,fa)??0,width:Zt(t,3,fa)??0,height:Zt(t,4,fa)??0,angle:0}),(s=J(e,Yu,4))==null?void 0:s.g().length)for(const c of J(e,Yu,4).g())l.keypoints.push({x:de(c,1,void 0,fa,xn)??0,y:de(c,2,void 0,fa,xn)??0,score:de(c,4,void 0,fa,xn)??0,label:Pe(de(c,3,void 0,fa))??""});return l}function no(e){const t=[];for(const n of jn(e,$h,1))t.push({x:Ae(n,1)??0,y:Ae(n,2)??0,z:Ae(n,3)??0,visibility:Ae(n,4)??0});return t}function vr(e){const t=[];for(const n of jn(e,Ph,1))t.push({x:Ae(n,1)??0,y:Ae(n,2)??0,z:Ae(n,3)??0,visibility:Ae(n,4)??0});return t}function D0(e){return Array.from(e,t=>t>127?t-256:t)}function O0(e,t){if(e.length!==t.length)throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${e.length} vs. ${t.length}).`);let n=0,a=0,i=0;for(let l=0;l<e.length;l++)n+=e[l]*t[l],a+=e[l]*e[l],i+=t[l]*t[l];if(a<=0||i<=0)throw Error("Cannot compute cosine similarity on embedding with 0 norm.");return n/Math.sqrt(a*i)}let ao;qe[516587230]=[0,ke,Wu,Ru,ze],qe[518928384]=Ru;const ly=new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11]);async function z0(){if(ao===void 0)try{await WebAssembly.instantiate(ly),ao=!0}catch{ao=!1}return ao}async function br(e,t=O5``){const n=await z0()?"wasm_internal":"wasm_nosimd_internal";return{wasmLoaderPath:`${t}/${e}_${n}.js`,wasmBinaryPath:`${t}/${e}_${n}.wasm`}}var si=class{};function k0(){var e=navigator;return typeof OffscreenCanvas<"u"&&(!function(t=navigator){return(t=t.userAgent).includes("Safari")&&!t.includes("Chrome")}(e)||!!((e=e.userAgent.match(/Version\/([\d]+).*Safari/))&&e.length>=1&&Number(e[1])>=17))}async function L0(e){if(typeof importScripts!="function"){const t=document.createElement("script");return t.src=e.toString(),t.crossOrigin="anonymous",new Promise((n,a)=>{t.addEventListener("load",()=>{n()},!1),t.addEventListener("error",i=>{a(i)},!1),document.body.appendChild(t)})}try{importScripts(e.toString())}catch(t){if(!(t instanceof TypeError))throw t;await self.import(e.toString())}}function U0(e){return e.videoWidth!==void 0?[e.videoWidth,e.videoHeight]:e.naturalWidth!==void 0?[e.naturalWidth,e.naturalHeight]:e.displayWidth!==void 0?[e.displayWidth,e.displayHeight]:[e.width,e.height]}function L(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"),n(t=e.i.stringToNewUTF8(t)),e.i._free(t)}function B0(e,t,n){if(!e.i.canvas)throw Error("No OpenGL canvas configured.");if(n?e.i._bindTextureToStream(n):e.i._bindTextureToCanvas(),!(n=e.i.canvas.getContext("webgl2")||e.i.canvas.getContext("webgl")))throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!0),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,t),e.i.gpuOriginForWebTexturesIsBottomLeft&&n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1);const[a,i]=U0(t);return!e.l||a===e.i.canvas.width&&i===e.i.canvas.height||(e.i.canvas.width=a,e.i.canvas.height=i),[a,i]}function G0(e,t,n){e.m||console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");const a=new Uint32Array(t.length);for(let i=0;i<t.length;i++)a[i]=e.i.stringToNewUTF8(t[i]);t=e.i._malloc(4*a.length),e.i.HEAPU32.set(a,t>>2),n(t);for(const i of a)e.i._free(i);e.i._free(t)}function Mn(e,t,n){e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=n}function ya(e,t,n){let a=[];e.i.simpleListeners=e.i.simpleListeners||{},e.i.simpleListeners[t]=(i,l,r)=>{l?(n(a,r),a=[]):a.push(i)}}si.forVisionTasks=function(e){return br("vision",e)},si.forTextTasks=function(e){return br("text",e)},si.forGenAiExperimentalTasks=function(e){return br("genai_experimental",e)},si.forGenAiTasks=function(e){return br("genai",e)},si.forAudioTasks=function(e){return br("audio",e)},si.isSimdSupported=function(){return z0()};async function ry(e,t,n,a){return e=await(async(i,l,r,s,c)=>{if(l&&await L0(l),!self.ModuleFactory||r&&(await L0(r),!self.ModuleFactory))throw Error("ModuleFactory not set.");return self.Module&&c&&((l=self.Module).locateFile=c.locateFile,c.mainScriptUrlOrBlob&&(l.mainScriptUrlOrBlob=c.mainScriptUrlOrBlob)),c=await self.ModuleFactory(self.Module||c),self.ModuleFactory=self.Module=void 0,new i(c,s)})(e,n.wasmLoaderPath,n.assetLoaderPath,t,{locateFile:i=>i.endsWith(".wasm")?n.wasmBinaryPath.toString():n.assetBinaryPath&&i.endsWith(".data")?n.assetBinaryPath.toString():i}),await e.o(a),e}function af(e,t){const n=J(e.baseOptions,eo,1)||new eo;typeof t=="string"?(ne(n,2,dr(t)),ne(n,1)):t instanceof Uint8Array&&(ne(n,1,au(t,!1)),ne(n,2)),B(e.baseOptions,0,1,n)}function H0(e){try{const t=e.H.length;if(t===1)throw Error(e.H[0].message);if(t>1)throw Error("Encountered multiple errors: "+e.H.map(n=>n.message).join(", "))}finally{e.H=[]}}function D(e,t){e.C=Math.max(e.C,t)}function io(e,t){e.B=new dt,Tt(e.B,2,"PassThroughCalculator"),he(e.B,"free_memory"),K(e.B,"free_memory_unused_out"),ye(t,"free_memory"),Jt(t,e.B)}function al(e,t){he(e.B,t),K(e.B,t+"_unused_out")}function lo(e){e.g.addBoolToStream(!0,"free_memory",e.C)}var lf=class{constructor(e){this.g=e,this.H=[],this.C=0,this.g.setAutoRenderToScreen(!1)}l(e,t=!0){var n,a,i,l,r,s;if(t){const c=e.baseOptions||{};if((n=e.baseOptions)!=null&&n.modelAssetBuffer&&((a=e.baseOptions)!=null&&a.modelAssetPath))throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");if(!((i=J(this.baseOptions,eo,1))!=null&&i.g()||(l=J(this.baseOptions,eo,1))!=null&&l.l()||(r=e.baseOptions)!=null&&r.modelAssetBuffer||(s=e.baseOptions)!=null&&s.modelAssetPath))throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");if(function(u,f){let h=J(u.baseOptions,l0,3);if(!h){var d=h=new l0,g=new Fh;gr(d,4,$s,g)}"delegate"in f&&(f.delegate==="GPU"?(f=h,d=new z5,gr(f,2,$s,d)):(f=h,d=new Fh,gr(f,4,$s,d))),B(u.baseOptions,0,3,h)}(this,c),c.modelAssetPath)return fetch(c.modelAssetPath.toString()).then(u=>{if(u.ok)return u.arrayBuffer();throw Error(`Failed to fetch model: ${c.modelAssetPath} (${u.status})`)}).then(u=>{try{this.g.i.FS_unlink("/model.dat")}catch{}this.g.i.FS_createDataFile("/","model.dat",new Uint8Array(u),!0,!1,!1),af(this,"/model.dat"),this.m(),this.L()});if(c.modelAssetBuffer instanceof Uint8Array)af(this,c.modelAssetBuffer);else if(c.modelAssetBuffer)return async function(u){const f=[];for(var h=0;;){const{done:d,value:g}=await u.read();if(d)break;f.push(g),h+=g.length}if(f.length===0)return new Uint8Array(0);if(f.length===1)return f[0];u=new Uint8Array(h),h=0;for(const d of f)u.set(d,h),h+=d.length;return u}(c.modelAssetBuffer).then(u=>{af(this,u),this.m(),this.L()})}return this.m(),this.L(),Promise.resolve()}L(){}ca(){let e;if(this.g.ca(t=>{e=k5(t)}),!e)throw Error("Failed to retrieve CalculatorGraphConfig");return e}setGraph(e,t){this.g.attachErrorListener((n,a)=>{this.H.push(Error(a))}),this.g.Ja(),this.g.setGraph(e,t),this.B=void 0,H0(this)}finishProcessing(){this.g.finishProcessing(),H0(this)}close(){this.B=void 0,this.g.closeGraph()}};function pa(e,t){if(!e)throw Error(`Unable to obtain required WebGL resource: ${t}`);return e}lf.prototype.close=lf.prototype.close;class sy{constructor(t,n,a,i){this.g=t,this.h=n,this.m=a,this.l=i}bind(){this.g.bindVertexArray(this.h)}close(){this.g.deleteVertexArray(this.h),this.g.deleteBuffer(this.m),this.g.deleteBuffer(this.l)}}function j0(e,t,n){const a=e.g;if(n=pa(a.createShader(n),"Failed to create WebGL shader"),a.shaderSource(n,t),a.compileShader(n),!a.getShaderParameter(n,a.COMPILE_STATUS))throw Error(`Could not compile WebGL shader: ${a.getShaderInfoLog(n)}`);return a.attachShader(e.h,n),n}function V0(e,t){const n=e.g,a=pa(n.createVertexArray(),"Failed to create vertex array");n.bindVertexArray(a);const i=pa(n.createBuffer(),"Failed to create buffer");n.bindBuffer(n.ARRAY_BUFFER,i),n.enableVertexAttribArray(e.O),n.vertexAttribPointer(e.O,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),n.STATIC_DRAW);const l=pa(n.createBuffer(),"Failed to create buffer");return n.bindBuffer(n.ARRAY_BUFFER,l),n.enableVertexAttribArray(e.L),n.vertexAttribPointer(e.L,2,n.FLOAT,!1,0,0),n.bufferData(n.ARRAY_BUFFER,new Float32Array(t?[0,1,0,0,1,0,1,1]:[0,0,0,1,1,1,1,0]),n.STATIC_DRAW),n.bindBuffer(n.ARRAY_BUFFER,null),n.bindVertexArray(null),new sy(n,a,i,l)}function rf(e,t){if(e.g){if(t!==e.g)throw Error("Cannot change GL context once initialized")}else e.g=t}function oy(e,t,n,a){return rf(e,t),e.h||(e.m(),e.D()),n?(e.u||(e.u=V0(e,!0)),n=e.u):(e.A||(e.A=V0(e,!1)),n=e.A),t.useProgram(e.h),n.bind(),e.l(),e=a(),n.g.bindVertexArray(null),e}function q0(e,t,n){return rf(e,t),e=pa(t.createTexture(),"Failed to create texture"),t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,n??t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,n??t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e}function F0(e,t,n){rf(e,t),e.B||(e.B=pa(t.createFramebuffer(),"Failed to create framebuffe.")),t.bindFramebuffer(t.FRAMEBUFFER,e.B),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n,0)}function cy(e){var t;(t=e.g)==null||t.bindFramebuffer(e.g.FRAMEBUFFER,null)}var Y0=class{H(){return`
10
2
  precision mediump float;
11
3
  varying vec2 vTex;
12
4
  uniform sampler2D inputTexture;
13
5
  void main() {
14
6
  gl_FragColor = texture2D(inputTexture, vTex);
15
7
  }
16
- `}m(){const e=this.g;if(this.h=pi(e.createProgram(),"Failed to create WebGL program"),this.X=q0(this,`
8
+ `}m(){const e=this.g;if(this.h=pa(e.createProgram(),"Failed to create WebGL program"),this.X=j0(this,`
17
9
  attribute vec2 aVertex;
18
10
  attribute vec2 aTex;
19
11
  varying vec2 vTex;
20
12
  void main(void) {
21
13
  gl_Position = vec4(aVertex, 0.0, 1.0);
22
14
  vTex = aTex;
23
- }`,e.VERTEX_SHADER),this.W=q0(this,this.H(),e.FRAGMENT_SHADER),e.linkProgram(this.h),!e.getProgramParameter(this.h,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);this.O=e.getAttribLocation(this.h,"aVertex"),this.L=e.getAttribLocation(this.h,"aTex")}D(){}l(){}close(){if(this.h){const e=this.g;e.deleteProgram(this.h),e.deleteShader(this.X),e.deleteShader(this.W)}this.B&&this.g.deleteFramebuffer(this.B),this.A&&this.A.close(),this.u&&this.u.close()}};function qn(e,t){switch(t){case 0:return e.g.find(n=>n instanceof Uint8Array);case 1:return e.g.find(n=>n instanceof Float32Array);case 2:return e.g.find(n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function of(e){var t=qn(e,1);if(!t){if(t=qn(e,0))t=new Float32Array(t).map(i=>i/255);else{t=new Float32Array(e.width*e.height);const i=ll(e);var n=cf(e);if(X0(n,i,Z0(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(e.width*e.height*4),i.readPixels(0,0,e.width,e.height,i.RGBA,i.FLOAT,n);for(let a=0,l=0;a<t.length;++a,l+=4)t[a]=n[l]}else i.readPixels(0,0,e.width,e.height,i.RED,i.FLOAT,t)}e.g.push(t)}return t}function Z0(e){let t=qn(e,2);if(!t){const n=ll(e);t=I0(e);const i=of(e),a=K0(e);n.texImage2D(n.TEXTURE_2D,0,a,e.width,e.height,0,n.RED,n.FLOAT,i),ff(e)}return t}function ll(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=pi(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function K0(e){if(e=ll(e),!uu)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))uu=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");uu=e.R16F}return uu}function cf(e){return e.l||(e.l=new Q0),e.l}function I0(e){const t=ll(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=qn(e,2);return n||(n=Y0(cf(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(n),e.j=!0),t.bindTexture(t.TEXTURE_2D,n),n}function ff(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var uu,Ze=class{constructor(e,t,n,i,a,l,s){this.g=e,this.m=t,this.j=n,this.canvas=i,this.l=a,this.width=l,this.height=s,this.j&&--J0===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Fa(){return!!qn(this,0)}ka(){return!!qn(this,1)}R(){return!!qn(this,2)}ja(){return(t=qn(e=this,0))||(t=of(e),t=new Uint8Array(t.map(n=>Math.round(255*n))),e.g.push(t)),t;var e,t}ia(){return of(this)}N(){return Z0(this)}clone(){const e=[];for(const t of this.g){let n;if(t instanceof Uint8Array)n=new Uint8Array(t);else if(t instanceof Float32Array)n=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{const i=ll(this),a=cf(this);i.activeTexture(i.TEXTURE1),n=Y0(a,i,this.m?i.LINEAR:i.NEAREST),i.bindTexture(i.TEXTURE_2D,n);const l=K0(this);i.texImage2D(i.TEXTURE_2D,0,l,this.width,this.height,0,i.RED,i.FLOAT,null),i.bindTexture(i.TEXTURE_2D,null),X0(a,i,n),hy(a,i,!1,()=>{I0(this),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.drawArrays(i.TRIANGLE_FAN,0,4),ff(this)}),my(a),ff(this)}}e.push(n)}return new Ze(e,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&ll(this).deleteTexture(qn(this,2)),J0=-1}};Ze.prototype.close=Ze.prototype.close,Ze.prototype.clone=Ze.prototype.clone,Ze.prototype.getAsWebGLTexture=Ze.prototype.N,Ze.prototype.getAsFloat32Array=Ze.prototype.ia,Ze.prototype.getAsUint8Array=Ze.prototype.ja,Ze.prototype.hasWebGLTexture=Ze.prototype.R,Ze.prototype.hasFloat32Array=Ze.prototype.ka,Ze.prototype.hasUint8Array=Ze.prototype.Fa;var J0=250;function mn(...e){return e.map(([t,n])=>({start:t,end:n}))}const gy=function(e){return class extends e{Ja(){this.i._registerModelResourcesGraphService()}}}((W0=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:U0()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(e){const t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){const n=e.length,i=this.i._malloc(n);this.i.HEAPU8.set(e,i),t?this.i._changeBinaryGraph(n,i):this.i._changeTextGraph(n,i),this.i._free(i)}configureAudio(e,t,n,i,a){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),k(this,i||"input_audio",l=>{k(this,a=a||"audio_header",s=>{this.i._configureAudio(l,s,e,t??0,n)})})}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}ca(e){jn(this,"__graph_config__",t=>{e(t)}),k(this,"__graph_config__",t=>{this.i._getGraphConfig(t,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,i,a){const l=4*e.length;this.h!==l&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(l),this.h=l),this.i.HEAPF32.set(e,this.g/4),k(this,i,s=>{this.i._addAudioToInputStream(this.g,t,n,s,a)})}addGpuBufferToStream(e,t,n){k(this,t,i=>{const[a,l]=G0(this,e,i);this.i._addBoundTextureToStream(i,a,l,n)})}addBoolToStream(e,t,n){k(this,t,i=>{this.i._addBoolToInputStream(e,i,n)})}addDoubleToStream(e,t,n){k(this,t,i=>{this.i._addDoubleToInputStream(e,i,n)})}addFloatToStream(e,t,n){k(this,t,i=>{this.i._addFloatToInputStream(e,i,n)})}addIntToStream(e,t,n){k(this,t,i=>{this.i._addIntToInputStream(e,i,n)})}addUintToStream(e,t,n){k(this,t,i=>{this.i._addUintToInputStream(e,i,n)})}addStringToStream(e,t,n){k(this,t,i=>{k(this,e,a=>{this.i._addStringToInputStream(a,i,n)})})}addStringRecordToStream(e,t,n){k(this,t,i=>{H0(this,Object.keys(e),a=>{H0(this,Object.values(e),l=>{this.i._addFlatHashMapToInputStream(a,l,Object.keys(e).length,i,n)})})})}addProtoToStream(e,t,n,i){k(this,n,a=>{k(this,t,l=>{const s=this.i._malloc(e.length);this.i.HEAPU8.set(e,s),this.i._addProtoToInputStream(s,e.length,l,a,i),this.i._free(s)})})}addEmptyPacketToStream(e,t){k(this,e,n=>{this.i._addEmptyPacketToInputStream(n,t)})}addBoolVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateBoolVector(e.length);if(!a)throw Error("Unable to allocate new bool vector on heap.");for(const l of e)this.i._addBoolVectorEntry(a,l);this.i._addBoolVectorToInputStream(a,i,n)})}addDoubleVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateDoubleVector(e.length);if(!a)throw Error("Unable to allocate new double vector on heap.");for(const l of e)this.i._addDoubleVectorEntry(a,l);this.i._addDoubleVectorToInputStream(a,i,n)})}addFloatVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateFloatVector(e.length);if(!a)throw Error("Unable to allocate new float vector on heap.");for(const l of e)this.i._addFloatVectorEntry(a,l);this.i._addFloatVectorToInputStream(a,i,n)})}addIntVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateIntVector(e.length);if(!a)throw Error("Unable to allocate new int vector on heap.");for(const l of e)this.i._addIntVectorEntry(a,l);this.i._addIntVectorToInputStream(a,i,n)})}addUintVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateUintVector(e.length);if(!a)throw Error("Unable to allocate new unsigned int vector on heap.");for(const l of e)this.i._addUintVectorEntry(a,l);this.i._addUintVectorToInputStream(a,i,n)})}addStringVectorToStream(e,t,n){k(this,t,i=>{const a=this.i._allocateStringVector(e.length);if(!a)throw Error("Unable to allocate new string vector on heap.");for(const l of e)k(this,l,s=>{this.i._addStringVectorEntry(a,s)});this.i._addStringVectorToInputStream(a,i,n)})}addBoolToInputSidePacket(e,t){k(this,t,n=>{this.i._addBoolToInputSidePacket(e,n)})}addDoubleToInputSidePacket(e,t){k(this,t,n=>{this.i._addDoubleToInputSidePacket(e,n)})}addFloatToInputSidePacket(e,t){k(this,t,n=>{this.i._addFloatToInputSidePacket(e,n)})}addIntToInputSidePacket(e,t){k(this,t,n=>{this.i._addIntToInputSidePacket(e,n)})}addUintToInputSidePacket(e,t){k(this,t,n=>{this.i._addUintToInputSidePacket(e,n)})}addStringToInputSidePacket(e,t){k(this,t,n=>{k(this,e,i=>{this.i._addStringToInputSidePacket(i,n)})})}addProtoToInputSidePacket(e,t,n){k(this,n,i=>{k(this,t,a=>{const l=this.i._malloc(e.length);this.i.HEAPU8.set(e,l),this.i._addProtoToInputSidePacket(l,e.length,a,i),this.i._free(l)})})}addBoolVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateBoolVector(e.length);if(!i)throw Error("Unable to allocate new bool vector on heap.");for(const a of e)this.i._addBoolVectorEntry(i,a);this.i._addBoolVectorToInputSidePacket(i,n)})}addDoubleVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateDoubleVector(e.length);if(!i)throw Error("Unable to allocate new double vector on heap.");for(const a of e)this.i._addDoubleVectorEntry(i,a);this.i._addDoubleVectorToInputSidePacket(i,n)})}addFloatVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateFloatVector(e.length);if(!i)throw Error("Unable to allocate new float vector on heap.");for(const a of e)this.i._addFloatVectorEntry(i,a);this.i._addFloatVectorToInputSidePacket(i,n)})}addIntVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateIntVector(e.length);if(!i)throw Error("Unable to allocate new int vector on heap.");for(const a of e)this.i._addIntVectorEntry(i,a);this.i._addIntVectorToInputSidePacket(i,n)})}addUintVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateUintVector(e.length);if(!i)throw Error("Unable to allocate new unsigned int vector on heap.");for(const a of e)this.i._addUintVectorEntry(i,a);this.i._addUintVectorToInputSidePacket(i,n)})}addStringVectorToInputSidePacket(e,t){k(this,t,n=>{const i=this.i._allocateStringVector(e.length);if(!i)throw Error("Unable to allocate new string vector on heap.");for(const a of e)k(this,a,l=>{this.i._addStringVectorEntry(i,l)});this.i._addStringVectorToInputSidePacket(i,n)})}attachBoolListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachBoolListener(n)})}attachBoolVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachBoolVectorListener(n)})}attachIntListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachIntListener(n)})}attachIntVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachIntVectorListener(n)})}attachUintListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachUintListener(n)})}attachUintVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachUintVectorListener(n)})}attachDoubleListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachDoubleListener(n)})}attachDoubleVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachDoubleVectorListener(n)})}attachFloatListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachFloatListener(n)})}attachFloatVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachFloatVectorListener(n)})}attachStringListener(e,t){jn(this,e,t),k(this,e,n=>{this.i._attachStringListener(n)})}attachStringVectorListener(e,t){yi(this,e,t),k(this,e,n=>{this.i._attachStringVectorListener(n)})}attachProtoListener(e,t,n){jn(this,e,t),k(this,e,i=>{this.i._attachProtoListener(i,n||!1)})}attachProtoVectorListener(e,t,n){yi(this,e,t),k(this,e,i=>{this.i._attachProtoVectorListener(i,n||!1)})}attachAudioListener(e,t,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),jn(this,e,(i,a)=>{i=new Float32Array(i.buffer,i.byteOffset,i.length/4),t(i,a)}),k(this,e,i=>{this.i._attachAudioListener(i,n||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends W0{get ga(){return this.i}pa(e,t,n){k(this,t,i=>{const[a,l]=G0(this,e,i);this.ga._addBoundTextureAsImageToStream(i,a,l,n)})}Z(e,t){jn(this,e,t),k(this,e,n=>{this.ga._attachImageListener(n)})}aa(e,t){yi(this,e,t),k(this,e,n=>{this.ga._attachImageVectorListener(n)})}}));var W0,gn=class extends gy{};async function Z(e,t,n){return async function(i,a,l,s){return fy(i,a,l,s)}(e,n.canvas??(U0()?void 0:document.createElement("canvas")),t,n)}function P0(e,t,n,i){if(e.U){const l=new i0;if(n!=null&&n.regionOfInterest){if(!e.oa)throw Error("This task doesn't support region-of-interest.");var a=n.regionOfInterest;if(a.left>=a.right||a.top>=a.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(a.left<0||a.top<0||a.right>1||a.bottom>1)throw Error("Expected RectF values to be in [0,1].");L(l,1,(a.left+a.right)/2),L(l,2,(a.top+a.bottom)/2),L(l,4,a.right-a.left),L(l,3,a.bottom-a.top)}else L(l,1,.5),L(l,2,.5),L(l,4,1),L(l,3,1);if(n!=null&&n.rotationDegrees){if((n==null?void 0:n.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(L(l,5,-Math.PI*n.rotationDegrees/180),(n==null?void 0:n.rotationDegrees)%180!=0){const[s,r]=R0(t);n=Te(l,3)*r/s,a=Te(l,4)*s/r,L(l,4,n),L(l,3,a)}}e.g.addProtoToStream(l.g(),"mediapipe.NormalizedRect",e.U,i)}e.g.pa(t,e.X,i??performance.now()),e.finishProcessing()}function wn(e,t,n){var i;if((i=e.baseOptions)!=null&&i.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");P0(e,t,n,e.C+1)}function Mn(e,t,n,i){var a;if(!((a=e.baseOptions)!=null&&a.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");P0(e,t,n,i)}function sl(e,t,n,i){var a=t.data;const l=t.width,s=l*(t=t.height);if((a instanceof Uint8Array||a instanceof Float32Array)&&a.length!==s)throw Error("Unsupported channel count: "+a.length/s);return e=new Ze([a],n,!1,e.g.i.canvas,e.P,l,t),i?e.clone():e}var Ct=class extends rf{constructor(e,t,n,i){super(e),this.g=e,this.X=t,this.U=n,this.oa=i,this.P=new Q0}l(e,t=!0){if("runningMode"in e&&ne(this.baseOptions,2,fs(!!e.runningMode&&e.runningMode!=="IMAGE")),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.P.close(),super.close()}};Ct.prototype.close=Ct.prototype.close;var Jt=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},U(e=this.h=new iu,0,1,t=new ve),L(this.h,2,.5),L(this.h,3,.3)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&L(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&L(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}F(e,t){return this.j={detections:[]},wn(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},Mn(this,e,n,t),this.j}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect_in"),J(e,"detections");const t=new jt;An(t,J5,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect_in"),Q(n,"DETECTIONS:detections"),n.o(t),It(e,n),this.g.attachProtoVectorListener("detections",(i,a)=>{for(const l of i)i=e0(l),this.j.detections.push(O0(i));C(this,a)}),this.g.attachEmptyPacketListener("detections",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Jt.prototype.detectForVideo=Jt.prototype.G,Jt.prototype.detect=Jt.prototype.F,Jt.prototype.setOptions=Jt.prototype.o,Jt.createFromModelPath=async function(e,t){return Z(Jt,e,{baseOptions:{modelAssetPath:t}})},Jt.createFromModelBuffer=function(e,t){return Z(Jt,e,{baseOptions:{modelAssetBuffer:t}})},Jt.createFromOptions=function(e,t){return Z(Jt,e,t)};var df=mn([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),hf=mn([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),mf=mn([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),$0=mn([474,475],[475,476],[476,477],[477,474]),gf=mn([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),wf=mn([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),e3=mn([469,470],[470,471],[471,472],[472,469]),yf=mn([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),t3=[...df,...hf,...mf,...gf,...wf,...yf],n3=mn([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function i3(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var pe=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,U(e=this.h=new f0,0,1,t=new ve),this.A=new c0,U(this.h,0,3,this.A),this.u=new iu,U(this.h,0,2,this.u),Hn(this.u,4,1),L(this.u,2,.5),L(this.A,2,.5),L(this.h,4,.5)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"numFaces"in e&&Hn(this.u,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&L(this.u,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&L(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&L(this.A,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}F(e,t){return i3(this),wn(this,e,t),this.j}G(e,t,n){return i3(this),Mn(this,e,n,t),this.j}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"face_landmarks");const t=new jt;An(t,P5,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"NORM_LANDMARKS:face_landmarks"),n.o(t),It(e,n),this.g.attachProtoVectorListener("face_landmarks",(i,a)=>{for(const l of i)i=vs(l),this.j.faceLandmarks.push(au(i));C(this,a)}),this.g.attachEmptyPacketListener("face_landmarks",i=>{C(this,i)}),this.outputFaceBlendshapes&&(J(e,"blendshapes"),Q(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(i,a)=>{if(this.outputFaceBlendshapes)for(const l of i)i=eu(l),this.j.faceBlendshapes.push(lf(i.g()??[]));C(this,a)}),this.g.attachEmptyPacketListener("blendshapes",i=>{C(this,i)})),this.outputFacialTransformationMatrixes&&(J(e,"face_geometry"),Q(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(i,a)=>{if(this.outputFacialTransformationMatrixes)for(const l of i)(i=I(i=W5(l),q5,2))&&this.j.facialTransformationMatrixes.push({rows:Zt(i,1)??0??0,columns:Zt(i,2)??0??0,data:na(i,3,_n,ta()).slice()??[]});C(this,a)}),this.g.attachEmptyPacketListener("face_geometry",i=>{C(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};pe.prototype.detectForVideo=pe.prototype.G,pe.prototype.detect=pe.prototype.F,pe.prototype.setOptions=pe.prototype.o,pe.createFromModelPath=function(e,t){return Z(pe,e,{baseOptions:{modelAssetPath:t}})},pe.createFromModelBuffer=function(e,t){return Z(pe,e,{baseOptions:{modelAssetBuffer:t}})},pe.createFromOptions=function(e,t){return Z(pe,e,t)},pe.FACE_LANDMARKS_LIPS=df,pe.FACE_LANDMARKS_LEFT_EYE=hf,pe.FACE_LANDMARKS_LEFT_EYEBROW=mf,pe.FACE_LANDMARKS_LEFT_IRIS=$0,pe.FACE_LANDMARKS_RIGHT_EYE=gf,pe.FACE_LANDMARKS_RIGHT_EYEBROW=wf,pe.FACE_LANDMARKS_RIGHT_IRIS=e3,pe.FACE_LANDMARKS_FACE_OVAL=yf,pe.FACE_LANDMARKS_CONTOURS=t3,pe.FACE_LANDMARKS_TESSELATION=n3;var pf=mn([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function a3(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function l3(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function s3(e,t=!0){const n=[];for(const a of e){var i=eu(a);e=[];for(const l of i.g())i=t&&Zt(l,1)!=null?Zt(l,1)??0:-1,e.push({score:Te(l,2)??0,index:i,categoryName:We(de(l,3))??""??"",displayName:We(de(l,4))??""??""});n.push(e)}return n}var Dt=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],U(e=this.j=new m0,0,1,t=new ve),this.u=new Jc,U(this.j,0,2,this.u),this.D=new Ic,U(this.u,0,3,this.D),this.A=new h0,U(this.u,0,2,this.A),this.h=new $5,U(this.j,0,3,this.h),L(this.A,2,.5),L(this.u,4,.5),L(this.D,2,.5)}get baseOptions(){return I(this.j,ve,1)}set baseOptions(e){U(this.j,0,1,e)}o(e){var a,l,s,r;if(Hn(this.A,3,e.numHands??1),"minHandDetectionConfidence"in e&&L(this.A,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&L(this.u,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&L(this.D,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new il,n=t,i=af(e.cannedGesturesClassifierOptions,(a=I(this.h,il,3))==null?void 0:a.l());U(n,0,2,i),U(this.h,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&((l=I(this.h,il,3))==null||l.g());return e.customGesturesClassifierOptions?(U(n=t=new il,0,2,i=af(e.customGesturesClassifierOptions,(s=I(this.h,il,4))==null?void 0:s.l())),U(this.h,0,4,t)):e.customGesturesClassifierOptions===void 0&&((r=I(this.h,il,4))==null||r.g()),this.l(e)}Ha(e,t){return a3(this),wn(this,e,t),l3(this)}Ia(e,t,n){return a3(this),Mn(this,e,n,t),l3(this)}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"hand_gestures"),J(e,"hand_landmarks"),J(e,"world_hand_landmarks"),J(e,"handedness");const t=new jt;An(t,ey,this.j);const n=new dt;At(n,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"HAND_GESTURES:hand_gestures"),Q(n,"LANDMARKS:hand_landmarks"),Q(n,"WORLD_LANDMARKS:world_hand_landmarks"),Q(n,"HANDEDNESS:handedness"),n.o(t),It(e,n),this.g.attachProtoVectorListener("hand_landmarks",(i,a)=>{for(const l of i){i=vs(l);const s=[];for(const r of Gn(i,n0,1))s.push({x:Te(r,1)??0,y:Te(r,2)??0,z:Te(r,3)??0,visibility:Te(r,4)??0});this.landmarks.push(s)}C(this,a)}),this.g.attachEmptyPacketListener("hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("world_hand_landmarks",(i,a)=>{for(const l of i){i=nl(l);const s=[];for(const r of Gn(i,t0,1))s.push({x:Te(r,1)??0,y:Te(r,2)??0,z:Te(r,3)??0,visibility:Te(r,4)??0});this.worldLandmarks.push(s)}C(this,a)}),this.g.attachEmptyPacketListener("world_hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("hand_gestures",(i,a)=>{this.gestures.push(...s3(i,!1)),C(this,a)}),this.g.attachEmptyPacketListener("hand_gestures",i=>{C(this,i)}),this.g.attachProtoVectorListener("handedness",(i,a)=>{this.handedness.push(...s3(i)),C(this,a)}),this.g.attachEmptyPacketListener("handedness",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function r3(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}Dt.prototype.recognizeForVideo=Dt.prototype.Ia,Dt.prototype.recognize=Dt.prototype.Ha,Dt.prototype.setOptions=Dt.prototype.o,Dt.createFromModelPath=function(e,t){return Z(Dt,e,{baseOptions:{modelAssetPath:t}})},Dt.createFromModelBuffer=function(e,t){return Z(Dt,e,{baseOptions:{modelAssetBuffer:t}})},Dt.createFromOptions=function(e,t){return Z(Dt,e,t)},Dt.HAND_CONNECTIONS=pf;var Ot=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],U(e=this.h=new Jc,0,1,t=new ve),this.u=new Ic,U(this.h,0,3,this.u),this.j=new h0,U(this.h,0,2,this.j),Hn(this.j,3,1),L(this.j,2,.5),L(this.u,2,.5),L(this.h,4,.5)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"numHands"in e&&Hn(this.j,3,e.numHands??1),"minHandDetectionConfidence"in e&&L(this.j,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&L(this.h,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&L(this.u,2,e.minHandPresenceConfidence??.5),this.l(e)}F(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],wn(this,e,t),r3(this)}G(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Mn(this,e,n,t),r3(this)}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"hand_landmarks"),J(e,"world_hand_landmarks"),J(e,"handedness");const t=new jt;An(t,ty,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"LANDMARKS:hand_landmarks"),Q(n,"WORLD_LANDMARKS:world_hand_landmarks"),Q(n,"HANDEDNESS:handedness"),n.o(t),It(e,n),this.g.attachProtoVectorListener("hand_landmarks",(i,a)=>{for(const l of i)i=vs(l),this.landmarks.push(au(i));C(this,a)}),this.g.attachEmptyPacketListener("hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("world_hand_landmarks",(i,a)=>{for(const l of i)i=nl(l),this.worldLandmarks.push(bs(i));C(this,a)}),this.g.attachEmptyPacketListener("world_hand_landmarks",i=>{C(this,i)}),this.g.attachProtoVectorListener("handedness",(i,a)=>{var l=this.handedness,s=l.push;const r=[];for(const o of i){i=eu(o);const c=[];for(const f of i.g())c.push({score:Te(f,2)??0,index:Zt(f,1)??0??-1,categoryName:We(de(f,3))??""??"",displayName:We(de(f,4))??""??""});r.push(c)}s.call(l,...r),C(this,a)}),this.g.attachEmptyPacketListener("handedness",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Ot.prototype.detectForVideo=Ot.prototype.G,Ot.prototype.detect=Ot.prototype.F,Ot.prototype.setOptions=Ot.prototype.o,Ot.createFromModelPath=function(e,t){return Z(Ot,e,{baseOptions:{modelAssetPath:t}})},Ot.createFromModelBuffer=function(e,t){return Z(Ot,e,{baseOptions:{modelAssetBuffer:t}})},Ot.createFromOptions=function(e,t){return Z(Ot,e,t)},Ot.HAND_CONNECTIONS=pf;var u3=mn([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function o3(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function c3(e){try{if(!e.D)return e.h;e.D(e.h)}finally{ru(e)}}function ou(e,t){e=vs(e),t.push(au(e))}var me=class extends Ct{constructor(e,t){super(new gn(e,t),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,U(e=this.j=new b0,0,1,t=new ve),this.I=new Ic,U(this.j,0,2,this.I),this.W=new ny,U(this.j,0,3,this.W),this.u=new iu,U(this.j,0,4,this.u),this.O=new c0,U(this.j,0,5,this.O),this.A=new p0,U(this.j,0,6,this.A),this.M=new v0,U(this.j,0,7,this.M),L(this.u,2,.5),L(this.u,3,.3),L(this.O,2,.5),L(this.A,2,.5),L(this.A,3,.3),L(this.M,2,.5),L(this.I,2,.5)}get baseOptions(){return I(this.j,ve,1)}set baseOptions(e){U(this.j,0,1,e)}o(e){return"minFaceDetectionConfidence"in e&&L(this.u,2,e.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in e&&L(this.u,3,e.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in e&&L(this.O,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"minPoseDetectionConfidence"in e&&L(this.A,2,e.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in e&&L(this.A,3,e.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in e&&L(this.M,2,e.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in e&&L(this.I,2,e.minHandLandmarksConfidence??.5),this.l(e)}F(e,t,n){const i=typeof t!="function"?t:{};return this.D=typeof t=="function"?t:n,o3(this),wn(this,e,i),c3(this)}G(e,t,n,i){const a=typeof n!="function"?n:{};return this.D=typeof n=="function"?n:i,o3(this),Mn(this,e,a,t),c3(this)}m(){var e=new Mt;ye(e,"input_frames_image"),J(e,"pose_landmarks"),J(e,"pose_world_landmarks"),J(e,"face_landmarks"),J(e,"left_hand_landmarks"),J(e,"left_hand_world_landmarks"),J(e,"right_hand_landmarks"),J(e,"right_hand_world_landmarks");const t=new jt,n=new Bh;At(n,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(a,l){if(l!=null)if(Array.isArray(l))ne(a,2,Br(l,0,ms));else{if(!(typeof l=="string"||l instanceof Sn||tc(l)))throw Error("invalid value in Any.value field: "+l+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");di(a,2,lc(l,!1),Ii())}}(n,this.j.g());const i=new dt;At(i,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),Ac(i,8,Bh,n),he(i,"IMAGE:input_frames_image"),Q(i,"POSE_LANDMARKS:pose_landmarks"),Q(i,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),Q(i,"FACE_LANDMARKS:face_landmarks"),Q(i,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),Q(i,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),Q(i,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),Q(i,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),i.o(t),It(e,i),su(this,e),this.g.attachProtoListener("pose_landmarks",(a,l)=>{ou(a,this.h.poseLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("pose_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("pose_world_landmarks",(a,l)=>{var s=this.h.poseWorldLandmarks;a=nl(a),s.push(bs(a)),C(this,l)}),this.g.attachEmptyPacketListener("pose_world_landmarks",a=>{C(this,a)}),this.outputPoseSegmentationMasks&&(Q(i,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),al(this,"pose_segmentation_mask"),this.g.Z("pose_segmentation_mask",(a,l)=>{this.h.poseSegmentationMasks=[sl(this,a,!0,!this.D)],C(this,l)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",a=>{this.h.poseSegmentationMasks=[],C(this,a)})),this.g.attachProtoListener("face_landmarks",(a,l)=>{ou(a,this.h.faceLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("face_landmarks",a=>{C(this,a)}),this.outputFaceBlendshapes&&(J(e,"extra_blendshapes"),Q(i,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(a,l)=>{var s=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(a=eu(a),s.push(lf(a.g()??[]))),C(this,l)}),this.g.attachEmptyPacketListener("extra_blendshapes",a=>{C(this,a)})),this.g.attachProtoListener("left_hand_landmarks",(a,l)=>{ou(a,this.h.leftHandLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("left_hand_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("left_hand_world_landmarks",(a,l)=>{var s=this.h.leftHandWorldLandmarks;a=nl(a),s.push(bs(a)),C(this,l)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("right_hand_landmarks",(a,l)=>{ou(a,this.h.rightHandLandmarks),C(this,l)}),this.g.attachEmptyPacketListener("right_hand_landmarks",a=>{C(this,a)}),this.g.attachProtoListener("right_hand_world_landmarks",(a,l)=>{var s=this.h.rightHandWorldLandmarks;a=nl(a),s.push(bs(a)),C(this,l)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",a=>{C(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};me.prototype.detectForVideo=me.prototype.G,me.prototype.detect=me.prototype.F,me.prototype.setOptions=me.prototype.o,me.createFromModelPath=function(e,t){return Z(me,e,{baseOptions:{modelAssetPath:t}})},me.createFromModelBuffer=function(e,t){return Z(me,e,{baseOptions:{modelAssetBuffer:t}})},me.createFromOptions=function(e,t){return Z(me,e,t)},me.HAND_CONNECTIONS=pf,me.POSE_CONNECTIONS=u3,me.FACE_LANDMARKS_LIPS=df,me.FACE_LANDMARKS_LEFT_EYE=hf,me.FACE_LANDMARKS_LEFT_EYEBROW=mf,me.FACE_LANDMARKS_LEFT_IRIS=$0,me.FACE_LANDMARKS_RIGHT_EYE=gf,me.FACE_LANDMARKS_RIGHT_EYEBROW=wf,me.FACE_LANDMARKS_RIGHT_IRIS=e3,me.FACE_LANDMARKS_FACE_OVAL=yf,me.FACE_LANDMARKS_CONTOURS=t3,me.FACE_LANDMARKS_TESSELATION=n3;var Wt=class extends Ct{constructor(e,t){super(new gn(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},U(e=this.h=new x0,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return U(this.h,0,2,af(e,I(this.h,Qc,2))),this.l(e)}sa(e,t){return this.j={classifications:[]},wn(this,e,t),this.j}ta(e,t,n){return this.j={classifications:[]},Mn(this,e,n,t),this.j}m(){var e=new Mt;ye(e,"input_image"),ye(e,"norm_rect"),J(e,"classifications");const t=new jt;An(t,iy,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),he(n,"IMAGE:input_image"),he(n,"NORM_RECT:norm_rect"),Q(n,"CLASSIFICATIONS:classifications"),n.o(t),It(e,n),this.g.attachProtoListener("classifications",(i,a)=>{this.j=oy(X5(i)),C(this,a)}),this.g.attachEmptyPacketListener("classifications",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Wt.prototype.classifyForVideo=Wt.prototype.ta,Wt.prototype.classify=Wt.prototype.sa,Wt.prototype.setOptions=Wt.prototype.o,Wt.createFromModelPath=function(e,t){return Z(Wt,e,{baseOptions:{modelAssetPath:t}})},Wt.createFromModelBuffer=function(e,t){return Z(Wt,e,{baseOptions:{modelAssetBuffer:t}})},Wt.createFromOptions=function(e,t){return Z(Wt,e,t)};var zt=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!0),this.h=new S0,this.embeddings={embeddings:[]},U(e=this.h,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){var t=this.h,n=I(this.h,r0,2);return n=n?n.clone():new r0,e.l2Normalize!==void 0?ne(n,1,fs(e.l2Normalize)):"l2Normalize"in e&&ne(n,1),e.quantize!==void 0?ne(n,2,fs(e.quantize)):"quantize"in e&&ne(n,2),U(t,0,2,n),this.l(e)}za(e,t){return wn(this,e,t),this.embeddings}Aa(e,t,n){return Mn(this,e,n,t),this.embeddings}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"embeddings_out");const t=new jt;An(t,ay,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"EMBEDDINGS:embeddings_out"),n.o(t),It(e,n),this.g.attachProtoListener("embeddings_out",(i,a)=>{i=K5(i),this.embeddings=function(l){return{embeddings:Gn(l,Z5,1).map(s=>{var c,f;const r={headIndex:Zt(s,3)??0??-1,headName:We(de(s,4))??""??""};var o=s.v;return th(o,0|o[O],a0,Sc(s,1))!==void 0?(s=na(s=I(s,a0,Sc(s,1),void 0),1,_n,ta()),r.floatEmbedding=s.slice()):(o=new Uint8Array(0),r.quantizedEmbedding=((f=(c=I(s,Q5,Sc(s,2),void 0))==null?void 0:c.na())==null?void 0:f.h())??o),r}),timestampMs:D0(ah(l))}}(i),C(this,a)}),this.g.attachEmptyPacketListener("embeddings_out",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};zt.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=k0(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=k0(z0(e.quantizedEmbedding),z0(t.quantizedEmbedding))}return e},zt.prototype.embedForVideo=zt.prototype.Aa,zt.prototype.embed=zt.prototype.za,zt.prototype.setOptions=zt.prototype.o,zt.createFromModelPath=function(e,t){return Z(zt,e,{baseOptions:{modelAssetPath:t}})},zt.createFromModelBuffer=function(e,t){return Z(zt,e,{baseOptions:{modelAssetBuffer:t}})},zt.createFromOptions=function(e,t){return Z(zt,e,t)};var vf=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(n=>{n.close()}),(t=this.categoryMask)==null||t.close()}};function wy(e){var n,i;const t=function(a){return Gn(a,dt,1)}(e.ca()).filter(a=>(We(de(a,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(e.u=[],t.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");t.length===1&&(((i=(n=I(t[0],jt,7))==null?void 0:n.j())==null?void 0:i.g())??new Map).forEach((a,l)=>{e.u[Number(l)]=We(de(a,1))??""})}function f3(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function d3(e){try{const t=new vf(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{ru(e)}}vf.prototype.close=vf.prototype.close;var ht=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ef,this.A=new E0,U(this.h,0,3,this.A),U(e=this.h,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?ne(this.h,2,hs(e.displayNamesLocale)):"displayNamesLocale"in e&&ne(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}L(){wy(this)}segment(e,t,n){const i=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:n,f3(this),wn(this,e,i),d3(this)}La(e,t,n,i){const a=typeof n!="function"?n:{};return this.j=typeof n=="function"?n:i,f3(this),Mn(this,e,a,t),d3(this)}Da(){return this.u}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect");const t=new jt;An(t,A0,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),n.o(t),It(e,n),su(this,e),this.outputConfidenceMasks&&(J(e,"confidence_masks"),Q(n,"CONFIDENCE_MASKS:confidence_masks"),al(this,"confidence_masks"),this.g.aa("confidence_masks",(i,a)=>{this.confidenceMasks=i.map(l=>sl(this,l,!0,!this.j)),C(this,a)}),this.g.attachEmptyPacketListener("confidence_masks",i=>{this.confidenceMasks=[],C(this,i)})),this.outputCategoryMask&&(J(e,"category_mask"),Q(n,"CATEGORY_MASK:category_mask"),al(this,"category_mask"),this.g.Z("category_mask",(i,a)=>{this.categoryMask=sl(this,i,!1,!this.j),C(this,a)}),this.g.attachEmptyPacketListener("category_mask",i=>{this.categoryMask=void 0,C(this,i)})),J(e,"quality_scores"),Q(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(i,a)=>{this.qualityScores=i,C(this,a)}),this.g.attachEmptyPacketListener("quality_scores",i=>{this.categoryMask=void 0,C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ht.prototype.getLabels=ht.prototype.Da,ht.prototype.segmentForVideo=ht.prototype.La,ht.prototype.segment=ht.prototype.segment,ht.prototype.setOptions=ht.prototype.o,ht.createFromModelPath=function(e,t){return Z(ht,e,{baseOptions:{modelAssetPath:t}})},ht.createFromModelBuffer=function(e,t){return Z(ht,e,{baseOptions:{modelAssetBuffer:t}})},ht.createFromOptions=function(e,t){return Z(ht,e,t)};var bf=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(n=>{n.close()}),(t=this.categoryMask)==null||t.close()}};bf.prototype.close=bf.prototype.close;var Cn=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new ef,this.u=new E0,U(this.h,0,3,this.u),U(e=this.h,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}segment(e,t,n,i){const a=typeof n!="function"?n:{};if(this.j=typeof n=="function"?n:i,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.C+1,i=new j0,t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var l=new tf;di(l,3,fs(!0),!1),di(l,1,cs(t.keypoint.x),0),di(l,2,cs(t.keypoint.y),0),gs(i,1,nf,l)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");{const r=new sy;for(l of t.scribble)di(t=new tf,3,fs(!0),!1),di(t,1,cs(l.x),0),di(t,2,cs(l.y),0),Ac(r,1,tf,t);gs(i,2,nf,r)}}this.g.addProtoToStream(i.g(),"mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest","roi_in",n),wn(this,e,a);e:{try{const r=new bf(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var s=r;break e}this.j(r)}finally{ru(this)}s=void 0}return s}m(){var e=new Mt;ye(e,"image_in"),ye(e,"roi_in"),ye(e,"norm_rect_in");const t=new jt;An(t,A0,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"),he(n,"IMAGE:image_in"),he(n,"ROI:roi_in"),he(n,"NORM_RECT:norm_rect_in"),n.o(t),It(e,n),su(this,e),this.outputConfidenceMasks&&(J(e,"confidence_masks"),Q(n,"CONFIDENCE_MASKS:confidence_masks"),al(this,"confidence_masks"),this.g.aa("confidence_masks",(i,a)=>{this.confidenceMasks=i.map(l=>sl(this,l,!0,!this.j)),C(this,a)}),this.g.attachEmptyPacketListener("confidence_masks",i=>{this.confidenceMasks=[],C(this,i)})),this.outputCategoryMask&&(J(e,"category_mask"),Q(n,"CATEGORY_MASK:category_mask"),al(this,"category_mask"),this.g.Z("category_mask",(i,a)=>{this.categoryMask=sl(this,i,!1,!this.j),C(this,a)}),this.g.attachEmptyPacketListener("category_mask",i=>{this.categoryMask=void 0,C(this,i)})),J(e,"quality_scores"),Q(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(i,a)=>{this.qualityScores=i,C(this,a)}),this.g.attachEmptyPacketListener("quality_scores",i=>{this.categoryMask=void 0,C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Cn.prototype.segment=Cn.prototype.segment,Cn.prototype.setOptions=Cn.prototype.o,Cn.createFromModelPath=function(e,t){return Z(Cn,e,{baseOptions:{modelAssetPath:t}})},Cn.createFromModelBuffer=function(e,t){return Z(Cn,e,{baseOptions:{modelAssetBuffer:t}})},Cn.createFromOptions=function(e,t){return Z(Cn,e,t)};var Pt=class extends Ct{constructor(e,t){super(new gn(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},U(e=this.h=new M0,0,1,t=new ve)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?ne(this.h,2,hs(e.displayNamesLocale)):"displayNamesLocale"in e&&ne(this.h,2),e.maxResults!==void 0?Hn(this.h,3,e.maxResults):"maxResults"in e&&ne(this.h,3),e.scoreThreshold!==void 0?L(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&ne(this.h,4),e.categoryAllowlist!==void 0?Rr(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&ne(this.h,5),e.categoryDenylist!==void 0?Rr(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&ne(this.h,6),this.l(e)}F(e,t){return this.j={detections:[]},wn(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},Mn(this,e,n,t),this.j}m(){var e=new Mt;ye(e,"input_frame_gpu"),ye(e,"norm_rect"),J(e,"detections");const t=new jt;An(t,ry,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),he(n,"IMAGE:input_frame_gpu"),he(n,"NORM_RECT:norm_rect"),Q(n,"DETECTIONS:detections"),n.o(t),It(e,n),this.g.attachProtoVectorListener("detections",(i,a)=>{for(const l of i)i=e0(l),this.j.detections.push(O0(i));C(this,a)}),this.g.attachEmptyPacketListener("detections",i=>{C(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Pt.prototype.detectForVideo=Pt.prototype.G,Pt.prototype.detect=Pt.prototype.F,Pt.prototype.setOptions=Pt.prototype.o,Pt.createFromModelPath=async function(e,t){return Z(Pt,e,{baseOptions:{modelAssetPath:t}})},Pt.createFromModelBuffer=function(e,t){return Z(Pt,e,{baseOptions:{modelAssetBuffer:t}})},Pt.createFromOptions=function(e,t){return Z(Pt,e,t)};var xf=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){var e;(e=this.segmentationMasks)==null||e.forEach(t=>{t.close()})}};function h3(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function m3(e){try{const t=new xf(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.u)return t;e.u(t)}finally{ru(e)}}xf.prototype.close=xf.prototype.close;var kt=class extends Ct{constructor(e,t){super(new gn(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,U(e=this.h=new C0,0,1,t=new ve),this.A=new v0,U(this.h,0,3,this.A),this.j=new p0,U(this.h,0,2,this.j),Hn(this.j,4,1),L(this.j,2,.5),L(this.A,2,.5),L(this.h,4,.5)}get baseOptions(){return I(this.h,ve,1)}set baseOptions(e){U(this.h,0,1,e)}o(e){return"numPoses"in e&&Hn(this.j,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&L(this.j,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&L(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&L(this.A,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}F(e,t,n){const i=typeof t!="function"?t:{};return this.u=typeof t=="function"?t:n,h3(this),wn(this,e,i),m3(this)}G(e,t,n,i){const a=typeof n!="function"?n:{};return this.u=typeof n=="function"?n:i,h3(this),Mn(this,e,a,t),m3(this)}m(){var e=new Mt;ye(e,"image_in"),ye(e,"norm_rect"),J(e,"normalized_landmarks"),J(e,"world_landmarks"),J(e,"segmentation_masks");const t=new jt;An(t,uy,this.h);const n=new dt;At(n,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),Q(n,"NORM_LANDMARKS:normalized_landmarks"),Q(n,"WORLD_LANDMARKS:world_landmarks"),n.o(t),It(e,n),su(this,e),this.g.attachProtoVectorListener("normalized_landmarks",(i,a)=>{this.landmarks=[];for(const l of i)i=vs(l),this.landmarks.push(au(i));C(this,a)}),this.g.attachEmptyPacketListener("normalized_landmarks",i=>{this.landmarks=[],C(this,i)}),this.g.attachProtoVectorListener("world_landmarks",(i,a)=>{this.worldLandmarks=[];for(const l of i)i=nl(l),this.worldLandmarks.push(bs(i));C(this,a)}),this.g.attachEmptyPacketListener("world_landmarks",i=>{this.worldLandmarks=[],C(this,i)}),this.outputSegmentationMasks&&(Q(n,"SEGMENTATION_MASK:segmentation_masks"),al(this,"segmentation_masks"),this.g.aa("segmentation_masks",(i,a)=>{this.segmentationMasks=i.map(l=>sl(this,l,!0,!this.u)),C(this,a)}),this.g.attachEmptyPacketListener("segmentation_masks",i=>{this.segmentationMasks=[],C(this,i)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};kt.prototype.detectForVideo=kt.prototype.G,kt.prototype.detect=kt.prototype.F,kt.prototype.setOptions=kt.prototype.o,kt.createFromModelPath=function(e,t){return Z(kt,e,{baseOptions:{modelAssetPath:t}})},kt.createFromModelBuffer=function(e,t){return Z(kt,e,{baseOptions:{modelAssetBuffer:t}})},kt.createFromOptions=function(e,t){return Z(kt,e,t)},kt.POSE_CONNECTIONS=u3;const cu="https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task",yy="https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm",py=()=>{const e=y.useRef(null),[t,n]=y.useState(!1),[i,a]=y.useState("Initializing..."),[l,s]=y.useState(0),[r,o]=y.useState(!1);y.useEffect(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(d=>{console.log("ServiceWorker registered:",d)}).catch(d=>{console.log("ServiceWorker registration failed:",d)})},[]);const c=async()=>"caches"in window?await(await caches.open("mediapipe-models-v1")).match(cu)!==void 0:!1,f=async()=>{try{const d=await fetch(cu),m=d.headers.get("content-length"),v=m?parseInt(m,10):0;if(!d.body)throw new Error("No response body");const x=d.body.getReader();let E=0;const g=[];for(;;){const{done:w,value:p}=await x.read();if(w)break;if(g.push(p),E+=p.length,v){const b=Math.round(E/v*100);s(b),a(`Downloading model... ${b}%`)}}return"caches"in window&&await(await caches.open("mediapipe-models-v1")).put(cu,new Response(new Blob(g),{headers:{"Content-Type":"application/octet-stream"}})),!0}catch(d){return console.error("Failed to preload model:",d),!1}};return y.useEffect(()=>{(async()=>{try{a("Checking cached models..."),await c()?a("Using cached model..."):(a("Model not cached. Downloading..."),await f()),a("Loading MediaPipe WASM...");const v=await ua.forVisionTasks(yy);a("Creating face landmarker...");const x=await pe.createFromOptions(v,{baseOptions:{modelAssetPath:cu,delegate:"GPU"},runningMode:"VIDEO",outputFaceBlendshapes:!0,numFaces:2});e.current=x,n(!0),a("Model loaded successfully ✅")}catch(m){console.error("Model init error:",m),a(`Error: ${m==null?void 0:m.message}`),(m==null?void 0:m.name)==="NotAllowedError"&&o(!0)}})()},[]),{faceLandmarkerRef:e,isModelLoaded:t,statusMessage:i,setStatusMessage:a,loadingProgress:l,permissionDenied:r,clearCache:async()=>{"caches"in window&&(await caches.delete("mediapipe-models-v1"),a("Cache cleared. Please refresh to re-download models."))}}},vy=()=>{const[e,t]=y.useState(0),n=y.useRef({lastTime:0,frames:0,fps:0}),i=y.useCallback(()=>{const a=performance.now(),l=n.current;if(l.frames++,a-l.lastTime>=1e3){const s=Math.round(l.frames*1e3/(a-l.lastTime));t(s),l.frames=0,l.lastTime=a}},[]);return{fps:e,updateFPS:i}},by=()=>{const e=y.useRef({value:100,isLookingAway:!1}),t=y.useCallback((l,s,r,o)=>{if(!l||!r||!s)return;const c=l.getContext("2d");if(!c)return;const{width:f,height:h}=l;if(c.clearRect(0,0,f,h),c.drawImage(s,0,0,f,h),o){c.fillStyle="#00FF00";for(const d of r)c.fillRect(d.x*f-.5,d.y*h-.5,1,1)}},[]),n=y.useCallback(l=>{const s=e.current.value/100,r=100,o=20,c=20,f=40;l.fillStyle="rgba(0, 0, 0, 0.3)",l.fillRect(c,f,o,r),l.fillStyle=`rgba(${Math.floor(255*(1-s))}, ${Math.floor(255*s)}, 0, 0.8)`;const h=r*s;l.fillRect(c,f+r-h,o,h),l.fillStyle="#FFFFFF",l.fillRect(c,f+r*(1-s),o,2)},[]),i=y.useCallback((l,s,r,o,c,f,h)=>{if(t(l,s,r,o),c&&f&&h){const d=l.getContext("2d");d&&n(d)}},[t,n]),a=y.useCallback((l,s)=>{const r=l.getContext("2d");r&&(r.clearRect(0,0,l.width,l.height),r.drawImage(s,0,0,l.width,l.height))},[]);return{drawLandmarks:t,drawEngagementBar:n,drawWithEngagementBar:i,clearCanvas:a,engagementRef:e}},xy=50,Sy=()=>{const[e,t]=y.useState(100),[n,i]=y.useState(!1),a=y.useRef(0),l=y.useCallback((s,r,o)=>{if(!o||s.length<468)return;const c=s[33],f=s[263],h=s[1];if(!c||!f||!h)return;const d=(c.x+f.x)*.5,m=(c.y+f.y)*.5,v=d-r.x,x=m-r.y,E=Math.sqrt(v*v+x*x),g=Math.abs(h.y-r.noseY)*100,w=Math.abs(h.x-r.noseX)*100,p=Math.max(0,100-(E*200+g+w)),b=p<xy,A=performance.now();return A-a.current>100&&(t(p),i(b),a.current=A),{engagement:p,isLookingAway:b}},[]);return{engagement:e,isLookingAway:n,analyzeGaze:l,setEngagement:t,setIsLookingAway:i}},Ey=.05,_y=()=>{const[e,t]=y.useState(!1),[n,i]=y.useState(!1),a=y.useCallback((r,o)=>Math.sqrt(Math.pow(r.x-o.x,2)+Math.pow(r.y-o.y,2)),[]),l=y.useCallback((r,o)=>{if(!r||!o)return 0;const c=[1,33,263,61,291,10,152];let f=0,h=0;const d=o[33],m=o[263],v=r[33],x=r[263];if(!d||!m||!v||!x)return 0;const E=a(d,m),g=a(v,x);if(E===0||g===0)return 0;for(const p of c){const b=o[p],A=r[p];if(b&&A){const N=d.x+(A.x-v.x)*E/g,_=d.y+(A.y-v.y)*E/g;f+=a(b,{x:N,y:_}),h++}}return h===0?0:f/h},[a]),s=y.useCallback((r,o,c,f)=>{if(!r.faceLandmarks||r.faceLandmarks.length===0)return o?(f("Reference face not detected."),i(!0),t(!1)):i(!1),null;if(o&&c){let h=null,d=0;for(const m of r.faceLandmarks)l(m,c)<Ey&&(h=m,d++);return d===1?(t(!1),i(!1),f("Reference face tracked."),h):d>1?(t(!0),i(!1),f("Multiple matching faces detected. Tracking suspended."),null):(t(!1),i(!0),f("Reference face not detected."),null)}else{r.faceLandmarks.length>1?(t(!0),f("Multiple faces detected. Set reference for single face tracking.")):(t(!1),f("No reference set. Detecting first face."));const h=r.faceLandmarks[0];return!h||h.length<468?null:h}},[l]);return{multipleFacesDetected:e,referenceFaceNotDetected:n,analyzeFace:s,setMultipleFacesDetected:t,setReferenceFaceNotDetected:i}},Ty=1e3,Ay=(e,t)=>{const[n,i]=y.useState(!1),[a,l]=y.useState("face_detected"),{incrementGazeViolation:s}=n1(),{multipleFacesDetected:r,referenceFaceNotDetected:o,isLookingAway:c}=e;y.useEffect(()=>{let d;return(c||r||o)&&t?d=setTimeout(()=>{i(!0),c?(l("looking_away"),s("looking_away")):r?(l("multiple_faces"),s("multiple_faces")):o&&(l("no_face_detected"),s("no_face_detected"))},Ty):(i(!1),l("face_detected")),()=>{clearTimeout(d)}},[c,r,o,t,s]);const f=y.useCallback(()=>r?"multiple_faces":o?"no_face_detected":c?"looking_away":"face_detected",[r,o,c]),h=y.useCallback(()=>{i(!1),l("face_detected")},[]);return{showGazeWarningModal:n,faceDetectionState:a,getWarningType:f,closeWarningModal:h,setShowGazeWarningModal:i,setFaceDetectionState:l}};class be extends Error{constructor(t,n,i=!1){super(t),this.code=n,this.recoverable=i,this.name="STTError"}}class Ny{constructor(t={}){Qt(this,"config");Qt(this,"mediaRecorder",null);Qt(this,"audioChunks",[]);Qt(this,"recordingStream",null);Qt(this,"autoStopTimeoutId",null);this.config={baseUrl:"http://localhost:8000",provider:"groq",model:"whisper-large-v3-turbo",language:"en",includeTimestamps:!1,temperature:0,...t}}updateConfig(t){this.config={...this.config,...t}}isRecordingSupported(){return!!(navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia=="function"&&window.MediaRecorder)}async startRecording(t,n){var i;if(!this.isRecordingSupported())throw new be("Audio recording is not supported in this browser","RECORDING_NOT_SUPPORTED",!1);if(this.isRecording())throw new be("Recording is already in progress","ALREADY_RECORDING",!0);try{this.recordingStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,sampleRate:44100}}),this.audioChunks=[];const a=this.getSupportedMimeType();this.mediaRecorder=new MediaRecorder(this.recordingStream,{mimeType:a}),this.mediaRecorder.ondataavailable=l=>{var s;l.data.size>0&&(this.audioChunks.push(l.data),(s=n==null?void 0:n.onDataAvailable)==null||s.call(n,l.data))},this.mediaRecorder.onstop=()=>{var l;(l=n==null?void 0:n.onStop)==null||l.call(n)},this.mediaRecorder.onerror=l=>{var r;const s=new be(`Recording failed: ${l.error}`,"RECORDING_ERROR",!0);(r=n==null?void 0:n.onError)==null||r.call(n,s),this.cleanup()},this.mediaRecorder.start(100),(i=n==null?void 0:n.onStart)==null||i.call(n),t&&t>0&&(this.autoStopTimeoutId=setTimeout(()=>{this.isRecording()&&this.stopRecording()},t*1e3))}catch(a){if(this.cleanup(),a instanceof Error){if(a.name==="NotAllowedError"||a.name==="PermissionDeniedError")throw new be("Microphone permission was denied","PERMISSION_DENIED",!1);if(a.name==="NotFoundError")throw new be("No microphone found","NO_MICROPHONE",!1)}throw new be(`Failed to start recording: ${a instanceof Error?a.message:String(a)}`,"START_RECORDING_FAILED",!0)}}async stopRecording(){if(this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null),!this.mediaRecorder||!this.isRecording())throw new be("No active recording to stop","NO_ACTIVE_RECORDING",!1);return new Promise((t,n)=>{if(!this.mediaRecorder){n(new be("MediaRecorder is null","MEDIARECORDER_NULL",!1));return}const i=this.mediaRecorder,a=()=>{try{const l=i.mimeType||"audio/webm",s=new Blob(this.audioChunks,{type:l});this.cleanup(),t(s)}catch(l){n(new be(`Failed to create audio blob: ${l instanceof Error?l.message:String(l)}`,"BLOB_CREATION_FAILED",!1))}};i.addEventListener("stop",a,{once:!0}),i.stop()})}async transcribe(t){const{audioBlob:n}=t;if(!n||n.size===0)throw new be("Audio blob is empty or invalid","INVALID_AUDIO",!1);try{const i=new FormData,a=new File([n],"recording.wav",{type:n.type||"audio/wav"});if(i.append("file",a),i.append("qna_id",this.config.qnaId||""),!this.config.interviewId)throw new be("Interview ID is missing from configuration","MISSING_INTERVIEW_ID",!1);const l=await ui(`${this.config.baseUrl}${ci.TRANSCRIBE_ANSWER(this.config.interviewId)}`,{method:"POST",headers:{accept:"application/json","X-STT-Provider":this.config.provider||"groq",...this.config.authToken&&{Authorization:`Bearer ${this.config.authToken}`}},body:i},{attempts:1,backoff:"exponential",baseDelay:1e3,maxDelay:3e3,jitter:!0});if(!l.ok){const r=await l.text();let o=`STT request failed: ${l.status} ${l.statusText}`;try{const c=JSON.parse(r);o=c.message||c.error||o}catch{o=r||o}throw new be(o,`HTTP_${l.status}`,l.status>=500)}return{transcript:(await l.json()).data.transcribed_text??""}}catch(i){throw i instanceof be?i:new be(`Transcription failed: ${i instanceof Error?i.message:String(i)}`,"TRANSCRIPTION_FAILED",!0)}}cancelRecording(){this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null),this.mediaRecorder&&this.isRecording()&&this.mediaRecorder.stop(),this.cleanup()}isRecording(){return this.mediaRecorder!==null&&this.mediaRecorder.state==="recording"}getSupportedMimeType(){const t=["audio/webm","audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/wav"];for(const n of t)if(MediaRecorder.isTypeSupported(n))return n;return"audio/webm"}getRecordingStream(){return this.recordingStream}cleanup(){this.recordingStream&&(this.recordingStream.getTracks().forEach(t=>t.stop()),this.recordingStream=null),this.mediaRecorder=null,this.audioChunks=[],this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null)}}const rl=new Ny,jy=(e,t,n,i)=>{const a=y.useRef(null);return y.useEffect(()=>{if(!t)return;const l=async()=>{try{const o=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:640},height:{ideal:480},facingMode:"user"}});e.current&&(e.current.srcObject=o,e.current.onloadeddata=()=>{n()})}catch(o){console.error("Camera access error:",o),i("Camera access failed")}},s=a.current,r=e.current;return l(),()=>{s&&cancelAnimationFrame(s),r!=null&&r.srcObject&&r.srcObject.getTracks().forEach(c=>c.stop())}},[t,n]),y.useEffect(()=>{const l=rl.getRecordingStream();if(l&&e.current){e.current.srcObject=l;const s=l.getVideoTracks(),r=l.getAudioTracks(),o=()=>{console.log("Media track ended - permission may have been revoked")};[...s,...r].forEach(c=>{c.addEventListener("ended",o)})}},[]),{animationFrameRef:a}},My=(e,t,n,i,a,l,s,r,o,c,f,h,d,m,v)=>{const x=y.useRef(null),E=y.useCallback(()=>{var b;const g=e.current,w=t.current,p=n.current;if(!g||g.readyState<2||!p||!w){x.current=requestAnimationFrame(E);return}i();try{const A=performance.now(),N=p.detectForVideo(g,A);if(((b=N.faceLandmarks)==null?void 0:b.length)>0){v(!1);const _=a(N,o,c.current,m);_?(l(w,g,_,f,h,d,o),o&&d&&r(_,c.current,d)):s(w,g)}else s(w,g),o?(v(!0),m("Reference face not detected.")):v(!1)}catch(A){console.error("Face detection error:",A)}x.current=requestAnimationFrame(E)},[e,t,n,i,a,l,s,r,o,c,f,h,d,m,v]);return{renderLoop:E,animationFrameRef:x}},Cy=(e,t,n,i)=>{const{referenceSet:a,referenceRef:l,setReferenceData:s}=n1(),r=y.useRef(l),o=y.useCallback(()=>{r.current=l},[l]),c=y.useCallback(()=>{var d;const f=e.current,h=t.current;if(console.log({faceLandmarker:f,video:h}),!(!f||!h))try{const m=performance.now(),v=f.detectForVideo(h,m);if((d=v.faceLandmarks)!=null&&d[0]){const x=v.faceLandmarks[0],E=x[33],g=x[263],w=x[1];E&&g&&w&&(r.current={x:(E.x+g.x)*.5,y:(E.y+g.y)*.5,noseX:w.x,noseY:w.y},s(!0,r.current),n("Reference set. Gaze tracking active."),console.log("Reference set. Gaze tracking active.",r.current),i&&i())}}catch(m){console.error("Set reference error:",m),n("Failed to set reference")}},[e,t,n,s,i]);return{referenceSet:a,referenceRef:r,setReference:c,syncReference:o}},Sf=({isOpen:e,onClose:t,children:n,title:i,showCloseButton:a=!0,closeOnOverlayClick:l=!0,closeOnEscape:s=!0,className:r=""})=>{if(y.useEffect(()=>{if(!e||!s)return;const f=h=>{h.key==="Escape"&&t()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,s,t]),y.useEffect(()=>(e?(document.body.style.overflow="hidden",document.body.classList.add("interview-widget-container")):(document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")),()=>{document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")}),[e]),!e)return null;const o=f=>{l&&f.target===f.currentTarget&&t()},c=u.jsxs("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center",children:[u.jsx("div",{className:"iw-fixed iw-inset-0 iw-bg-black iw-bg-opacity-50 iw-transition-opacity",onClick:o}),u.jsxs("div",{className:`iw-relative iw-bg-white iw-rounded-lg iw-shadow-xl iw-max-w-md iw-w-full iw-mx-4 iw-max-h-[90vh] iw-overflow-hidden ${r}`,role:"dialog","aria-modal":"true","aria-labelledby":i?"dialog-title":void 0,children:[(i||a)&&u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between iw-p-4 iw-border-b iw-border-gray-200",children:[i&&u.jsx("h2",{id:"dialog-title",className:"iw-text-lg iw-font-semibold iw-text-gray-900",children:i}),a&&u.jsx("button",{onClick:t,className:"iw-p-1 iw-text-gray-400 iw-hover:text-gray-600 iw-transition-colors iw-rounded iw-hover:bg-gray-100","aria-label":"Close dialog",children:u.jsx("svg",{className:"iw-w-5 iw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),u.jsx("div",{className:"iw-p-4 iw-overflow-y-auto",children:n})]})]});return Zi.createPortal(c,document.body)},g3=({children:e,variant:t="primary",size:n="md",fullWidth:i=!1,isLoading:a=!1,disabled:l,className:s="",...r})=>{const o="iw-inline-flex iw-items-center iw-justify-center iw-rounded-md iw-font-medium iw-transition-colors iw-focus:outline-none iw-focus:ring-2 iw-focus:ring-primary-500 iw-focus:ring-offset-2",c={primary:"iw-bg-primary-600 iw-text-white iw-hover:bg-primary-700 iw-border iw-border-transparent",secondary:"iw-bg-primary-100 iw-text-primary-700 iw-hover:bg-primary-200 iw-border iw-border-transparent",outline:"iw-bg-transparent iw-text-primary-700 iw-border iw-border-primary-500 iw-hover:bg-primary-50",text:"iw-bg-transparent iw-text-primary-600 iw-hover:bg-primary-50 iw-border iw-border-transparent",gradient:"iw-text-white iw-border iw-border-transparent iw-bg-gradient-to-r iw-from-purple-500 iw-to-indigo-500 hover:iw-from-purple-600 hover:iw-to-indigo-600"},f={sm:"iw-px-3 iw-py-1.5 iw-text-sm",md:"iw-px-4 iw-py-2.5 iw-text-sm",lg:"iw-px-5 iw-py-3 iw-text-base"},h="iw-disabled:opacity-50 iw-disabled:cursor-not-allowed iw-disabled:pointer-events-none",d=i?"iw-w-full":"";return u.jsxs("button",{className:`${o} ${c[t]} ${f[n]} ${d} ${h} ${s}`,disabled:l||a,...r,children:[a&&u.jsx(o1,{height:16,width:16,style:{marginRight:"3px"}}),e]})},Ss=e=>{const{baseColor:t,borderRadius:n}=$l(),{loading:i,children:a,...l}=e;return u.jsx(g3,{style:{background:o6(t),borderRadius:n},...l,children:i?u.jsx(o1,{}):a})};function Dy({isOpen:e,onClose:t,warningType:n}){const i=c1[n],a=i.icon,l=()=>{t()};return n==="face_detected"?null:u.jsx(Sf,{isOpen:e,onClose:t,children:e&&u.jsx("div",{className:"iw-bg-white iw-border-white iw-border iw-p-0 iw-shadow-lg sm:iw-max-w-md",children:u.jsxs("div",{children:[u.jsx("div",{className:"iw-sr-only",children:i.description}),u.jsxs("div",{className:"iw-px-8 iw-py-8 iw-text-center",children:[u.jsx("div",{className:`iw-mx-auto iw-mb-6 iw-flex iw-h-16 iw-w-16 iw-items-center iw-justify-center iw-rounded-full ${i.iconBg} border ${i.iconBorder}`,children:u.jsx(a,{className:`iw-h-7 iw-w-7 ${i.iconColor}`})}),u.jsx("h1",{className:"iw-text-foreground iw-mb-3 iw-text-2xl iw-font-bold iw-tracking-tight",children:i.title}),u.jsx("h2",{className:"iw-text-gray-500 iw-mb-6 iw-text-base iw-font-medium",children:i.subtitle}),u.jsx("p",{className:"iw-text-neutral-400 iw-mx-auto iw-mb-8 iw-max-w-sm iw-text-sm iw-leading-relaxed",children:i.description}),u.jsx(Ss,{onClick:l,className:"iw-w-full iw-bg-gray-800 iw-text-white hover:iw-bg-gray-800",children:i.buttonText})]})]})})})}const w3=y.forwardRef(({className:e="",interviewId:t="",interview_duration:n,showProctoringUI:i=!0,onSetReference:a,isAnswering:l,onProctoringStatusChange:s,showStatusOverlay:r=!1},o)=>{var Yw;const{authToken:c}=a1(),f=c?f6(c):null,{borderRadius:h}=$l(),d=h??18,{proctoring:m}=Ko(),v=!!(m!=null&&m.gazeAnalysisEnabled),[x,E]=y.useState(!1),[g,w]=y.useState((m==null?void 0:m.showLandmarks)??!1),[p,b]=y.useState(i&&((m==null?void 0:m.showEngagementBar)??!0)),[A,N]=y.useState(v),[_,M]=y.useState(!1),T=y.useRef(null),D=y.useRef(null),Ee=y.useRef(null),Re=y.useRef(null),rt=y.useCallback(async St=>{const Er=T.current,ft=Ee.current;if(!Er||!ft)return;const Jl=ft.getContext("2d");Jl&&(ft.width=Er.videoWidth,ft.height=Er.videoHeight,Jl.save(),Jl.scale(-1,1),Jl.drawImage(Er,-ft.width,0,ft.width,ft.height),Jl.restore(),await new Promise(Vo=>ft.toBlob(Vo,"image/jpeg")))},[j6,t]);y.useEffect(()=>{let St;return l&&(M(!0),St=setTimeout(()=>M(!1),1e3)),()=>{St&&clearTimeout(St)}},[l]);const{faceLandmarkerRef:cn,isModelLoaded:xt,statusMessage:j,setStatusMessage:G,loadingProgress:R,permissionDenied:$,clearCache:se}=py(),{fps:ut,updateFPS:bn}=vy(),{drawWithEngagementBar:fn,clearCanvas:Xt,engagementRef:ot}=by(),{engagement:ct,isLookingAway:dn,analyzeGaze:Ce,setEngagement:Xi,setIsLookingAway:Il}=Sy(),{multipleFacesDetected:br,referenceFaceNotDetected:xr,analyzeFace:J2,setMultipleFacesDetected:Bo,setReferenceFaceNotDetected:Ma}=_y(),{referenceSet:Sr,referenceRef:Ro,setReference:V,syncReference:_e}=Cy(cn,T,G,a),Ca={multipleFacesDetected:br,referenceFaceNotDetected:xr,isLookingAway:dn},{showGazeWarningModal:Go,getWarningType:Ho,closeWarningModal:Vw,setShowGazeWarningModal:qw,setFaceDetectionState:Fw}=Ay(Ca,v&&!r);y.useEffect(()=>{if(s){const St=Ho()||"face_detected";s(St)}},[br,xr,dn,Ho,s]);const{renderLoop:e7}=My(T,D,cn,bn,J2,fn,Xt,Ce,Sr,Ro,g,p,v,G,Ma);jy(T,xt,e7,G),y.useEffect(()=>{_e()},[_e]),y.useEffect(()=>{ot&&ot.current&&(ot.current.value=ct,ot.current.isLookingAway=dn)},[ct,dn,ot]);const t7=y.useCallback(St=>{N(St),St||(Xi(100),Il(!1))},[Xi,Il]),n7=y.useCallback(()=>{Il(!1),Bo(!1),Ma(!1),Fw("face_detected"),qw(!1),Vw()},[Il,Bo,Ma,Fw,qw,Vw]),i7={engagement:ct,fps:ut,isLookingAway:dn,multipleFacesDetected:br,referenceFaceNotDetected:xr};return y.useEffect(()=>{const St=[];return(async()=>{try{const ft=await navigator.mediaDevices.getUserMedia({video:!0,audio:!1});Re.current=ft,T.current&&(T.current.srcObject=ft);const Vo=(n??Tr)*60*1e3/3,a7=[0,1,2].map((Da,Qi)=>({label:`capture-${Qi+1}`,start:Qi*Vo,end:(Qi+1)*Vo})),l7=(Da,Qi)=>Da===Qi?Da:Math.random()*(Qi-Da)+Da;a7.forEach(({label:Da,start:Qi,end:s7},r7)=>{let W2;r7===0?W2=3e3:W2=l7(Qi,s7),St.push(setTimeout(()=>{rt(Da)},W2))})}catch(ft){console.error("Error accessing camera:",ft)}})(),()=>{Re.current&&Re.current.getTracks().forEach(ft=>ft.stop()),St.forEach(clearTimeout)}},[rt]),y.useImperativeHandle(o,()=>({setReference:()=>{V()},stopCamera:()=>{Re.current&&(Re.current.getTracks().forEach(St=>St.stop()),Re.current=null)}}),[V]),u.jsxs("div",{className:`iw-relative iw-h-full iw-w-full ${e}`,children:[$?u.jsxs("div",{className:"iw-rounded-md iw-border iw-border-red-600 iw-p-5 iw-text-red-600",children:[u.jsx("h2",{children:"Camera Permission Denied"}),u.jsx("p",{children:"Please allow camera access to use this application."})]}):u.jsx("div",{className:"iw-flex iw-w-full iw-h-full iw-justify-start iw-items-start",children:u.jsxs("div",{className:`iw-relative iw-max-w-full iw-max-h-full iw-aspect-video iw-rounded-2xl iw-overflow-hidden iw-bg-black ${_?"iw-animate-answer-start":""} ${l?"iw-border-4 iw-border-[#6296FB]":""}`,style:{width:"100%",height:"auto",minHeight:"0"},children:[u.jsx("video",{ref:T,autoPlay:!0,playsInline:!0,muted:!0,className:"iw-absolute iw-inset-0 iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)"}}),v&&u.jsx("canvas",{ref:D,width:320,height:240,className:"iw-absolute iw-inset-0 iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)",borderRadius:d}}),u.jsx("canvas",{ref:Ee,style:{display:"none"}}),i&&u.jsxs("div",{className:"iw-absolute iw-top-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-[#FFEBE6] iw-px-2 iw-py-1 iw-backdrop-blur-md",children:[u.jsx("div",{className:"iw-size-2 iw-animate-pulse iw-rounded-full iw-bg-red-500"}),u.jsx("span",{className:"iw-font-medium iw-text-xs iw-text-[#E94315]",children:"RECORDING"})]}),i&&((Yw=f==null?void 0:f.data)==null?void 0:Yw.user_name)&&u.jsx("div",{className:"iw-absolute iw-z-50 iw-bottom-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-[#F1F5FE] iw-px-3 iw-py-1 iw-backdrop-blur-md",children:u.jsx("span",{className:"iw-font-medium iw-text-xs iw-text-[#062260]",children:f.data.user_name})}),i&&u.jsx("div",{className:"iw-absolute iw-bottom-4 iw-right-4",children:u.jsx(C6,{showControls:(m==null?void 0:m.showControls)??!1,isBubbleOpen:x,setIsBubbleOpen:E,setReference:V,clearCache:se,isModelLoaded:xt,gazeAnalysisEnabled:A&&v,referenceSet:Sr,showLandmarks:g,setShowLandmarks:w,showEngagementBar:p,setShowEngagementBar:b,handleToggleGazeAnalysis:t7,stats:i7,statusMessage:j,loadingProgress:R})}),r&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"iw-absolute iw-inset-0 iw-pointer-events-none iw-z-10 ",style:{background:"radial-gradient(ellipse 20% 40% at 50% 45%, transparent 99.5%, rgba(0,0,0,0.35) 100%)"}}),u.jsx("div",{className:"iw-absolute iw-bottom-2 iw-inset-x-0 iw-flex iw-justify-center iw-pointer-events-none iw-z-20",children:u.jsx(Oy,{status:Ho()??"face_detected"})})]})]})}),v&&Go&&!r&&u.jsx(Dy,{isOpen:Go,onClose:n7,warningType:Ho()})]})}),Oy=({status:e})=>{const t=c1[e];if(!t)return null;const n=e!=="face_detected";return u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-gap-2",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2 iw-px-3 iw-py-1 iw-rounded-full iw-backdrop-blur-md iw-shadow-sm transition-colors duration-300 iw-text-white",children:[u.jsx("div",{className:`iw-flex iw-h-4 iw-w-4 iw-items-center iw-size-2.5 iw-justify-center iw-rounded-full iw-text-white ${n?"iw-bg-[#E94315]":"iw-bg-[#22C55E]"}`,children:n?u.jsx(r1,{}):u.jsx(Nr,{})}),u.jsx("span",{className:"iw-text-sm iw-font-medium",children:e==="face_detected"?"Face detected clearly":t.title})]}),n&&u.jsx("span",{className:"iw-text-white iw-text-center iw-text-sm iw-drop-shadow-sm iw-max-w-[400px] iw-px-3 ",children:"Sit upright & look directly into the camera"})]})},y3=({micEnabled:e=!1,videoEnabled:t=!1,buttonText:n,onButtonClick:i,isAgreed:a,onAgreedToggle:l,showCheckbox:s=!0,showMediaIcons:r=!0,disabled:o=!1})=>{const c=o||!a||r&&(!e||!t);return u.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-6 iw-w-full",children:[s&&u.jsxs("div",{className:"iw-flex iw-items-start iw-gap-3 iw-bg-[#F1F5FE] iw-rounded-xl iw-p-4 iw-border iw-border-[#E7EAF1]",children:[u.jsx("div",{className:`iw-mt-0.5 iw-h-5 iw-w-5 iw-min-w-[20px] iw-rounded iw-border iw-flex iw-items-center iw-justify-center iw-cursor-pointer iw-transition-colors ${a?"iw-bg-[#062260] iw-border-[#062260]":"iw-bg-white iw-border-[#B3B9CB]"}`,onClick:f=>{f.stopPropagation(),l(!a)},children:a&&u.jsx(Nr,{className:"iw-size-3 iw-text-white"})}),u.jsx("label",{onClick:()=>l(!a),className:"iw-text-sm iw-text-[#062260] iw-font-medium iw-cursor-pointer iw-select-none",children:"By continuing, you acknowledge and consent to the use of your face data exclusively for interview monitoring"})]}),u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-4",children:[r&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"iw-relative",children:[u.jsx("div",{className:`iw-flex iw-h-12 iw-w-16 iw-items-center iw-justify-center iw-rounded-xl iw-border iw-transition-all ${e?"iw-border-[#E7EAF1] iw-bg-white iw-text-[#062260]":"iw-border-rose-200 iw-bg-rose-50 iw-text-rose-600"}`,children:e?u.jsx(y6,{className:"iw-h-6 iw-w-6"}):u.jsx(p6,{className:"iw-h-6 iw-w-6"})}),e&&u.jsx("div",{className:"iw-absolute -iw-right-1 -iw-top-1 iw-flex iw-h-4 iw-w-4 iw-items-center iw-justify-center iw-rounded-full iw-bg-[#22C55E] iw-text-white",children:u.jsx(Nr,{className:"iw-h-2.5 iw-w-2.5"})})]}),u.jsxs("div",{className:"iw-relative",children:[u.jsx("div",{className:`iw-flex iw-h-12 iw-w-16 iw-items-center iw-justify-center iw-rounded-xl iw-border iw-transition-all ${t?"iw-border-[#E7EAF1] iw-bg-white iw-text-[#062260]":"iw-border-rose-200 iw-bg-rose-50 iw-text-rose-600"}`,children:t?u.jsx(_6,{className:"iw-h-6 iw-w-6"}):u.jsx(T6,{className:"iw-h-6 iw-w-6"})}),t&&u.jsx("div",{className:"iw-absolute -iw-right-1 -iw-top-1 iw-flex iw-h-4 iw-w-4 iw-items-center iw-justify-center iw-rounded-full iw-bg-[#22C55E] iw-text-white",children:u.jsx(Nr,{className:"iw-h-2.5 iw-w-2.5"})})]})]}),u.jsx(g3,{onClick:i,disabled:c,className:`iw-h-12 iw-flex-1 iw-max-w-[220px] !iw-bg-[#F1F5FE] !iw-text-[#062260] !iw-font-bold iw-border-none iw-rounded-lg ${c?"iw-opacity-50":"hover:iw-opacity-75"}`,children:n})]})]})},zy=({steps:e,currentStepIndex:t})=>u.jsx("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-4 iw-w-full iw-py-6",children:e.map((n,i)=>{const a=i<t,l=i===t;return u.jsxs(y.Fragment,{children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[u.jsx("div",{className:`iw-flex iw-size-9 iw-text-[#062260] iw-items-center iw-justify-center iw-rounded-full iw-font-semibold iw-border ${l||a?"iw-border-[#0EB00E] iw-bg-[#E9FFE6]":"iw-border-[#BDE0FD] iw-bg-[#E6F3FF]"}`,children:a?u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:u.jsx("polyline",{points:"20 6 9 17 4 12"})}):i+1}),u.jsx("span",{className:`iw-text-sm iw-font-medium ${l||a?"iw-text-[#062260]":"iw-text-[#5C6686]"}`,children:n.label})]}),i<e.length-1&&u.jsx("div",{className:"iw-flex-1 iw-max-w-[120px] iw-border-t iw-border-dotted iw-border-[#B3B9CB]"})]},i)})}),ky=["Don't refresh or reload the page during your assessment","Don't switch tabs or open other applications while session is ongoing","Don't leave your position during the session","Don't disable or interfere with video/audio monitoring"],Ly=({isOpen:e,onStart:t,gazeEnabled:n=!1,videoFeedRef:i,interviewId:a="",interview_duration:l=Tr})=>{const s=y.useRef(null),r=y.useRef(null),[o,c]=y.useState(!1),[f,h]=y.useState(!1),[d,m]=y.useState(0),[v,x]=y.useState(!1),E=y.useRef(null),g=y.useRef(null),w=T=>{E.current=T,i&&(typeof i=="function"?i(T):i.current=T)},p=()=>{r.current&&(r.current.getTracks().forEach(T=>T.stop()),r.current=null)},b=async()=>{try{const T=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:1280},height:{ideal:720}},audio:!0});r.current=T,s.current&&(s.current.srcObject=T),c(!0)}catch(T){console.error("Media permission error:",T);let D="Unable to access camera or microphone.";(T==null?void 0:T.name)==="NotAllowedError"?D="Permissions denied. Please allow access to camera and microphone.":(T==null?void 0:T.name)==="NotFoundError"?D="No camera/microphone found. Please connect a device and retry.":T!=null&&T.message&&(D=T.message),c(!1),console.log(D)}finally{}};if(y.useEffect(()=>{if(!e){p();return}return b(),()=>p()},[e]),y.useEffect(()=>()=>{g.current&&(clearInterval(g.current),g.current=null)},[]),!e)return null;const[A,N]=y.useState("face_detected"),_=async()=>{h(!0);const T=()=>{var D;return(D=E.current)==null?void 0:D.setReference()};T(),g.current&&clearInterval(g.current),g.current=setInterval(T,500)},M=[{label:n?"Calibrate your camera":"Camera & Mic permission"},{label:"Basic guidelines"}];return u.jsx("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-gray-900/40 iw-backdrop-blur-sm iw-p-4 iw-overflow-auto",children:u.jsxs("div",{className:"iw-w-full iw-max-w-[700px] iw-bg-white iw-rounded-xl iw-shadow-2xl iw-overflow-auto",children:[u.jsxs("div",{className:"iw-px-5 iw-pt-5",children:[u.jsx("h2",{className:"iw-text-[#062260] iw-text-2xl iw-font-medium iw-tracking-tight",children:"Final checks before you go live"}),u.jsx("div",{className:"iw-mt-4 iw-bg-[#F1F5FE] iw-rounded-xl iw-p-3 iw-border iw-border-[#E7EAF1]",children:u.jsx("p",{className:"iw-text-[#5C6686] iw-text-sm iw-leading-relaxed",children:"To ensure the integrity of the interview process, this platform uses your device’s camera to monitor your face and gaze direction. We do not store any outside this session"})}),u.jsx("div",{className:"iw-mt-6 iw-border-b iw-border-dashed iw-border-[#B3B9CB] iw-w-full"}),u.jsx(zy,{steps:M,currentStepIndex:d})]}),u.jsx("div",{className:"iw-px-5 iw-pb-5 iw-flex iw-flex-col iw-items-center",children:d===0?u.jsxs("div",{className:"iw-w-full iw-flex iw-flex-col iw-items-center iw-gap-6",children:[u.jsx("div",{className:"iw-w-full iw-max-w-[600px] iw-aspect-video iw-bg-slate-100 iw-rounded-2xl iw-overflow-hidden iw-relative iw-border iw-border-slate-200",children:n?u.jsx(w3,{ref:w,interviewId:a,interview_duration:l,showProctoringUI:!1,showStatusOverlay:!0,onProctoringStatusChange:N,onSetReference:()=>{g.current&&(clearInterval(g.current),g.current=null),h(!1),m(1)}}):u.jsx("video",{ref:s,autoPlay:!0,playsInline:!0,muted:!0,className:"iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)"}})}),u.jsx(y3,{micEnabled:o,videoEnabled:o,buttonText:n?f?"Calibrating...":"Start calibrate":"Next",onButtonClick:()=>{n?_():m(1)},disabled:!v||n&&A!=="face_detected"||!n&&!o,isAgreed:v,onAgreedToggle:x})]}):u.jsxs("div",{className:"iw-w-full iw-flex iw-flex-col iw-gap-6",children:[u.jsx("div",{className:"iw-w-full iw-bg-[#F8FAFF] iw-rounded-2xl iw-p-8 iw-flex iw-flex-col iw-gap-5",children:ky.map((T,D)=>u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-4",children:[u.jsx("div",{className:"iw-flex iw-h-7 iw-w-7 iw-min-w-[28px] iw-items-center iw-justify-center iw-rounded-full iw-bg-[#DBEAFE] iw-text-[#062260] iw-text-xs iw-font-bold",children:D+1}),u.jsx("span",{className:"iw-text-[#5C6686] iw-font-medium",children:T})]},D))}),u.jsx(y3,{buttonText:"Start interview",onButtonClick:()=>{t(),p()},isAgreed:v,onAgreedToggle:x,showMediaIcons:!1})]})})]})})};var K=(e=>(e.IDLE="idle",e.FETCHING_QUESTION="fetching_question",e.READING_QUESTION="reading_question",e.THINKING="thinking",e.ANSWERING="answering",e.TRANSCRIBING="transcribing",e.EDITING="editing",e.SUBMITTING="submitting",e.COMPLETED="completed",e))(K||{});const p3={thinkingDuration:0,answeringDuration:120,editingDuration:30},v3={idle:{next:"fetching_question"},fetching_question:{next:"reading_question"},reading_question:{next:"answering"},thinking:{next:"answering",duration:0},answering:{next:"transcribing",duration:120},transcribing:{next:"editing"},editing:{next:"submitting",duration:30},submitting:{next:"completed"},completed:{next:"completed"}};class Uy{constructor(t={},n={}){Qt(this,"config");Qt(this,"state");Qt(this,"phaseIntervalId",null);Qt(this,"globalIntervalId",null);Qt(this,"callbacks");this.config={...p3,...t},this.callbacks=n,this.state={phase:"idle",currentPhaseTimeRemaining:0,totalTimeElapsed:0,currentQuestionNumber:0}}updateConfig(t){this.config={...this.config,...t}}getState(){return{...this.state}}startQuestion(){this.state.currentQuestionNumber===0&&this.startGlobalTimer(),this.state.currentQuestionNumber=this.state.currentQuestionNumber+1,this.state.phase="fetching_question",this.notifyChange()}nextPhase(){const t=this.state.phase;let n=v3[t];if(!n)return;if(n.next==="editing"&&this.config.editingDuration===0){const a=v3.editing;a&&(n=a)}this.stopPhaseTimer(),this.state.phase=n.next;const i=this.getDurationForPhase(n.next);i>0?(this.state.currentPhaseTimeRemaining=i,this.startPhaseTimer()):this.state.currentPhaseTimeRemaining=0,this.notifyChange()}completeInterview(){var t,n;this.stopGlobalTimer(),this.stopPhaseTimer(),this.state.phase="completed",(n=(t=this.callbacks).onInterviewEnd)==null||n.call(t),this.notifyChange()}destroy(){this.stopPhaseTimer(),this.stopGlobalTimer()}getDurationForPhase(t){switch(t){case"thinking":return this.config.thinkingDuration;case"answering":return this.config.answeringDuration;case"editing":return this.config.editingDuration;default:return 0}}startGlobalTimer(){this.globalIntervalId=setInterval(()=>{var t,n;this.state.totalTimeElapsed++,(n=(t=this.callbacks).onTick)==null||n.call(t,this.getState())},1e3)}stopGlobalTimer(){this.globalIntervalId&&(clearInterval(this.globalIntervalId),this.globalIntervalId=null)}startPhaseTimer(){this.phaseIntervalId=setInterval(()=>{this.state.currentPhaseTimeRemaining--,this.state.currentPhaseTimeRemaining<=0&&this.nextPhase()},1e3)}stopPhaseTimer(){this.phaseIntervalId&&(clearInterval(this.phaseIntervalId),this.phaseIntervalId=null)}notifyChange(){var t,n;(n=(t=this.callbacks).onPhaseChange)==null||n.call(t,this.state.phase,this.getState())}}function By(e={}){const{config:t={},callbacks:n={}}=e,i=y.useRef(null);i.current||(i.current=new Uy(t,{}));const a=i.current,[l,s]=y.useState(a.getState()),r=y.useCallback(()=>{s(a.getState())},[a]);y.useEffect(()=>{const h={onPhaseChange:(d,m)=>{var v;r(),(v=n.onPhaseChange)==null||v.call(n,d,m)},onTick:d=>{var m;r(),(m=n.onTick)==null||m.call(n,d)},onInterviewEnd:()=>{var d;r(),(d=n.onInterviewEnd)==null||d.call(n)}};a.callbacks=h},[a,n,r]),y.useEffect(()=>{a.updateConfig(t)},[a,t]),y.useEffect(()=>()=>{a.destroy()},[a]);const o=y.useCallback(()=>{a.startQuestion(),r()},[a,r]),c=y.useCallback(()=>{a.nextPhase(),r()},[a,r]),f=y.useCallback(()=>{a.completeInterview(),r()},[a,r]);return{state:l,startQuestion:o,nextPhase:c,completeInterview:f,timerService:a}}function Ry(e,t={}){const[n,i]=y.useState({data:null,loading:!1,error:null}),a=y.useCallback(async(...l)=>{var s,r,o,c;i(f=>({...f,loading:!0,error:null}));try{const f=await e(...l);i(h=>({...h,data:f,loading:!1,error:null})),(s=t.onSuccess)==null||s.call(t,f),(r=t.onSettled)==null||r.call(t,f,null)}catch(f){const h=f.type?f:{type:"unknown",message:f.message||"Unknown error",retryable:!0,userMessage:"Something went wrong. Please try again.",originalError:f};i(d=>({...d,loading:!1,error:h})),(o=t.onError)==null||o.call(t,h),(c=t.onSettled)==null||c.call(t,null,h)}},[e,t]);return{...n,execute:a}}const Gy=e=>{const[t,n]=y.useState(null),[i,a]=y.useState(!1),l=document,s=()=>!!(l.fullscreenEnabled||l.webkitFullscreenEnabled||l.mozFullScreenEnabled||l.msFullscreenEnabled),r=()=>l.fullscreenElement||l.webkitFullscreenElement||l.mozFullScreenElement||l.msFullscreenElement,o=async m=>{var v;try{if(!s())throw new Error("Fullscreen is not supported in this environment");m.requestFullscreen?await m.requestFullscreen():m.webkitRequestFullscreen?await m.webkitRequestFullscreen():m.mozRequestFullScreen?await m.mozRequestFullScreen():m.msRequestFullscreen&&await m.msRequestFullscreen()}catch(x){const E={name:"FullscreenError",message:x instanceof Error?x.message:"Failed to enter fullscreen"};n(E),(v=e==null?void 0:e.onError)==null||v.call(e,E)}},c=async()=>{var m;try{l.exitFullscreen?await l.exitFullscreen():l.webkitExitFullscreen?await l.webkitExitFullscreen():l.mozCancelFullScreen?await l.mozCancelFullScreen():l.msExitFullscreen&&await l.msExitFullscreen()}catch(v){const x={name:"FullscreenError",message:v instanceof Error?v.message:"Failed to exit fullscreen"};n(x),(m=e==null?void 0:e.onError)==null||m.call(e,x)}},f=y.useCallback(()=>{var v;const m=!!r();a(m),(v=e==null?void 0:e.onFullScreenChange)==null||v.call(e,m)},[e]);y.useEffect(()=>{const m=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];return m.forEach(v=>{document.addEventListener(v,f)}),()=>{m.forEach(v=>{document.removeEventListener(v,f)})}},[f]);const h=async m=>{n(null);const v=m??document.documentElement;await o(v)};return{isFullScreen:i,toggleFullScreen:async m=>{i?await c():await h(m)},enterFullScreen:h,exitFullScreen:c,error:t}};function b3(){const e=Ar();return y.useMemo(()=>{const n=e.api||{};return new f1(n)},[e.api])}const Hy=e=>{y.useEffect(()=>{const t=i=>{(i.ctrlKey||i.metaKey)&&["c","v","a","t","n","w","r","s","p"].includes(i.key.toLowerCase())&&(i.preventDefault(),e({type:"blocked_shortcut",severity:"low",details:{action:"shortcut_pressed",reason:`Attempted to use a blocked keyboard shortcut: Ctrl + ${i.key}`}})),i.key.startsWith("F")&&i.key.length<=3&&(i.preventDefault(),e({type:"blocked_function_key",severity:"low",details:{action:"function_key_pressed",reason:`Attempted to use a blocked function key: ${i.key}`}})),i.altKey&&i.key==="Tab"&&(i.preventDefault(),e({type:"alt_tab_attempt",severity:"medium",details:{action:"alt_tab",reason:"Attempted to use the Alt + Tab shortcut"}}))},n=i=>{i.preventDefault(),e({type:"right_click_attempt",severity:"low",details:{action:"right_click",reason:"Attempted to use the right click"}})};return document.addEventListener("keydown",t),document.addEventListener("contextmenu",n),()=>{document.removeEventListener("keydown",t),document.removeEventListener("contextmenu",n)}},[e])},Vy=(e={})=>{const[t,n]=y.useState(!1),[i,a]=y.useState(!1),[l,s]=y.useState(null),[r,o]=y.useState(null),[c,f]=y.useState(null);e.config&&rl.updateConfig(e.config);const h=y.useCallback(async x=>{var E;try{o(null),s(null),f(null),await rl.startRecording(x,{onStart:()=>{var g;n(!0),(g=e.onStart)==null||g.call(e)},onStop:()=>{var g;n(!1),(g=e.onStop)==null||g.call(e)},onError:g=>{var p;const w=g instanceof be?g:new be(g.message,"RECORDING_ERROR",!0);o(w),n(!1),(p=e.onError)==null||p.call(e,w)}})}catch(g){const w=g instanceof be?g:new be(g instanceof Error?g.message:String(g),"START_FAILED",!1);throw o(w),n(!1),(E=e.onError)==null||E.call(e,w),w}},[]),d=y.useCallback(async()=>{var x,E;try{const g=await rl.stopRecording();return f(g),n(!1),(x=e.onStop)==null||x.call(e),g}catch(g){const w=g instanceof be?g:new be(g instanceof Error?g.message:String(g),"STOP_FAILED",!1);throw o(w),n(!1),(E=e.onError)==null||E.call(e,w),w}},[]),m=y.useCallback(async(x,E={})=>{var g,w;try{o(null),a(!0);const p={audioBlob:x,...E},b=await rl.transcribe(p);return s(b.transcript),a(!1),(g=e.onTranscriptionComplete)==null||g.call(e,b),b}catch(p){const b=p instanceof be?p:new be(p instanceof Error?p.message:String(p),"TRANSCRIPTION_FAILED",!0);throw o(b),a(!1),(w=e.onError)==null||w.call(e,b),b}},[]),v=y.useCallback(()=>{rl.cancelRecording(),n(!1),f(null)},[]);return{startRecording:h,stopRecording:d,transcribe:m,cancelRecording:v,isRecording:t,isTranscribing:i,transcript:l,error:r,audioBlob:c}},qy=e=>{const t=y.useRef(null),n=y.useRef(!1);y.useEffect(()=>{const i=()=>{document.hidden&&(n.current=!0,t.current&&(clearTimeout(t.current),t.current=null),e({type:"tab_switch",severity:"high",details:{action:"tab_hidden",reason:"Attempted to switch tabs or applications"}}),setTimeout(()=>{n.current=!1},100))},a=()=>{n.current||(t.current=setTimeout(()=>{n.current||e({type:"focus_loss",severity:"medium",details:{action:"window_blur",reason:"Focus lost from the interview window"}}),t.current=null},50))};return document.addEventListener("visibilitychange",i),window.addEventListener("blur",a),()=>{document.removeEventListener("visibilitychange",i),window.removeEventListener("blur",a),t.current&&clearTimeout(t.current)}},[e])},Fy=()=>{y.useEffect(()=>{const e=document.createElement("style");return e.textContent=`
15
+ }`,e.VERTEX_SHADER),this.W=j0(this,this.H(),e.FRAGMENT_SHADER),e.linkProgram(this.h),!e.getProgramParameter(this.h,e.LINK_STATUS))throw Error(`Error during program linking: ${e.getProgramInfoLog(this.h)}`);this.O=e.getAttribLocation(this.h,"aVertex"),this.L=e.getAttribLocation(this.h,"aTex")}D(){}l(){}close(){if(this.h){const e=this.g;e.deleteProgram(this.h),e.deleteShader(this.X),e.deleteShader(this.W)}this.B&&this.g.deleteFramebuffer(this.B),this.A&&this.A.close(),this.u&&this.u.close()}};function Fn(e,t){switch(t){case 0:return e.g.find(n=>n instanceof Uint8Array);case 1:return e.g.find(n=>n instanceof Float32Array);case 2:return e.g.find(n=>typeof WebGLTexture<"u"&&n instanceof WebGLTexture);default:throw Error(`Type is not supported: ${t}`)}}function sf(e){var t=Fn(e,1);if(!t){if(t=Fn(e,0))t=new Float32Array(t).map(a=>a/255);else{t=new Float32Array(e.width*e.height);const a=il(e);var n=of(e);if(F0(n,a,X0(e)),"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"document"in self&&"ontouchend"in self.document){n=new Float32Array(e.width*e.height*4),a.readPixels(0,0,e.width,e.height,a.RGBA,a.FLOAT,n);for(let i=0,l=0;i<t.length;++i,l+=4)t[i]=n[l]}else a.readPixels(0,0,e.width,e.height,a.RED,a.FLOAT,t)}e.g.push(t)}return t}function X0(e){let t=Fn(e,2);if(!t){const n=il(e);t=K0(e);const a=sf(e),i=Q0(e);n.texImage2D(n.TEXTURE_2D,0,i,e.width,e.height,0,n.RED,n.FLOAT,a),cf(e)}return t}function il(e){if(!e.canvas)throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");return e.h||(e.h=pa(e.canvas.getContext("webgl2"),"You cannot use a canvas that is already bound to a different type of rendering context.")),e.h}function Q0(e){if(e=il(e),!ro)if(e.getExtension("EXT_color_buffer_float")&&e.getExtension("OES_texture_float_linear")&&e.getExtension("EXT_float_blend"))ro=e.R32F;else{if(!e.getExtension("EXT_color_buffer_half_float"))throw Error("GPU does not fully support 4-channel float32 or float16 formats");ro=e.R16F}return ro}function of(e){return e.l||(e.l=new Y0),e.l}function K0(e){const t=il(e);t.viewport(0,0,e.width,e.height),t.activeTexture(t.TEXTURE0);let n=Fn(e,2);return n||(n=q0(of(e),t,e.m?t.LINEAR:t.NEAREST),e.g.push(n),e.j=!0),t.bindTexture(t.TEXTURE_2D,n),n}function cf(e){e.h.bindTexture(e.h.TEXTURE_2D,null)}var ro,Ze=class{constructor(e,t,n,a,i,l,r){this.g=e,this.m=t,this.j=n,this.canvas=a,this.l=i,this.width=l,this.height=r,this.j&&--Z0===0&&console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources.")}Fa(){return!!Fn(this,0)}ka(){return!!Fn(this,1)}R(){return!!Fn(this,2)}ja(){return(t=Fn(e=this,0))||(t=sf(e),t=new Uint8Array(t.map(n=>Math.round(255*n))),e.g.push(t)),t;var e,t}ia(){return sf(this)}N(){return X0(this)}clone(){const e=[];for(const t of this.g){let n;if(t instanceof Uint8Array)n=new Uint8Array(t);else if(t instanceof Float32Array)n=new Float32Array(t);else{if(!(t instanceof WebGLTexture))throw Error(`Type is not supported: ${t}`);{const a=il(this),i=of(this);a.activeTexture(a.TEXTURE1),n=q0(i,a,this.m?a.LINEAR:a.NEAREST),a.bindTexture(a.TEXTURE_2D,n);const l=Q0(this);a.texImage2D(a.TEXTURE_2D,0,l,this.width,this.height,0,a.RED,a.FLOAT,null),a.bindTexture(a.TEXTURE_2D,null),F0(i,a,n),oy(i,a,!1,()=>{K0(this),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.drawArrays(a.TRIANGLE_FAN,0,4),cf(this)}),cy(i),cf(this)}}e.push(n)}return new Ze(e,this.m,this.R(),this.canvas,this.l,this.width,this.height)}close(){this.j&&il(this).deleteTexture(Fn(this,2)),Z0=-1}};Ze.prototype.close=Ze.prototype.close,Ze.prototype.clone=Ze.prototype.clone,Ze.prototype.getAsWebGLTexture=Ze.prototype.N,Ze.prototype.getAsFloat32Array=Ze.prototype.ia,Ze.prototype.getAsUint8Array=Ze.prototype.ja,Ze.prototype.hasWebGLTexture=Ze.prototype.R,Ze.prototype.hasFloat32Array=Ze.prototype.ka,Ze.prototype.hasUint8Array=Ze.prototype.Fa;var Z0=250;function gn(...e){return e.map(([t,n])=>({start:t,end:n}))}const uy=function(e){return class extends e{Ja(){this.i._registerModelResourcesGraphService()}}}((I0=class{constructor(e,t){this.l=!0,this.i=e,this.g=null,this.h=0,this.m=typeof this.i._addIntToInputStream=="function",t!==void 0?this.i.canvas=t:k0()?this.i.canvas=new OffscreenCanvas(1,1):(console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."),this.i.canvas=document.createElement("canvas"))}async initializeGraph(e){const t=await(await fetch(e)).arrayBuffer();e=!(e.endsWith(".pbtxt")||e.endsWith(".textproto")),this.setGraph(new Uint8Array(t),e)}setGraphFromString(e){this.setGraph(new TextEncoder().encode(e),!1)}setGraph(e,t){const n=e.length,a=this.i._malloc(n);this.i.HEAPU8.set(e,a),t?this.i._changeBinaryGraph(n,a):this.i._changeTextGraph(n,a),this.i._free(a)}configureAudio(e,t,n,a,i){this.i._configureAudio||console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'),L(this,a||"input_audio",l=>{L(this,i=i||"audio_header",r=>{this.i._configureAudio(l,r,e,t??0,n)})})}setAutoResizeCanvas(e){this.l=e}setAutoRenderToScreen(e){this.i._setAutoRenderToScreen(e)}setGpuBufferVerticalFlip(e){this.i.gpuOriginForWebTexturesIsBottomLeft=e}ca(e){Mn(this,"__graph_config__",t=>{e(t)}),L(this,"__graph_config__",t=>{this.i._getGraphConfig(t,void 0)}),delete this.i.simpleListeners.__graph_config__}attachErrorListener(e){this.i.errorListener=e}attachEmptyPacketListener(e,t){this.i.emptyPacketListeners=this.i.emptyPacketListeners||{},this.i.emptyPacketListeners[e]=t}addAudioToStream(e,t,n){this.addAudioToStreamWithShape(e,0,0,t,n)}addAudioToStreamWithShape(e,t,n,a,i){const l=4*e.length;this.h!==l&&(this.g&&this.i._free(this.g),this.g=this.i._malloc(l),this.h=l),this.i.HEAPF32.set(e,this.g/4),L(this,a,r=>{this.i._addAudioToInputStream(this.g,t,n,r,i)})}addGpuBufferToStream(e,t,n){L(this,t,a=>{const[i,l]=B0(this,e,a);this.i._addBoundTextureToStream(a,i,l,n)})}addBoolToStream(e,t,n){L(this,t,a=>{this.i._addBoolToInputStream(e,a,n)})}addDoubleToStream(e,t,n){L(this,t,a=>{this.i._addDoubleToInputStream(e,a,n)})}addFloatToStream(e,t,n){L(this,t,a=>{this.i._addFloatToInputStream(e,a,n)})}addIntToStream(e,t,n){L(this,t,a=>{this.i._addIntToInputStream(e,a,n)})}addUintToStream(e,t,n){L(this,t,a=>{this.i._addUintToInputStream(e,a,n)})}addStringToStream(e,t,n){L(this,t,a=>{L(this,e,i=>{this.i._addStringToInputStream(i,a,n)})})}addStringRecordToStream(e,t,n){L(this,t,a=>{G0(this,Object.keys(e),i=>{G0(this,Object.values(e),l=>{this.i._addFlatHashMapToInputStream(i,l,Object.keys(e).length,a,n)})})})}addProtoToStream(e,t,n,a){L(this,n,i=>{L(this,t,l=>{const r=this.i._malloc(e.length);this.i.HEAPU8.set(e,r),this.i._addProtoToInputStream(r,e.length,l,i,a),this.i._free(r)})})}addEmptyPacketToStream(e,t){L(this,e,n=>{this.i._addEmptyPacketToInputStream(n,t)})}addBoolVectorToStream(e,t,n){L(this,t,a=>{const i=this.i._allocateBoolVector(e.length);if(!i)throw Error("Unable to allocate new bool vector on heap.");for(const l of e)this.i._addBoolVectorEntry(i,l);this.i._addBoolVectorToInputStream(i,a,n)})}addDoubleVectorToStream(e,t,n){L(this,t,a=>{const i=this.i._allocateDoubleVector(e.length);if(!i)throw Error("Unable to allocate new double vector on heap.");for(const l of e)this.i._addDoubleVectorEntry(i,l);this.i._addDoubleVectorToInputStream(i,a,n)})}addFloatVectorToStream(e,t,n){L(this,t,a=>{const i=this.i._allocateFloatVector(e.length);if(!i)throw Error("Unable to allocate new float vector on heap.");for(const l of e)this.i._addFloatVectorEntry(i,l);this.i._addFloatVectorToInputStream(i,a,n)})}addIntVectorToStream(e,t,n){L(this,t,a=>{const i=this.i._allocateIntVector(e.length);if(!i)throw Error("Unable to allocate new int vector on heap.");for(const l of e)this.i._addIntVectorEntry(i,l);this.i._addIntVectorToInputStream(i,a,n)})}addUintVectorToStream(e,t,n){L(this,t,a=>{const i=this.i._allocateUintVector(e.length);if(!i)throw Error("Unable to allocate new unsigned int vector on heap.");for(const l of e)this.i._addUintVectorEntry(i,l);this.i._addUintVectorToInputStream(i,a,n)})}addStringVectorToStream(e,t,n){L(this,t,a=>{const i=this.i._allocateStringVector(e.length);if(!i)throw Error("Unable to allocate new string vector on heap.");for(const l of e)L(this,l,r=>{this.i._addStringVectorEntry(i,r)});this.i._addStringVectorToInputStream(i,a,n)})}addBoolToInputSidePacket(e,t){L(this,t,n=>{this.i._addBoolToInputSidePacket(e,n)})}addDoubleToInputSidePacket(e,t){L(this,t,n=>{this.i._addDoubleToInputSidePacket(e,n)})}addFloatToInputSidePacket(e,t){L(this,t,n=>{this.i._addFloatToInputSidePacket(e,n)})}addIntToInputSidePacket(e,t){L(this,t,n=>{this.i._addIntToInputSidePacket(e,n)})}addUintToInputSidePacket(e,t){L(this,t,n=>{this.i._addUintToInputSidePacket(e,n)})}addStringToInputSidePacket(e,t){L(this,t,n=>{L(this,e,a=>{this.i._addStringToInputSidePacket(a,n)})})}addProtoToInputSidePacket(e,t,n){L(this,n,a=>{L(this,t,i=>{const l=this.i._malloc(e.length);this.i.HEAPU8.set(e,l),this.i._addProtoToInputSidePacket(l,e.length,i,a),this.i._free(l)})})}addBoolVectorToInputSidePacket(e,t){L(this,t,n=>{const a=this.i._allocateBoolVector(e.length);if(!a)throw Error("Unable to allocate new bool vector on heap.");for(const i of e)this.i._addBoolVectorEntry(a,i);this.i._addBoolVectorToInputSidePacket(a,n)})}addDoubleVectorToInputSidePacket(e,t){L(this,t,n=>{const a=this.i._allocateDoubleVector(e.length);if(!a)throw Error("Unable to allocate new double vector on heap.");for(const i of e)this.i._addDoubleVectorEntry(a,i);this.i._addDoubleVectorToInputSidePacket(a,n)})}addFloatVectorToInputSidePacket(e,t){L(this,t,n=>{const a=this.i._allocateFloatVector(e.length);if(!a)throw Error("Unable to allocate new float vector on heap.");for(const i of e)this.i._addFloatVectorEntry(a,i);this.i._addFloatVectorToInputSidePacket(a,n)})}addIntVectorToInputSidePacket(e,t){L(this,t,n=>{const a=this.i._allocateIntVector(e.length);if(!a)throw Error("Unable to allocate new int vector on heap.");for(const i of e)this.i._addIntVectorEntry(a,i);this.i._addIntVectorToInputSidePacket(a,n)})}addUintVectorToInputSidePacket(e,t){L(this,t,n=>{const a=this.i._allocateUintVector(e.length);if(!a)throw Error("Unable to allocate new unsigned int vector on heap.");for(const i of e)this.i._addUintVectorEntry(a,i);this.i._addUintVectorToInputSidePacket(a,n)})}addStringVectorToInputSidePacket(e,t){L(this,t,n=>{const a=this.i._allocateStringVector(e.length);if(!a)throw Error("Unable to allocate new string vector on heap.");for(const i of e)L(this,i,l=>{this.i._addStringVectorEntry(a,l)});this.i._addStringVectorToInputSidePacket(a,n)})}attachBoolListener(e,t){Mn(this,e,t),L(this,e,n=>{this.i._attachBoolListener(n)})}attachBoolVectorListener(e,t){ya(this,e,t),L(this,e,n=>{this.i._attachBoolVectorListener(n)})}attachIntListener(e,t){Mn(this,e,t),L(this,e,n=>{this.i._attachIntListener(n)})}attachIntVectorListener(e,t){ya(this,e,t),L(this,e,n=>{this.i._attachIntVectorListener(n)})}attachUintListener(e,t){Mn(this,e,t),L(this,e,n=>{this.i._attachUintListener(n)})}attachUintVectorListener(e,t){ya(this,e,t),L(this,e,n=>{this.i._attachUintVectorListener(n)})}attachDoubleListener(e,t){Mn(this,e,t),L(this,e,n=>{this.i._attachDoubleListener(n)})}attachDoubleVectorListener(e,t){ya(this,e,t),L(this,e,n=>{this.i._attachDoubleVectorListener(n)})}attachFloatListener(e,t){Mn(this,e,t),L(this,e,n=>{this.i._attachFloatListener(n)})}attachFloatVectorListener(e,t){ya(this,e,t),L(this,e,n=>{this.i._attachFloatVectorListener(n)})}attachStringListener(e,t){Mn(this,e,t),L(this,e,n=>{this.i._attachStringListener(n)})}attachStringVectorListener(e,t){ya(this,e,t),L(this,e,n=>{this.i._attachStringVectorListener(n)})}attachProtoListener(e,t,n){Mn(this,e,t),L(this,e,a=>{this.i._attachProtoListener(a,n||!1)})}attachProtoVectorListener(e,t,n){ya(this,e,t),L(this,e,a=>{this.i._attachProtoVectorListener(a,n||!1)})}attachAudioListener(e,t,n){this.i._attachAudioListener||console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'),Mn(this,e,(a,i)=>{a=new Float32Array(a.buffer,a.byteOffset,a.length/4),t(a,i)}),L(this,e,a=>{this.i._attachAudioListener(a,n||!1)})}finishProcessing(){this.i._waitUntilIdle()}closeGraph(){this.i._closeGraph(),this.i.simpleListeners=void 0,this.i.emptyPacketListeners=void 0}},class extends I0{get ga(){return this.i}pa(e,t,n){L(this,t,a=>{const[i,l]=B0(this,e,a);this.ga._addBoundTextureAsImageToStream(a,i,l,n)})}Z(e,t){Mn(this,e,t),L(this,e,n=>{this.ga._attachImageListener(n)})}aa(e,t){ya(this,e,t),L(this,e,n=>{this.ga._attachImageVectorListener(n)})}}));var I0,wn=class extends uy{};async function Z(e,t,n){return async function(a,i,l,r){return ry(a,i,l,r)}(e,n.canvas??(k0()?void 0:document.createElement("canvas")),t,n)}function J0(e,t,n,a){if(e.U){const l=new e0;if(n!=null&&n.regionOfInterest){if(!e.oa)throw Error("This task doesn't support region-of-interest.");var i=n.regionOfInterest;if(i.left>=i.right||i.top>=i.bottom)throw Error("Expected RectF with left < right and top < bottom.");if(i.left<0||i.top<0||i.right>1||i.bottom>1)throw Error("Expected RectF values to be in [0,1].");U(l,1,(i.left+i.right)/2),U(l,2,(i.top+i.bottom)/2),U(l,4,i.right-i.left),U(l,3,i.bottom-i.top)}else U(l,1,.5),U(l,2,.5),U(l,4,1),U(l,3,1);if(n!=null&&n.rotationDegrees){if((n==null?void 0:n.rotationDegrees)%90!=0)throw Error("Expected rotation to be a multiple of 90°.");if(U(l,5,-Math.PI*n.rotationDegrees/180),(n==null?void 0:n.rotationDegrees)%180!=0){const[r,s]=U0(t);n=Ae(l,3)*s/r,i=Ae(l,4)*r/s,U(l,4,n),U(l,3,i)}}e.g.addProtoToStream(l.g(),"mediapipe.NormalizedRect",e.U,a)}e.g.pa(t,e.X,a??performance.now()),e.finishProcessing()}function mn(e,t,n){var a;if((a=e.baseOptions)!=null&&a.g())throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");J0(e,t,n,e.C+1)}function Cn(e,t,n,a){var i;if(!((i=e.baseOptions)!=null&&i.g()))throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");J0(e,t,n,a)}function ll(e,t,n,a){var i=t.data;const l=t.width,r=l*(t=t.height);if((i instanceof Uint8Array||i instanceof Float32Array)&&i.length!==r)throw Error("Unsupported channel count: "+i.length/r);return e=new Ze([i],n,!1,e.g.i.canvas,e.P,l,t),a?e.clone():e}var Dt=class extends lf{constructor(e,t,n,a){super(e),this.g=e,this.X=t,this.U=n,this.oa=a,this.P=new Y0}l(e,t=!0){if("runningMode"in e&&ne(this.baseOptions,2,ur(!!e.runningMode&&e.runningMode!=="IMAGE")),e.canvas!==void 0&&this.g.i.canvas!==e.canvas)throw Error("You must create a new task to reset the canvas.");return super.l(e,t)}close(){this.P.close(),super.close()}};Dt.prototype.close=Dt.prototype.close;var Wt=class extends Dt{constructor(e,t){super(new wn(e,t),"image_in","norm_rect_in",!1),this.j={detections:[]},B(e=this.h=new to,0,1,t=new ve),U(this.h,2,.5),U(this.h,3,.3)}get baseOptions(){return J(this.h,ve,1)}set baseOptions(e){B(this.h,0,1,e)}o(e){return"minDetectionConfidence"in e&&U(this.h,2,e.minDetectionConfidence??.5),"minSuppressionThreshold"in e&&U(this.h,3,e.minSuppressionThreshold??.3),this.l(e)}F(e,t){return this.j={detections:[]},mn(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},Cn(this,e,n,t),this.j}m(){var e=new Ct;ye(e,"image_in"),ye(e,"norm_rect_in"),W(e,"detections");const t=new Mt;Tn(t,Q5,this.h);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.face_detector.FaceDetectorGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect_in"),K(n,"DETECTIONS:detections"),n.o(t),Jt(e,n),this.g.attachProtoVectorListener("detections",(a,i)=>{for(const l of a)a=Rh(l),this.j.detections.push(C0(a));D(this,i)}),this.g.attachEmptyPacketListener("detections",a=>{D(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Wt.prototype.detectForVideo=Wt.prototype.G,Wt.prototype.detect=Wt.prototype.F,Wt.prototype.setOptions=Wt.prototype.o,Wt.createFromModelPath=async function(e,t){return Z(Wt,e,{baseOptions:{modelAssetPath:t}})},Wt.createFromModelBuffer=function(e,t){return Z(Wt,e,{baseOptions:{modelAssetBuffer:t}})},Wt.createFromOptions=function(e,t){return Z(Wt,e,t)};var uf=gn([61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]),ff=gn([263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362]),df=gn([276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]),W0=gn([474,475],[475,476],[476,477],[477,474]),hf=gn([33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]),gf=gn([46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]),R0=gn([469,470],[470,471],[471,472],[472,469]),wf=gn([10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]),P0=[...uf,...ff,...df,...hf,...gf,...wf],$0=gn([127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]);function e3(e){e.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]}}var pe=class extends Dt{constructor(e,t){super(new wn(e,t),"image_in","norm_rect",!1),this.j={faceLandmarks:[],faceBlendshapes:[],facialTransformationMatrixes:[]},this.outputFacialTransformationMatrixes=this.outputFaceBlendshapes=!1,B(e=this.h=new o0,0,1,t=new ve),this.A=new s0,B(this.h,0,3,this.A),this.u=new to,B(this.h,0,2,this.u),Vn(this.u,4,1),U(this.u,2,.5),U(this.A,2,.5),U(this.h,4,.5)}get baseOptions(){return J(this.h,ve,1)}set baseOptions(e){B(this.h,0,1,e)}o(e){return"numFaces"in e&&Vn(this.u,4,e.numFaces??1),"minFaceDetectionConfidence"in e&&U(this.u,2,e.minFaceDetectionConfidence??.5),"minTrackingConfidence"in e&&U(this.h,4,e.minTrackingConfidence??.5),"minFacePresenceConfidence"in e&&U(this.A,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"outputFacialTransformationMatrixes"in e&&(this.outputFacialTransformationMatrixes=!!e.outputFacialTransformationMatrixes),this.l(e)}F(e,t){return e3(this),mn(this,e,t),this.j}G(e,t,n){return e3(this),Cn(this,e,n,t),this.j}m(){var e=new Ct;ye(e,"image_in"),ye(e,"norm_rect"),W(e,"face_landmarks");const t=new Mt;Tn(t,Z5,this.h);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),K(n,"NORM_LANDMARKS:face_landmarks"),n.o(t),Jt(e,n),this.g.attachProtoVectorListener("face_landmarks",(a,i)=>{for(const l of a)a=pr(l),this.j.faceLandmarks.push(no(a));D(this,i)}),this.g.attachEmptyPacketListener("face_landmarks",a=>{D(this,a)}),this.outputFaceBlendshapes&&(W(e,"blendshapes"),K(n,"BLENDSHAPES:blendshapes"),this.g.attachProtoVectorListener("blendshapes",(a,i)=>{if(this.outputFaceBlendshapes)for(const l of a)a=Ps(l),this.j.faceBlendshapes.push(nf(a.g()??[]));D(this,i)}),this.g.attachEmptyPacketListener("blendshapes",a=>{D(this,a)})),this.outputFacialTransformationMatrixes&&(W(e,"face_geometry"),K(n,"FACE_GEOMETRY:face_geometry"),this.g.attachProtoVectorListener("face_geometry",(a,i)=>{if(this.outputFacialTransformationMatrixes)for(const l of a)(a=J(a=K5(l),G5,2))&&this.j.facialTransformationMatrixes.push({rows:Zt(a,1)??0??0,columns:Zt(a,2)??0??0,data:ti(a,3,xn,ei()).slice()??[]});D(this,i)}),this.g.attachEmptyPacketListener("face_geometry",a=>{D(this,a)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};pe.prototype.detectForVideo=pe.prototype.G,pe.prototype.detect=pe.prototype.F,pe.prototype.setOptions=pe.prototype.o,pe.createFromModelPath=function(e,t){return Z(pe,e,{baseOptions:{modelAssetPath:t}})},pe.createFromModelBuffer=function(e,t){return Z(pe,e,{baseOptions:{modelAssetBuffer:t}})},pe.createFromOptions=function(e,t){return Z(pe,e,t)},pe.FACE_LANDMARKS_LIPS=uf,pe.FACE_LANDMARKS_LEFT_EYE=ff,pe.FACE_LANDMARKS_LEFT_EYEBROW=df,pe.FACE_LANDMARKS_LEFT_IRIS=W0,pe.FACE_LANDMARKS_RIGHT_EYE=hf,pe.FACE_LANDMARKS_RIGHT_EYEBROW=gf,pe.FACE_LANDMARKS_RIGHT_IRIS=R0,pe.FACE_LANDMARKS_FACE_OVAL=wf,pe.FACE_LANDMARKS_CONTOURS=P0,pe.FACE_LANDMARKS_TESSELATION=$0;var mf=gn([0,1],[1,2],[2,3],[3,4],[0,5],[5,6],[6,7],[7,8],[5,9],[9,10],[10,11],[11,12],[9,13],[13,14],[14,15],[15,16],[13,17],[0,17],[17,18],[18,19],[19,20]);function t3(e){e.gestures=[],e.landmarks=[],e.worldLandmarks=[],e.handedness=[]}function n3(e){return e.gestures.length===0?{gestures:[],landmarks:[],worldLandmarks:[],handedness:[],handednesses:[]}:{gestures:e.gestures,landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handedness:e.handedness,handednesses:e.handedness}}function a3(e,t=!0){const n=[];for(const i of e){var a=Ps(i);e=[];for(const l of a.g())a=t&&Zt(l,1)!=null?Zt(l,1)??0:-1,e.push({score:Ae(l,2)??0,index:a,categoryName:Pe(de(l,3))??""??"",displayName:Pe(de(l,4))??""??""});n.push(e)}return n}var Ot=class extends Dt{constructor(e,t){super(new wn(e,t),"image_in","norm_rect",!1),this.gestures=[],this.landmarks=[],this.worldLandmarks=[],this.handedness=[],B(e=this.j=new f0,0,1,t=new ve),this.u=new Iu,B(this.j,0,2,this.u),this.D=new Zu,B(this.u,0,3,this.D),this.A=new u0,B(this.u,0,2,this.A),this.h=new I5,B(this.j,0,3,this.h),U(this.A,2,.5),U(this.u,4,.5),U(this.D,2,.5)}get baseOptions(){return J(this.j,ve,1)}set baseOptions(e){B(this.j,0,1,e)}o(e){var i,l,r,s;if(Vn(this.A,3,e.numHands??1),"minHandDetectionConfidence"in e&&U(this.A,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&U(this.u,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&U(this.D,2,e.minHandPresenceConfidence??.5),e.cannedGesturesClassifierOptions){var t=new nl,n=t,a=tf(e.cannedGesturesClassifierOptions,(i=J(this.h,nl,3))==null?void 0:i.l());B(n,0,2,a),B(this.h,0,3,t)}else e.cannedGesturesClassifierOptions===void 0&&((l=J(this.h,nl,3))==null||l.g());return e.customGesturesClassifierOptions?(B(n=t=new nl,0,2,a=tf(e.customGesturesClassifierOptions,(r=J(this.h,nl,4))==null?void 0:r.l())),B(this.h,0,4,t)):e.customGesturesClassifierOptions===void 0&&((s=J(this.h,nl,4))==null||s.g()),this.l(e)}Ha(e,t){return t3(this),mn(this,e,t),n3(this)}Ia(e,t,n){return t3(this),Cn(this,e,n,t),n3(this)}m(){var e=new Ct;ye(e,"image_in"),ye(e,"norm_rect"),W(e,"hand_gestures"),W(e,"hand_landmarks"),W(e,"world_hand_landmarks"),W(e,"handedness");const t=new Mt;Tn(t,J5,this.j);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),K(n,"HAND_GESTURES:hand_gestures"),K(n,"LANDMARKS:hand_landmarks"),K(n,"WORLD_LANDMARKS:world_hand_landmarks"),K(n,"HANDEDNESS:handedness"),n.o(t),Jt(e,n),this.g.attachProtoVectorListener("hand_landmarks",(a,i)=>{for(const l of a){a=pr(l);const r=[];for(const s of jn(a,$h,1))r.push({x:Ae(s,1)??0,y:Ae(s,2)??0,z:Ae(s,3)??0,visibility:Ae(s,4)??0});this.landmarks.push(r)}D(this,i)}),this.g.attachEmptyPacketListener("hand_landmarks",a=>{D(this,a)}),this.g.attachProtoVectorListener("world_hand_landmarks",(a,i)=>{for(const l of a){a=tl(l);const r=[];for(const s of jn(a,Ph,1))r.push({x:Ae(s,1)??0,y:Ae(s,2)??0,z:Ae(s,3)??0,visibility:Ae(s,4)??0});this.worldLandmarks.push(r)}D(this,i)}),this.g.attachEmptyPacketListener("world_hand_landmarks",a=>{D(this,a)}),this.g.attachProtoVectorListener("hand_gestures",(a,i)=>{this.gestures.push(...a3(a,!1)),D(this,i)}),this.g.attachEmptyPacketListener("hand_gestures",a=>{D(this,a)}),this.g.attachProtoVectorListener("handedness",(a,i)=>{this.handedness.push(...a3(a)),D(this,i)}),this.g.attachEmptyPacketListener("handedness",a=>{D(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};function i3(e){return{landmarks:e.landmarks,worldLandmarks:e.worldLandmarks,handednesses:e.handedness,handedness:e.handedness}}Ot.prototype.recognizeForVideo=Ot.prototype.Ia,Ot.prototype.recognize=Ot.prototype.Ha,Ot.prototype.setOptions=Ot.prototype.o,Ot.createFromModelPath=function(e,t){return Z(Ot,e,{baseOptions:{modelAssetPath:t}})},Ot.createFromModelBuffer=function(e,t){return Z(Ot,e,{baseOptions:{modelAssetBuffer:t}})},Ot.createFromOptions=function(e,t){return Z(Ot,e,t)},Ot.HAND_CONNECTIONS=mf;var zt=class extends Dt{constructor(e,t){super(new wn(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.handedness=[],B(e=this.h=new Iu,0,1,t=new ve),this.u=new Zu,B(this.h,0,3,this.u),this.j=new u0,B(this.h,0,2,this.j),Vn(this.j,3,1),U(this.j,2,.5),U(this.u,2,.5),U(this.h,4,.5)}get baseOptions(){return J(this.h,ve,1)}set baseOptions(e){B(this.h,0,1,e)}o(e){return"numHands"in e&&Vn(this.j,3,e.numHands??1),"minHandDetectionConfidence"in e&&U(this.j,2,e.minHandDetectionConfidence??.5),"minTrackingConfidence"in e&&U(this.h,4,e.minTrackingConfidence??.5),"minHandPresenceConfidence"in e&&U(this.u,2,e.minHandPresenceConfidence??.5),this.l(e)}F(e,t){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],mn(this,e,t),i3(this)}G(e,t,n){return this.landmarks=[],this.worldLandmarks=[],this.handedness=[],Cn(this,e,n,t),i3(this)}m(){var e=new Ct;ye(e,"image_in"),ye(e,"norm_rect"),W(e,"hand_landmarks"),W(e,"world_hand_landmarks"),W(e,"handedness");const t=new Mt;Tn(t,W5,this.h);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),K(n,"LANDMARKS:hand_landmarks"),K(n,"WORLD_LANDMARKS:world_hand_landmarks"),K(n,"HANDEDNESS:handedness"),n.o(t),Jt(e,n),this.g.attachProtoVectorListener("hand_landmarks",(a,i)=>{for(const l of a)a=pr(l),this.landmarks.push(no(a));D(this,i)}),this.g.attachEmptyPacketListener("hand_landmarks",a=>{D(this,a)}),this.g.attachProtoVectorListener("world_hand_landmarks",(a,i)=>{for(const l of a)a=tl(l),this.worldLandmarks.push(vr(a));D(this,i)}),this.g.attachEmptyPacketListener("world_hand_landmarks",a=>{D(this,a)}),this.g.attachProtoVectorListener("handedness",(a,i)=>{var l=this.handedness,r=l.push;const s=[];for(const c of a){a=Ps(c);const u=[];for(const f of a.g())u.push({score:Ae(f,2)??0,index:Zt(f,1)??0??-1,categoryName:Pe(de(f,3))??""??"",displayName:Pe(de(f,4))??""??""});s.push(u)}r.call(l,...s),D(this,i)}),this.g.attachEmptyPacketListener("handedness",a=>{D(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};zt.prototype.detectForVideo=zt.prototype.G,zt.prototype.detect=zt.prototype.F,zt.prototype.setOptions=zt.prototype.o,zt.createFromModelPath=function(e,t){return Z(zt,e,{baseOptions:{modelAssetPath:t}})},zt.createFromModelBuffer=function(e,t){return Z(zt,e,{baseOptions:{modelAssetBuffer:t}})},zt.createFromOptions=function(e,t){return Z(zt,e,t)},zt.HAND_CONNECTIONS=mf;var l3=gn([0,1],[1,2],[2,3],[3,7],[0,4],[4,5],[5,6],[6,8],[9,10],[11,12],[11,13],[13,15],[15,17],[15,19],[15,21],[17,19],[12,14],[14,16],[16,18],[16,20],[16,22],[18,20],[11,23],[12,24],[23,24],[23,25],[24,26],[25,27],[26,28],[27,29],[28,30],[29,31],[30,32],[27,31],[28,32]);function r3(e){e.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]}}function s3(e){try{if(!e.D)return e.h;e.D(e.h)}finally{lo(e)}}function so(e,t){e=pr(e),t.push(no(e))}var ge=class extends Dt{constructor(e,t){super(new wn(e,t),"input_frames_image",null,!1),this.h={faceLandmarks:[],faceBlendshapes:[],poseLandmarks:[],poseWorldLandmarks:[],poseSegmentationMasks:[],leftHandLandmarks:[],leftHandWorldLandmarks:[],rightHandLandmarks:[],rightHandWorldLandmarks:[]},this.outputPoseSegmentationMasks=this.outputFaceBlendshapes=!1,B(e=this.j=new y0,0,1,t=new ve),this.I=new Zu,B(this.j,0,2,this.I),this.W=new R5,B(this.j,0,3,this.W),this.u=new to,B(this.j,0,4,this.u),this.O=new s0,B(this.j,0,5,this.O),this.A=new w0,B(this.j,0,6,this.A),this.M=new m0,B(this.j,0,7,this.M),U(this.u,2,.5),U(this.u,3,.3),U(this.O,2,.5),U(this.A,2,.5),U(this.A,3,.3),U(this.M,2,.5),U(this.I,2,.5)}get baseOptions(){return J(this.j,ve,1)}set baseOptions(e){B(this.j,0,1,e)}o(e){return"minFaceDetectionConfidence"in e&&U(this.u,2,e.minFaceDetectionConfidence??.5),"minFaceSuppressionThreshold"in e&&U(this.u,3,e.minFaceSuppressionThreshold??.3),"minFacePresenceConfidence"in e&&U(this.O,2,e.minFacePresenceConfidence??.5),"outputFaceBlendshapes"in e&&(this.outputFaceBlendshapes=!!e.outputFaceBlendshapes),"minPoseDetectionConfidence"in e&&U(this.A,2,e.minPoseDetectionConfidence??.5),"minPoseSuppressionThreshold"in e&&U(this.A,3,e.minPoseSuppressionThreshold??.3),"minPosePresenceConfidence"in e&&U(this.M,2,e.minPosePresenceConfidence??.5),"outputPoseSegmentationMasks"in e&&(this.outputPoseSegmentationMasks=!!e.outputPoseSegmentationMasks),"minHandLandmarksConfidence"in e&&U(this.I,2,e.minHandLandmarksConfidence??.5),this.l(e)}F(e,t,n){const a=typeof t!="function"?t:{};return this.D=typeof t=="function"?t:n,r3(this),mn(this,e,a),s3(this)}G(e,t,n,a){const i=typeof n!="function"?n:{};return this.D=typeof n=="function"?n:a,r3(this),Cn(this,e,i,t),s3(this)}m(){var e=new Ct;ye(e,"input_frames_image"),W(e,"pose_landmarks"),W(e,"pose_world_landmarks"),W(e,"face_landmarks"),W(e,"left_hand_landmarks"),W(e,"left_hand_world_landmarks"),W(e,"right_hand_landmarks"),W(e,"right_hand_world_landmarks");const t=new Mt,n=new Lh;Tt(n,1,"type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"),function(i,l){if(l!=null)if(Array.isArray(l))ne(i,2,Us(l,0,hr));else{if(!(typeof l=="string"||l instanceof En||$c(l)))throw Error("invalid value in Any.value field: "+l+" expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");da(i,2,au(l,!1),Ia())}}(n,this.j.g());const a=new dt;Tt(a,2,"mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"),xu(a,8,Lh,n),he(a,"IMAGE:input_frames_image"),K(a,"POSE_LANDMARKS:pose_landmarks"),K(a,"POSE_WORLD_LANDMARKS:pose_world_landmarks"),K(a,"FACE_LANDMARKS:face_landmarks"),K(a,"LEFT_HAND_LANDMARKS:left_hand_landmarks"),K(a,"LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"),K(a,"RIGHT_HAND_LANDMARKS:right_hand_landmarks"),K(a,"RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"),a.o(t),Jt(e,a),io(this,e),this.g.attachProtoListener("pose_landmarks",(i,l)=>{so(i,this.h.poseLandmarks),D(this,l)}),this.g.attachEmptyPacketListener("pose_landmarks",i=>{D(this,i)}),this.g.attachProtoListener("pose_world_landmarks",(i,l)=>{var r=this.h.poseWorldLandmarks;i=tl(i),r.push(vr(i)),D(this,l)}),this.g.attachEmptyPacketListener("pose_world_landmarks",i=>{D(this,i)}),this.outputPoseSegmentationMasks&&(K(a,"POSE_SEGMENTATION_MASK:pose_segmentation_mask"),al(this,"pose_segmentation_mask"),this.g.Z("pose_segmentation_mask",(i,l)=>{this.h.poseSegmentationMasks=[ll(this,i,!0,!this.D)],D(this,l)}),this.g.attachEmptyPacketListener("pose_segmentation_mask",i=>{this.h.poseSegmentationMasks=[],D(this,i)})),this.g.attachProtoListener("face_landmarks",(i,l)=>{so(i,this.h.faceLandmarks),D(this,l)}),this.g.attachEmptyPacketListener("face_landmarks",i=>{D(this,i)}),this.outputFaceBlendshapes&&(W(e,"extra_blendshapes"),K(a,"FACE_BLENDSHAPES:extra_blendshapes"),this.g.attachProtoListener("extra_blendshapes",(i,l)=>{var r=this.h.faceBlendshapes;this.outputFaceBlendshapes&&(i=Ps(i),r.push(nf(i.g()??[]))),D(this,l)}),this.g.attachEmptyPacketListener("extra_blendshapes",i=>{D(this,i)})),this.g.attachProtoListener("left_hand_landmarks",(i,l)=>{so(i,this.h.leftHandLandmarks),D(this,l)}),this.g.attachEmptyPacketListener("left_hand_landmarks",i=>{D(this,i)}),this.g.attachProtoListener("left_hand_world_landmarks",(i,l)=>{var r=this.h.leftHandWorldLandmarks;i=tl(i),r.push(vr(i)),D(this,l)}),this.g.attachEmptyPacketListener("left_hand_world_landmarks",i=>{D(this,i)}),this.g.attachProtoListener("right_hand_landmarks",(i,l)=>{so(i,this.h.rightHandLandmarks),D(this,l)}),this.g.attachEmptyPacketListener("right_hand_landmarks",i=>{D(this,i)}),this.g.attachProtoListener("right_hand_world_landmarks",(i,l)=>{var r=this.h.rightHandWorldLandmarks;i=tl(i),r.push(vr(i)),D(this,l)}),this.g.attachEmptyPacketListener("right_hand_world_landmarks",i=>{D(this,i)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ge.prototype.detectForVideo=ge.prototype.G,ge.prototype.detect=ge.prototype.F,ge.prototype.setOptions=ge.prototype.o,ge.createFromModelPath=function(e,t){return Z(ge,e,{baseOptions:{modelAssetPath:t}})},ge.createFromModelBuffer=function(e,t){return Z(ge,e,{baseOptions:{modelAssetBuffer:t}})},ge.createFromOptions=function(e,t){return Z(ge,e,t)},ge.HAND_CONNECTIONS=mf,ge.POSE_CONNECTIONS=l3,ge.FACE_LANDMARKS_LIPS=uf,ge.FACE_LANDMARKS_LEFT_EYE=ff,ge.FACE_LANDMARKS_LEFT_EYEBROW=df,ge.FACE_LANDMARKS_LEFT_IRIS=W0,ge.FACE_LANDMARKS_RIGHT_EYE=hf,ge.FACE_LANDMARKS_RIGHT_EYEBROW=gf,ge.FACE_LANDMARKS_RIGHT_IRIS=R0,ge.FACE_LANDMARKS_FACE_OVAL=wf,ge.FACE_LANDMARKS_CONTOURS=P0,ge.FACE_LANDMARKS_TESSELATION=$0;var Rt=class extends Dt{constructor(e,t){super(new wn(e,t),"input_image","norm_rect",!0),this.j={classifications:[]},B(e=this.h=new p0,0,1,t=new ve)}get baseOptions(){return J(this.h,ve,1)}set baseOptions(e){B(this.h,0,1,e)}o(e){return B(this.h,0,2,tf(e,J(this.h,Xu,2))),this.l(e)}sa(e,t){return this.j={classifications:[]},mn(this,e,t),this.j}ta(e,t,n){return this.j={classifications:[]},Cn(this,e,n,t),this.j}m(){var e=new Ct;ye(e,"input_image"),ye(e,"norm_rect"),W(e,"classifications");const t=new Mt;Tn(t,P5,this.h);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"),he(n,"IMAGE:input_image"),he(n,"NORM_RECT:norm_rect"),K(n,"CLASSIFICATIONS:classifications"),n.o(t),Jt(e,n),this.g.attachProtoListener("classifications",(a,i)=>{this.j=iy(V5(a)),D(this,i)}),this.g.attachEmptyPacketListener("classifications",a=>{D(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Rt.prototype.classifyForVideo=Rt.prototype.ta,Rt.prototype.classify=Rt.prototype.sa,Rt.prototype.setOptions=Rt.prototype.o,Rt.createFromModelPath=function(e,t){return Z(Rt,e,{baseOptions:{modelAssetPath:t}})},Rt.createFromModelBuffer=function(e,t){return Z(Rt,e,{baseOptions:{modelAssetBuffer:t}})},Rt.createFromOptions=function(e,t){return Z(Rt,e,t)};var kt=class extends Dt{constructor(e,t){super(new wn(e,t),"image_in","norm_rect",!0),this.h=new v0,this.embeddings={embeddings:[]},B(e=this.h,0,1,t=new ve)}get baseOptions(){return J(this.h,ve,1)}set baseOptions(e){B(this.h,0,1,e)}o(e){var t=this.h,n=J(this.h,i0,2);return n=n?n.clone():new i0,e.l2Normalize!==void 0?ne(n,1,ur(e.l2Normalize)):"l2Normalize"in e&&ne(n,1),e.quantize!==void 0?ne(n,2,ur(e.quantize)):"quantize"in e&&ne(n,2),B(t,0,2,n),this.l(e)}za(e,t){return mn(this,e,t),this.embeddings}Aa(e,t,n){return Cn(this,e,n,t),this.embeddings}m(){var e=new Ct;ye(e,"image_in"),ye(e,"norm_rect"),W(e,"embeddings_out");const t=new Mt;Tn(t,$5,this.h);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),K(n,"EMBEDDINGS:embeddings_out"),n.o(t),Jt(e,n),this.g.attachProtoListener("embeddings_out",(a,i)=>{a=Y5(a),this.embeddings=function(l){return{embeddings:jn(l,F5,1).map(r=>{var u,f;const s={headIndex:Zt(r,3)??0??-1,headName:Pe(de(r,4))??""??""};var c=r.v;return P1(c,0|c[z],t0,bu(r,1))!==void 0?(r=ti(r=J(r,t0,bu(r,1),void 0),1,xn,ei()),s.floatEmbedding=r.slice()):(c=new Uint8Array(0),s.quantizedEmbedding=((f=(u=J(r,q5,bu(r,2),void 0))==null?void 0:u.na())==null?void 0:f.h())??c),s}),timestampMs:M0(th(l))}}(a),D(this,i)}),this.g.attachEmptyPacketListener("embeddings_out",a=>{D(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};kt.cosineSimilarity=function(e,t){if(e.floatEmbedding&&t.floatEmbedding)e=O0(e.floatEmbedding,t.floatEmbedding);else{if(!e.quantizedEmbedding||!t.quantizedEmbedding)throw Error("Cannot compute cosine similarity between quantized and float embeddings.");e=O0(D0(e.quantizedEmbedding),D0(t.quantizedEmbedding))}return e},kt.prototype.embedForVideo=kt.prototype.Aa,kt.prototype.embed=kt.prototype.za,kt.prototype.setOptions=kt.prototype.o,kt.createFromModelPath=function(e,t){return Z(kt,e,{baseOptions:{modelAssetPath:t}})},kt.createFromModelBuffer=function(e,t){return Z(kt,e,{baseOptions:{modelAssetBuffer:t}})},kt.createFromOptions=function(e,t){return Z(kt,e,t)};var yf=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(n=>{n.close()}),(t=this.categoryMask)==null||t.close()}};function fy(e){var n,a;const t=function(i){return jn(i,dt,1)}(e.ca()).filter(i=>(Pe(de(i,1))??"").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));if(e.u=[],t.length>1)throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");t.length===1&&(((a=(n=J(t[0],Mt,7))==null?void 0:n.j())==null?void 0:a.g())??new Map).forEach((i,l)=>{e.u[Number(l)]=Pe(de(i,1))??""})}function o3(e){e.categoryMask=void 0,e.confidenceMasks=void 0,e.qualityScores=void 0}function c3(e){try{const t=new yf(e.confidenceMasks,e.categoryMask,e.qualityScores);if(!e.j)return t;e.j(t)}finally{lo(e)}}yf.prototype.close=yf.prototype.close;var ht=class extends Dt{constructor(e,t){super(new wn(e,t),"image_in","norm_rect",!1),this.u=[],this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Pu,this.A=new b0,B(this.h,0,3,this.A),B(e=this.h,0,1,t=new ve)}get baseOptions(){return J(this.h,ve,1)}set baseOptions(e){B(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?ne(this.h,2,dr(e.displayNamesLocale)):"displayNamesLocale"in e&&ne(this.h,2),"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}L(){fy(this)}segment(e,t,n){const a=typeof t!="function"?t:{};return this.j=typeof t=="function"?t:n,o3(this),mn(this,e,a),c3(this)}La(e,t,n,a){const i=typeof n!="function"?n:{};return this.j=typeof n=="function"?n:a,o3(this),Cn(this,e,i,t),c3(this)}Da(){return this.u}m(){var e=new Ct;ye(e,"image_in"),ye(e,"norm_rect");const t=new Mt;Tn(t,_0,this.h);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),n.o(t),Jt(e,n),io(this,e),this.outputConfidenceMasks&&(W(e,"confidence_masks"),K(n,"CONFIDENCE_MASKS:confidence_masks"),al(this,"confidence_masks"),this.g.aa("confidence_masks",(a,i)=>{this.confidenceMasks=a.map(l=>ll(this,l,!0,!this.j)),D(this,i)}),this.g.attachEmptyPacketListener("confidence_masks",a=>{this.confidenceMasks=[],D(this,a)})),this.outputCategoryMask&&(W(e,"category_mask"),K(n,"CATEGORY_MASK:category_mask"),al(this,"category_mask"),this.g.Z("category_mask",(a,i)=>{this.categoryMask=ll(this,a,!1,!this.j),D(this,i)}),this.g.attachEmptyPacketListener("category_mask",a=>{this.categoryMask=void 0,D(this,a)})),W(e,"quality_scores"),K(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(a,i)=>{this.qualityScores=a,D(this,i)}),this.g.attachEmptyPacketListener("quality_scores",a=>{this.categoryMask=void 0,D(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};ht.prototype.getLabels=ht.prototype.Da,ht.prototype.segmentForVideo=ht.prototype.La,ht.prototype.segment=ht.prototype.segment,ht.prototype.setOptions=ht.prototype.o,ht.createFromModelPath=function(e,t){return Z(ht,e,{baseOptions:{modelAssetPath:t}})},ht.createFromModelBuffer=function(e,t){return Z(ht,e,{baseOptions:{modelAssetBuffer:t}})},ht.createFromOptions=function(e,t){return Z(ht,e,t)};var pf=class{constructor(e,t,n){this.confidenceMasks=e,this.categoryMask=t,this.qualityScores=n}close(){var e,t;(e=this.confidenceMasks)==null||e.forEach(n=>{n.close()}),(t=this.categoryMask)==null||t.close()}};pf.prototype.close=pf.prototype.close;var Dn=class extends Dt{constructor(e,t){super(new wn(e,t),"image_in","norm_rect_in",!1),this.outputCategoryMask=!1,this.outputConfidenceMasks=!0,this.h=new Pu,this.u=new b0,B(this.h,0,3,this.u),B(e=this.h,0,1,t=new ve)}get baseOptions(){return J(this.h,ve,1)}set baseOptions(e){B(this.h,0,1,e)}o(e){return"outputCategoryMask"in e&&(this.outputCategoryMask=e.outputCategoryMask??!1),"outputConfidenceMasks"in e&&(this.outputConfidenceMasks=e.outputConfidenceMasks??!0),super.l(e)}segment(e,t,n,a){const i=typeof n!="function"?n:{};if(this.j=typeof n=="function"?n:a,this.qualityScores=this.categoryMask=this.confidenceMasks=void 0,n=this.C+1,a=new A0,t.keypoint&&t.scribble)throw Error("Cannot provide both keypoint and scribble.");if(t.keypoint){var l=new $u;da(l,3,ur(!0),!1),da(l,1,cr(t.keypoint.x),0),da(l,2,cr(t.keypoint.y),0),gr(a,1,ef,l)}else{if(!t.scribble)throw Error("Must provide either a keypoint or a scribble.");{const s=new ty;for(l of t.scribble)da(t=new $u,3,ur(!0),!1),da(t,1,cr(l.x),0),da(t,2,cr(l.y),0),xu(s,1,$u,t);gr(a,2,ef,s)}}this.g.addProtoToStream(a.g(),"mediapipe.tasks.vision.interactive_segmenter.proto.RegionOfInterest","roi_in",n),mn(this,e,i);e:{try{const s=new pf(this.confidenceMasks,this.categoryMask,this.qualityScores);if(!this.j){var r=s;break e}this.j(s)}finally{lo(this)}r=void 0}return r}m(){var e=new Ct;ye(e,"image_in"),ye(e,"roi_in"),ye(e,"norm_rect_in");const t=new Mt;Tn(t,_0,this.h);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"),he(n,"IMAGE:image_in"),he(n,"ROI:roi_in"),he(n,"NORM_RECT:norm_rect_in"),n.o(t),Jt(e,n),io(this,e),this.outputConfidenceMasks&&(W(e,"confidence_masks"),K(n,"CONFIDENCE_MASKS:confidence_masks"),al(this,"confidence_masks"),this.g.aa("confidence_masks",(a,i)=>{this.confidenceMasks=a.map(l=>ll(this,l,!0,!this.j)),D(this,i)}),this.g.attachEmptyPacketListener("confidence_masks",a=>{this.confidenceMasks=[],D(this,a)})),this.outputCategoryMask&&(W(e,"category_mask"),K(n,"CATEGORY_MASK:category_mask"),al(this,"category_mask"),this.g.Z("category_mask",(a,i)=>{this.categoryMask=ll(this,a,!1,!this.j),D(this,i)}),this.g.attachEmptyPacketListener("category_mask",a=>{this.categoryMask=void 0,D(this,a)})),W(e,"quality_scores"),K(n,"QUALITY_SCORES:quality_scores"),this.g.attachFloatVectorListener("quality_scores",(a,i)=>{this.qualityScores=a,D(this,i)}),this.g.attachEmptyPacketListener("quality_scores",a=>{this.categoryMask=void 0,D(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Dn.prototype.segment=Dn.prototype.segment,Dn.prototype.setOptions=Dn.prototype.o,Dn.createFromModelPath=function(e,t){return Z(Dn,e,{baseOptions:{modelAssetPath:t}})},Dn.createFromModelBuffer=function(e,t){return Z(Dn,e,{baseOptions:{modelAssetBuffer:t}})},Dn.createFromOptions=function(e,t){return Z(Dn,e,t)};var Pt=class extends Dt{constructor(e,t){super(new wn(e,t),"input_frame_gpu","norm_rect",!1),this.j={detections:[]},B(e=this.h=new T0,0,1,t=new ve)}get baseOptions(){return J(this.h,ve,1)}set baseOptions(e){B(this.h,0,1,e)}o(e){return e.displayNamesLocale!==void 0?ne(this.h,2,dr(e.displayNamesLocale)):"displayNamesLocale"in e&&ne(this.h,2),e.maxResults!==void 0?Vn(this.h,3,e.maxResults):"maxResults"in e&&ne(this.h,3),e.scoreThreshold!==void 0?U(this.h,4,e.scoreThreshold):"scoreThreshold"in e&&ne(this.h,4),e.categoryAllowlist!==void 0?Bs(this.h,5,e.categoryAllowlist):"categoryAllowlist"in e&&ne(this.h,5),e.categoryDenylist!==void 0?Bs(this.h,6,e.categoryDenylist):"categoryDenylist"in e&&ne(this.h,6),this.l(e)}F(e,t){return this.j={detections:[]},mn(this,e,t),this.j}G(e,t,n){return this.j={detections:[]},Cn(this,e,n,t),this.j}m(){var e=new Ct;ye(e,"input_frame_gpu"),ye(e,"norm_rect"),W(e,"detections");const t=new Mt;Tn(t,ny,this.h);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.ObjectDetectorGraph"),he(n,"IMAGE:input_frame_gpu"),he(n,"NORM_RECT:norm_rect"),K(n,"DETECTIONS:detections"),n.o(t),Jt(e,n),this.g.attachProtoVectorListener("detections",(a,i)=>{for(const l of a)a=Rh(l),this.j.detections.push(C0(a));D(this,i)}),this.g.attachEmptyPacketListener("detections",a=>{D(this,a)}),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Pt.prototype.detectForVideo=Pt.prototype.G,Pt.prototype.detect=Pt.prototype.F,Pt.prototype.setOptions=Pt.prototype.o,Pt.createFromModelPath=async function(e,t){return Z(Pt,e,{baseOptions:{modelAssetPath:t}})},Pt.createFromModelBuffer=function(e,t){return Z(Pt,e,{baseOptions:{modelAssetBuffer:t}})},Pt.createFromOptions=function(e,t){return Z(Pt,e,t)};var vf=class{constructor(e,t,n){this.landmarks=e,this.worldLandmarks=t,this.segmentationMasks=n}close(){var e;(e=this.segmentationMasks)==null||e.forEach(t=>{t.close()})}};function u3(e){e.landmarks=[],e.worldLandmarks=[],e.segmentationMasks=void 0}function f3(e){try{const t=new vf(e.landmarks,e.worldLandmarks,e.segmentationMasks);if(!e.u)return t;e.u(t)}finally{lo(e)}}vf.prototype.close=vf.prototype.close;var Lt=class extends Dt{constructor(e,t){super(new wn(e,t),"image_in","norm_rect",!1),this.landmarks=[],this.worldLandmarks=[],this.outputSegmentationMasks=!1,B(e=this.h=new N0,0,1,t=new ve),this.A=new m0,B(this.h,0,3,this.A),this.j=new w0,B(this.h,0,2,this.j),Vn(this.j,4,1),U(this.j,2,.5),U(this.A,2,.5),U(this.h,4,.5)}get baseOptions(){return J(this.h,ve,1)}set baseOptions(e){B(this.h,0,1,e)}o(e){return"numPoses"in e&&Vn(this.j,4,e.numPoses??1),"minPoseDetectionConfidence"in e&&U(this.j,2,e.minPoseDetectionConfidence??.5),"minTrackingConfidence"in e&&U(this.h,4,e.minTrackingConfidence??.5),"minPosePresenceConfidence"in e&&U(this.A,2,e.minPosePresenceConfidence??.5),"outputSegmentationMasks"in e&&(this.outputSegmentationMasks=e.outputSegmentationMasks??!1),this.l(e)}F(e,t,n){const a=typeof t!="function"?t:{};return this.u=typeof t=="function"?t:n,u3(this),mn(this,e,a),f3(this)}G(e,t,n,a){const i=typeof n!="function"?n:{};return this.u=typeof n=="function"?n:a,u3(this),Cn(this,e,i,t),f3(this)}m(){var e=new Ct;ye(e,"image_in"),ye(e,"norm_rect"),W(e,"normalized_landmarks"),W(e,"world_landmarks"),W(e,"segmentation_masks");const t=new Mt;Tn(t,ay,this.h);const n=new dt;Tt(n,2,"mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"),he(n,"IMAGE:image_in"),he(n,"NORM_RECT:norm_rect"),K(n,"NORM_LANDMARKS:normalized_landmarks"),K(n,"WORLD_LANDMARKS:world_landmarks"),n.o(t),Jt(e,n),io(this,e),this.g.attachProtoVectorListener("normalized_landmarks",(a,i)=>{this.landmarks=[];for(const l of a)a=pr(l),this.landmarks.push(no(a));D(this,i)}),this.g.attachEmptyPacketListener("normalized_landmarks",a=>{this.landmarks=[],D(this,a)}),this.g.attachProtoVectorListener("world_landmarks",(a,i)=>{this.worldLandmarks=[];for(const l of a)a=tl(l),this.worldLandmarks.push(vr(a));D(this,i)}),this.g.attachEmptyPacketListener("world_landmarks",a=>{this.worldLandmarks=[],D(this,a)}),this.outputSegmentationMasks&&(K(n,"SEGMENTATION_MASK:segmentation_masks"),al(this,"segmentation_masks"),this.g.aa("segmentation_masks",(a,i)=>{this.segmentationMasks=a.map(l=>ll(this,l,!0,!this.u)),D(this,i)}),this.g.attachEmptyPacketListener("segmentation_masks",a=>{this.segmentationMasks=[],D(this,a)})),e=e.g(),this.setGraph(new Uint8Array(e),!0)}};Lt.prototype.detectForVideo=Lt.prototype.G,Lt.prototype.detect=Lt.prototype.F,Lt.prototype.setOptions=Lt.prototype.o,Lt.createFromModelPath=function(e,t){return Z(Lt,e,{baseOptions:{modelAssetPath:t}})},Lt.createFromModelBuffer=function(e,t){return Z(Lt,e,{baseOptions:{modelAssetBuffer:t}})},Lt.createFromOptions=function(e,t){return Z(Lt,e,t)},Lt.POSE_CONNECTIONS=l3;const oo="https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task",dy="https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@latest/wasm",hy=()=>{const e=y.useRef(null),[t,n]=y.useState(!1),[a,i]=y.useState("Initializing..."),[l,r]=y.useState(0),[s,c]=y.useState(!1);y.useEffect(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").then(d=>{console.log("ServiceWorker registered:",d)}).catch(d=>{console.log("ServiceWorker registration failed:",d)})},[]);const u=async()=>"caches"in window?await(await caches.open("mediapipe-models-v1")).match(oo)!==void 0:!1,f=async()=>{try{const d=await fetch(oo),g=d.headers.get("content-length"),v=g?parseInt(g,10):0;if(!d.body)throw new Error("No response body");const S=d.body.getReader();let _=0;const w=[];for(;;){const{done:m,value:p}=await S.read();if(m)break;if(w.push(p),_+=p.length,v){const b=Math.round(_/v*100);r(b),i(`Downloading model... ${b}%`)}}return"caches"in window&&await(await caches.open("mediapipe-models-v1")).put(oo,new Response(new Blob(w),{headers:{"Content-Type":"application/octet-stream"}})),!0}catch(d){return console.error("Failed to preload model:",d),!1}};return y.useEffect(()=>{(async()=>{try{i("Checking cached models..."),await u()?i("Using cached model..."):(i("Model not cached. Downloading..."),await f()),i("Loading MediaPipe WASM...");const v=await si.forVisionTasks(dy);i("Creating face landmarker...");const S=await pe.createFromOptions(v,{baseOptions:{modelAssetPath:oo,delegate:"GPU"},runningMode:"VIDEO",outputFaceBlendshapes:!0,numFaces:2});e.current=S,n(!0),i("Model loaded successfully ✅")}catch(g){console.error("Model init error:",g),i(`Error: ${g==null?void 0:g.message}`),(g==null?void 0:g.name)==="NotAllowedError"&&c(!0)}})()},[]),{faceLandmarkerRef:e,isModelLoaded:t,statusMessage:a,setStatusMessage:i,loadingProgress:l,permissionDenied:s,clearCache:async()=>{"caches"in window&&(await caches.delete("mediapipe-models-v1"),i("Cache cleared. Please refresh to re-download models."))}}},gy=()=>{const[e,t]=y.useState(0),n=y.useRef({lastTime:0,frames:0,fps:0}),a=y.useCallback(()=>{const i=performance.now(),l=n.current;if(l.frames++,i-l.lastTime>=1e3){const r=Math.round(l.frames*1e3/(i-l.lastTime));t(r),l.frames=0,l.lastTime=i}},[]);return{fps:e,updateFPS:a}},wy=()=>{const e=y.useRef({value:100,isLookingAway:!1}),t=y.useCallback((l,r,s,c)=>{if(!l||!s||!r)return;const u=l.getContext("2d");if(!u)return;const{width:f,height:h}=l;if(u.clearRect(0,0,f,h),u.drawImage(r,0,0,f,h),c){u.fillStyle="#00FF00";for(const d of s)u.fillRect(d.x*f-.5,d.y*h-.5,1,1)}},[]),n=y.useCallback(l=>{const r=e.current.value/100,s=100,c=20,u=20,f=40;l.fillStyle="rgba(0, 0, 0, 0.3)",l.fillRect(u,f,c,s),l.fillStyle=`rgba(${Math.floor(255*(1-r))}, ${Math.floor(255*r)}, 0, 0.8)`;const h=s*r;l.fillRect(u,f+s-h,c,h),l.fillStyle="#FFFFFF",l.fillRect(u,f+s*(1-r),c,2)},[]),a=y.useCallback((l,r,s,c,u,f,h)=>{if(t(l,r,s,c),u&&f&&h){const d=l.getContext("2d");d&&n(d)}},[t,n]),i=y.useCallback((l,r)=>{const s=l.getContext("2d");s&&(s.clearRect(0,0,l.width,l.height),s.drawImage(r,0,0,l.width,l.height))},[]);return{drawLandmarks:t,drawEngagementBar:n,drawWithEngagementBar:a,clearCanvas:i,engagementRef:e}},my=50,yy=()=>{const[e,t]=y.useState(100),[n,a]=y.useState(!1),i=y.useRef(0),l=y.useCallback((r,s,c)=>{if(!c||r.length<468)return;const u=r[33],f=r[263],h=r[1];if(!u||!f||!h)return;const d=(u.x+f.x)*.5,g=(u.y+f.y)*.5,v=d-s.x,S=g-s.y,_=Math.sqrt(v*v+S*S),w=Math.abs(h.y-s.noseY)*100,m=Math.abs(h.x-s.noseX)*100,p=Math.max(0,100-(_*200+w+m)),b=p<my,T=performance.now();return T-i.current>100&&(t(p),a(b),i.current=T),{engagement:p,isLookingAway:b}},[]);return{engagement:e,isLookingAway:n,analyzeGaze:l,setEngagement:t,setIsLookingAway:a}},py=.05,vy=()=>{const[e,t]=y.useState(!1),[n,a]=y.useState(!1),i=y.useCallback((s,c)=>Math.sqrt(Math.pow(s.x-c.x,2)+Math.pow(s.y-c.y,2)),[]),l=y.useCallback((s,c)=>{if(!s||!c)return 0;const u=[1,33,263,61,291,10,152];let f=0,h=0;const d=c[33],g=c[263],v=s[33],S=s[263];if(!d||!g||!v||!S)return 0;const _=i(d,g),w=i(v,S);if(_===0||w===0)return 0;for(const p of u){const b=c[p],T=s[p];if(b&&T){const N=d.x+(T.x-v.x)*_/w,x=d.y+(T.y-v.y)*_/w;f+=i(b,{x:N,y:x}),h++}}return h===0?0:f/h},[i]),r=y.useCallback((s,c,u,f)=>{if(!s.faceLandmarks||s.faceLandmarks.length===0)return c?(f("Reference face not detected."),a(!0),t(!1)):a(!1),null;if(c&&u){let h=null,d=0;for(const g of s.faceLandmarks)l(g,u)<py&&(h=g,d++);return d===1?(t(!1),a(!1),f("Reference face tracked."),h):d>1?(t(!0),a(!1),f("Multiple matching faces detected. Tracking suspended."),null):(t(!1),a(!0),f("Reference face not detected."),null)}else{s.faceLandmarks.length>1?(t(!0),f("Multiple faces detected. Set reference for single face tracking.")):(t(!1),f("No reference set. Detecting first face."));const h=s.faceLandmarks[0];return!h||h.length<468?null:h}},[l]);return{multipleFacesDetected:e,referenceFaceNotDetected:n,analyzeFace:r,setMultipleFacesDetected:t,setReferenceFaceNotDetected:a}},by=1e3,Sy=(e,t)=>{const[n,a]=y.useState(!1),[i,l]=y.useState("face_detected"),{incrementGazeViolation:r}=$2(),{multipleFacesDetected:s,referenceFaceNotDetected:c,isLookingAway:u}=e;y.useEffect(()=>{let d;return(u||s||c)&&t?d=setTimeout(()=>{a(!0),u?(l("looking_away"),r("looking_away")):s?(l("multiple_faces"),r("multiple_faces")):c&&(l("no_face_detected"),r("no_face_detected"))},by):(a(!1),l("face_detected")),()=>{clearTimeout(d)}},[u,s,c,t,r]);const f=y.useCallback(()=>s?"multiple_faces":c?"no_face_detected":u?"looking_away":"face_detected",[s,c,u]),h=y.useCallback(()=>{a(!1),l("face_detected")},[]);return{showGazeWarningModal:n,faceDetectionState:i,getWarningType:f,closeWarningModal:h,setShowGazeWarningModal:a,setFaceDetectionState:l}};class be extends Error{constructor(t,n,a=!1){super(t),this.code=n,this.recoverable=a,this.name="STTError"}}class Ey{constructor(t={}){Kt(this,"config");Kt(this,"mediaRecorder",null);Kt(this,"audioChunks",[]);Kt(this,"recordingStream",null);Kt(this,"autoStopTimeoutId",null);this.config={baseUrl:"http://localhost:8000",provider:"groq",model:"whisper-large-v3-turbo",language:"en",includeTimestamps:!1,temperature:0,...t}}updateConfig(t){this.config={...this.config,...t}}isRecordingSupported(){return!!(navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia=="function"&&window.MediaRecorder)}async startRecording(t,n){var a;if(!this.isRecordingSupported())throw new be("Audio recording is not supported in this browser","RECORDING_NOT_SUPPORTED",!1);if(this.isRecording())throw new be("Recording is already in progress","ALREADY_RECORDING",!0);try{this.recordingStream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,sampleRate:44100}}),this.audioChunks=[];const i=this.getSupportedMimeType();this.mediaRecorder=new MediaRecorder(this.recordingStream,{mimeType:i}),this.mediaRecorder.ondataavailable=l=>{var r;l.data.size>0&&(this.audioChunks.push(l.data),(r=n==null?void 0:n.onDataAvailable)==null||r.call(n,l.data))},this.mediaRecorder.onstop=()=>{var l;(l=n==null?void 0:n.onStop)==null||l.call(n)},this.mediaRecorder.onerror=l=>{var s;const r=new be(`Recording failed: ${l.error}`,"RECORDING_ERROR",!0);(s=n==null?void 0:n.onError)==null||s.call(n,r),this.cleanup()},this.mediaRecorder.start(100),(a=n==null?void 0:n.onStart)==null||a.call(n),t&&t>0&&(this.autoStopTimeoutId=setTimeout(()=>{this.isRecording()&&this.stopRecording()},t*1e3))}catch(i){if(this.cleanup(),i instanceof Error){if(i.name==="NotAllowedError"||i.name==="PermissionDeniedError")throw new be("Microphone permission was denied","PERMISSION_DENIED",!1);if(i.name==="NotFoundError")throw new be("No microphone found","NO_MICROPHONE",!1)}throw new be(`Failed to start recording: ${i instanceof Error?i.message:String(i)}`,"START_RECORDING_FAILED",!0)}}async stopRecording(){if(this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null),!this.mediaRecorder||!this.isRecording())throw new be("No active recording to stop","NO_ACTIVE_RECORDING",!1);return new Promise((t,n)=>{if(!this.mediaRecorder){n(new be("MediaRecorder is null","MEDIARECORDER_NULL",!1));return}const a=this.mediaRecorder,i=()=>{try{const l=a.mimeType||"audio/webm",r=new Blob(this.audioChunks,{type:l});this.cleanup(),t(r)}catch(l){n(new be(`Failed to create audio blob: ${l instanceof Error?l.message:String(l)}`,"BLOB_CREATION_FAILED",!1))}};a.addEventListener("stop",i,{once:!0}),a.stop()})}async transcribe(t){const{audioBlob:n}=t;if(!n||n.size===0)throw new be("Audio blob is empty or invalid","INVALID_AUDIO",!1);try{const a=new FormData,i=new File([n],"recording.wav",{type:n.type||"audio/wav"});if(a.append("file",i),a.append("qna_id",this.config.qnaId||""),!this.config.interviewId)throw new be("Interview ID is missing from configuration","MISSING_INTERVIEW_ID",!1);const l=await oa(`${this.config.baseUrl}${ua.TRANSCRIBE_ANSWER(this.config.interviewId)}`,{method:"POST",headers:{accept:"application/json","X-STT-Provider":this.config.provider||"groq",...this.config.authToken&&{Authorization:`Bearer ${this.config.authToken}`}},body:a},{attempts:1,backoff:"exponential",baseDelay:1e3,maxDelay:3e3,jitter:!0});if(!l.ok){const s=await l.text();let c=`STT request failed: ${l.status} ${l.statusText}`;try{const u=JSON.parse(s);c=u.message||u.error||c}catch{c=s||c}throw new be(c,`HTTP_${l.status}`,l.status>=500)}return{transcript:(await l.json()).data.transcribed_text??""}}catch(a){throw a instanceof be?a:new be(`Transcription failed: ${a instanceof Error?a.message:String(a)}`,"TRANSCRIPTION_FAILED",!0)}}cancelRecording(){this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null),this.mediaRecorder&&this.isRecording()&&this.mediaRecorder.stop(),this.cleanup()}isRecording(){return this.mediaRecorder!==null&&this.mediaRecorder.state==="recording"}getSupportedMimeType(){const t=["audio/webm","audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/wav"];for(const n of t)if(MediaRecorder.isTypeSupported(n))return n;return"audio/webm"}getRecordingStream(){return this.recordingStream}cleanup(){this.recordingStream&&(this.recordingStream.getTracks().forEach(t=>t.stop()),this.recordingStream=null),this.mediaRecorder=null,this.audioChunks=[],this.autoStopTimeoutId&&(clearTimeout(this.autoStopTimeoutId),this.autoStopTimeoutId=null)}}const rl=new Ey,_y=(e,t,n,a)=>{const i=y.useRef(null);return y.useEffect(()=>{if(!t)return;const l=async()=>{try{const c=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:640},height:{ideal:480},facingMode:"user"}});e.current&&(e.current.srcObject=c,e.current.onloadeddata=()=>{n()})}catch(c){console.error("Camera access error:",c),a("Camera access failed")}},r=i.current,s=e.current;return l(),()=>{r&&cancelAnimationFrame(r),s!=null&&s.srcObject&&s.srcObject.getTracks().forEach(u=>u.stop())}},[t,n]),y.useEffect(()=>{const l=rl.getRecordingStream();if(l&&e.current){e.current.srcObject=l;const r=l.getVideoTracks(),s=l.getAudioTracks(),c=()=>{console.log("Media track ended - permission may have been revoked")};[...r,...s].forEach(u=>{u.addEventListener("ended",c)})}},[]),{animationFrameRef:i}},xy=(e,t,n,a,i,l,r,s,c,u,f,h,d,g,v)=>{const S=y.useRef(null),_=y.useCallback(()=>{var b;const w=e.current,m=t.current,p=n.current;if(!w||w.readyState<2||!p||!m){S.current=requestAnimationFrame(_);return}a();try{const T=performance.now(),N=p.detectForVideo(w,T);if(((b=N.faceLandmarks)==null?void 0:b.length)>0){v(!1);const x=i(N,c,u.current,g);x?(l(m,w,x,f,h,d,c),c&&d&&s(x,u.current,d)):r(m,w)}else r(m,w),c?(v(!0),g("Reference face not detected.")):v(!1)}catch(T){console.error("Face detection error:",T)}S.current=requestAnimationFrame(_)},[e,t,n,a,i,l,r,s,c,u,f,h,d,g,v]);return{renderLoop:_,animationFrameRef:S}},Ay=(e,t,n,a)=>{const{referenceSet:i,referenceRef:l,setReferenceData:r}=$2(),s=y.useRef(l),c=y.useCallback(()=>{s.current=l},[l]),u=y.useCallback(()=>{var d;const f=e.current,h=t.current;if(console.log({faceLandmarker:f,video:h}),!(!f||!h))try{const g=performance.now(),v=f.detectForVideo(h,g);if((d=v.faceLandmarks)!=null&&d[0]){const S=v.faceLandmarks[0],_=S[33],w=S[263],m=S[1];_&&w&&m&&(s.current={x:(_.x+w.x)*.5,y:(_.y+w.y)*.5,noseX:m.x,noseY:m.y},r(!0,s.current),n("Reference set. Gaze tracking active."),console.log("Reference set. Gaze tracking active.",s.current),a&&a())}}catch(g){console.error("Set reference error:",g),n("Failed to set reference")}},[e,t,n,r,a]);return{referenceSet:i,referenceRef:s,setReference:u,syncReference:c}},bf=({isOpen:e,onClose:t,children:n,title:a,showCloseButton:i=!0,closeOnOverlayClick:l=!0,closeOnEscape:r=!0,className:s=""})=>{if(y.useEffect(()=>{if(!e||!r)return;const f=h=>{h.key==="Escape"&&t()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,r,t]),y.useEffect(()=>(e?(document.body.style.overflow="hidden",document.body.classList.add("interview-widget-container")):(document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")),()=>{document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")}),[e]),!e)return null;const c=f=>{l&&f.target===f.currentTarget&&t()},u=o.jsxs("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center",children:[o.jsx("div",{className:"iw-fixed iw-inset-0 iw-bg-black iw-bg-opacity-50 iw-transition-opacity",onClick:c}),o.jsxs("div",{className:`iw-relative iw-bg-white iw-rounded-lg iw-shadow-xl iw-max-w-md iw-w-full iw-mx-4 iw-max-h-[90vh] iw-overflow-hidden ${s}`,role:"dialog","aria-modal":"true","aria-labelledby":a?"dialog-title":void 0,children:[(a||i)&&o.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between iw-p-4 iw-border-b iw-border-gray-200",children:[a&&o.jsx("h2",{id:"dialog-title",className:"iw-text-lg iw-font-semibold iw-text-gray-900",children:a}),i&&o.jsx("button",{onClick:t,className:"iw-p-1 iw-text-gray-400 iw-hover:text-gray-600 iw-transition-colors iw-rounded iw-hover:bg-gray-100","aria-label":"Close dialog",children:o.jsx("svg",{className:"iw-w-5 iw-h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),o.jsx("div",{className:"iw-p-4 iw-overflow-y-auto",children:n})]})]});return W2.createPortal(u,document.body)},d3=({children:e,variant:t="primary",size:n="md",fullWidth:a=!1,isLoading:i=!1,disabled:l,className:r="",...s})=>{const c="iw-inline-flex iw-items-center iw-justify-center iw-rounded-md iw-font-medium iw-transition-colors iw-focus:outline-none iw-focus:ring-2 iw-focus:ring-primary-500 iw-focus:ring-offset-2",u={primary:"iw-bg-primary-600 iw-text-white iw-hover:bg-primary-700 iw-border iw-border-transparent",secondary:"iw-bg-primary-100 iw-text-primary-700 iw-hover:bg-primary-200 iw-border iw-border-transparent",outline:"iw-bg-transparent iw-text-primary-700 iw-border iw-border-primary-500 iw-hover:bg-primary-50",text:"iw-bg-transparent iw-text-primary-600 iw-hover:bg-primary-50 iw-border iw-border-transparent",gradient:"iw-text-white iw-border iw-border-transparent iw-bg-gradient-to-r iw-from-purple-500 iw-to-indigo-500 hover:iw-from-purple-600 hover:iw-to-indigo-600"},f={sm:"iw-px-3 iw-py-1.5 iw-text-sm",md:"iw-px-4 iw-py-2.5 iw-text-sm",lg:"iw-px-5 iw-py-3 iw-text-base"},h="iw-disabled:opacity-50 iw-disabled:cursor-not-allowed iw-disabled:pointer-events-none",d=a?"iw-w-full":"";return o.jsxs("button",{className:`${c} ${u[t]} ${f[n]} ${d} ${h} ${r}`,disabled:l||i,...s,children:[i&&o.jsx(r1,{height:16,width:16,style:{marginRight:"3px"}}),e]})},Sr=e=>{const{baseColor:t,borderRadius:n}=Pl(),{loading:a,children:i,...l}=e;return o.jsx(d3,{style:{background:i6(t),borderRadius:n},...l,children:a?o.jsx(r1,{}):i})};function Ty({isOpen:e,onClose:t,warningType:n}){const a=s1[n],i=a.icon,l=()=>{t()};return n==="face_detected"?null:o.jsx(bf,{isOpen:e,onClose:t,children:e&&o.jsx("div",{className:"iw-bg-white iw-border-white iw-border iw-p-0 iw-shadow-lg sm:iw-max-w-md",children:o.jsxs("div",{children:[o.jsx("div",{className:"iw-sr-only",children:a.description}),o.jsxs("div",{className:"iw-px-8 iw-py-8 iw-text-center",children:[o.jsx("div",{className:`iw-mx-auto iw-mb-6 iw-flex iw-h-16 iw-w-16 iw-items-center iw-justify-center iw-rounded-full ${a.iconBg} border ${a.iconBorder}`,children:o.jsx(i,{className:`iw-h-7 iw-w-7 ${a.iconColor}`})}),o.jsx("h1",{className:"iw-text-foreground iw-mb-3 iw-text-2xl iw-font-bold iw-tracking-tight",children:a.title}),o.jsx("h2",{className:"iw-text-gray-500 iw-mb-6 iw-text-base iw-font-medium",children:a.subtitle}),o.jsx("p",{className:"iw-text-neutral-400 iw-mx-auto iw-mb-8 iw-max-w-sm iw-text-sm iw-leading-relaxed",children:a.description}),o.jsx(Sr,{onClick:l,className:"iw-w-full iw-bg-gray-800 iw-text-white hover:iw-bg-gray-800",children:a.buttonText})]})]})})})}const h3=y.forwardRef(({className:e="",interviewId:t="",interview_duration:n,showProctoringUI:a=!0,onSetReference:i,isAnswering:l,onProctoringStatusChange:r,showStatusOverlay:s=!1},c)=>{var qm;const{authToken:u}=t1(),f=u?r6(u):null,{borderRadius:h}=Pl(),d=h??18,{proctoring:g}=Kc(),v=!!(g!=null&&g.gazeAnalysisEnabled),[S,_]=y.useState(!1),[w,m]=y.useState((g==null?void 0:g.showLandmarks)??!1),[p,b]=y.useState(a&&((g==null?void 0:g.showEngagementBar)??!0)),[T,N]=y.useState(v),[x,C]=y.useState(!1),A=y.useRef(null),O=y.useRef(null),_e=y.useRef(null),He=y.useRef(null),st=y.useCallback(async Et=>{const Es=A.current,ft=_e.current;if(!Es||!ft)return;const Jl=ft.getContext("2d");Jl&&(ft.width=Es.videoWidth,ft.height=Es.videoHeight,Jl.save(),Jl.scale(-1,1),Jl.drawImage(Es,-ft.width,0,ft.width,ft.height),Jl.restore(),await new Promise(jc=>ft.toBlob(jc,"image/jpeg")))},[_6,t]);y.useEffect(()=>{let Et;return l&&(C(!0),Et=setTimeout(()=>C(!1),1e3)),()=>{Et&&clearTimeout(Et)}},[l]);const{faceLandmarkerRef:un,isModelLoaded:St,statusMessage:M,setStatusMessage:j,loadingProgress:H,permissionDenied:$,clearCache:re}=hy(),{fps:ot,updateFPS:bn}=gy(),{drawWithEngagementBar:fn,clearCanvas:Qt,engagementRef:ct}=wy(),{engagement:ut,isLookingAway:dn,analyzeGaze:De,setEngagement:Qa,setIsLookingAway:Il}=yy(),{multipleFacesDetected:vs,referenceFaceNotDetected:bs,analyzeFace:I2,setMultipleFacesDetected:Uc,setReferenceFaceNotDetected:Mi}=vy(),{referenceSet:Ss,referenceRef:Bc,setReference:q,syncReference:xe}=Ay(un,A,j,i),Ci={multipleFacesDetected:vs,referenceFaceNotDetected:bs,isLookingAway:dn},{showGazeWarningModal:Gc,getWarningType:Hc,closeWarningModal:Hm,setShowGazeWarningModal:jm,setFaceDetectionState:Vm}=Sy(Ci,v&&!s);y.useEffect(()=>{if(r){const Et=Hc()||"face_detected";r(Et)}},[vs,bs,dn,Hc,r]);const{renderLoop:J8}=xy(A,O,un,bn,I2,fn,Qt,De,Ss,Bc,w,p,v,j,Mi);_y(A,St,J8,j),y.useEffect(()=>{xe()},[xe]),y.useEffect(()=>{ct&&ct.current&&(ct.current.value=ut,ct.current.isLookingAway=dn)},[ut,dn,ct]);const W8=y.useCallback(Et=>{N(Et),Et||(Qa(100),Il(!1))},[Qa,Il]),R8=y.useCallback(()=>{Il(!1),Uc(!1),Mi(!1),Vm("face_detected"),jm(!1),Hm()},[Il,Uc,Mi,Vm,jm,Hm]),P8={engagement:ut,fps:ot,isLookingAway:dn,multipleFacesDetected:vs,referenceFaceNotDetected:bs};return y.useEffect(()=>{const Et=[];return(async()=>{try{const ft=await navigator.mediaDevices.getUserMedia({video:!0,audio:!1});He.current=ft,A.current&&(A.current.srcObject=ft);const jc=(n??_s)*60*1e3/3,$8=[0,1,2].map((Di,Ka)=>({label:`capture-${Ka+1}`,start:Ka*jc,end:(Ka+1)*jc})),e7=(Di,Ka)=>Di===Ka?Di:Math.random()*(Ka-Di)+Di;$8.forEach(({label:Di,start:Ka,end:t7},n7)=>{let J2;n7===0?J2=3e3:J2=e7(Ka,t7),Et.push(setTimeout(()=>{st(Di)},J2))})}catch(ft){console.error("Error accessing camera:",ft)}})(),()=>{He.current&&He.current.getTracks().forEach(ft=>ft.stop()),Et.forEach(clearTimeout)}},[st]),y.useImperativeHandle(c,()=>({setReference:()=>{q()},stopCamera:()=>{He.current&&(He.current.getTracks().forEach(Et=>Et.stop()),He.current=null)}}),[q]),o.jsxs("div",{className:`iw-relative iw-h-full iw-w-full ${e}`,children:[$?o.jsxs("div",{className:"iw-rounded-md iw-border iw-border-red-600 iw-p-5 iw-text-red-600",children:[o.jsx("h2",{children:"Camera Permission Denied"}),o.jsx("p",{children:"Please allow camera access to use this application."})]}):o.jsx("div",{className:"iw-flex iw-w-full iw-h-full iw-justify-start iw-items-start",children:o.jsxs("div",{className:`iw-relative iw-max-w-full iw-max-h-full iw-aspect-video iw-rounded-2xl iw-overflow-hidden iw-bg-black ${x?"iw-animate-answer-start":""} ${l?"iw-border-4 iw-border-[#6296FB]":""}`,style:{width:"100%",height:"auto",minHeight:"0"},children:[o.jsx("video",{ref:A,autoPlay:!0,playsInline:!0,muted:!0,className:"iw-absolute iw-inset-0 iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)"}}),v&&o.jsx("canvas",{ref:O,width:320,height:240,className:"iw-absolute iw-inset-0 iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)",borderRadius:d}}),o.jsx("canvas",{ref:_e,style:{display:"none"}}),a&&o.jsxs("div",{className:"iw-absolute iw-top-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-[#FFEBE6] iw-px-2 iw-py-1 iw-backdrop-blur-md",children:[o.jsx("div",{className:"iw-size-2 iw-animate-pulse iw-rounded-full iw-bg-red-500"}),o.jsx("span",{className:"iw-font-medium iw-text-xs iw-text-[#E94315]",children:"RECORDING"})]}),a&&((qm=f==null?void 0:f.data)==null?void 0:qm.user_name)&&o.jsx("div",{className:"iw-absolute iw-z-50 iw-bottom-4 iw-right-4 iw-inline-flex iw-items-center iw-gap-2 iw-rounded-lg iw-border iw-border-white/10 iw-bg-[#F1F5FE] iw-px-3 iw-py-1 iw-backdrop-blur-md",children:o.jsx("span",{className:"iw-font-medium iw-text-xs iw-text-[#062260]",children:f.data.user_name})}),a&&o.jsx("div",{className:"iw-absolute iw-bottom-4 iw-right-4",children:o.jsx(A6,{showControls:(g==null?void 0:g.showControls)??!1,isBubbleOpen:S,setIsBubbleOpen:_,setReference:q,clearCache:re,isModelLoaded:St,gazeAnalysisEnabled:T&&v,referenceSet:Ss,showLandmarks:w,setShowLandmarks:m,showEngagementBar:p,setShowEngagementBar:b,handleToggleGazeAnalysis:W8,stats:P8,statusMessage:M,loadingProgress:H})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"iw-absolute iw-inset-0 iw-pointer-events-none iw-z-10 ",style:{background:"radial-gradient(ellipse 20% 40% at 50% 45%, transparent 99.5%, rgba(0,0,0,0.35) 100%)"}}),o.jsx("div",{className:"iw-absolute iw-bottom-2 iw-inset-x-0 iw-flex iw-justify-center iw-pointer-events-none iw-z-20",children:o.jsx(Ny,{status:Hc()??"face_detected"})})]})]})}),v&&Gc&&!s&&o.jsx(Ty,{isOpen:Gc,onClose:R8,warningType:Hc()})]})}),Ny=({status:e})=>{const t=s1[e];if(!t)return null;const n=e!=="face_detected";return o.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-gap-2",children:[o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2 iw-px-3 iw-py-1 iw-rounded-full iw-backdrop-blur-md iw-shadow-sm transition-colors duration-300 iw-text-white",children:[o.jsx("div",{className:`iw-flex iw-h-4 iw-w-4 iw-items-center iw-size-2.5 iw-justify-center iw-rounded-full iw-text-white ${n?"iw-bg-[#E94315]":"iw-bg-[#22C55E]"}`,children:n?o.jsx(i1,{}):o.jsx(As,{})}),o.jsx("span",{className:"iw-text-sm iw-font-medium",children:e==="face_detected"?"Face detected clearly":t.title})]}),n&&o.jsx("span",{className:"iw-text-white iw-text-center iw-text-sm iw-drop-shadow-sm iw-max-w-[400px] iw-px-3 ",children:"Sit upright & look directly into the camera"})]})},g3=({micEnabled:e=!1,videoEnabled:t=!1,buttonText:n,onButtonClick:a,isAgreed:i,onAgreedToggle:l,showCheckbox:r=!0,showMediaIcons:s=!0,disabled:c=!1})=>{const u=c||!i||s&&(!e||!t);return o.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-6 iw-w-full",children:[r&&o.jsxs("div",{className:"iw-flex iw-items-start iw-gap-3 iw-bg-[#F1F5FE] iw-rounded-xl iw-p-4 iw-border iw-border-[#E7EAF1]",children:[o.jsx("div",{className:`iw-mt-0.5 iw-h-5 iw-w-5 iw-min-w-[20px] iw-rounded iw-border iw-flex iw-items-center iw-justify-center iw-cursor-pointer iw-transition-colors ${i?"iw-bg-[#062260] iw-border-[#062260]":"iw-bg-white iw-border-[#B3B9CB]"}`,onClick:f=>{f.stopPropagation(),l(!i)},children:i&&o.jsx(As,{className:"iw-size-3 iw-text-white"})}),o.jsx("label",{onClick:()=>l(!i),className:"iw-text-sm iw-text-[#062260] iw-font-medium iw-cursor-pointer iw-select-none",children:"By continuing, you acknowledge and consent to the use of your face data exclusively for interview monitoring"})]}),o.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-4",children:[s&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"iw-relative",children:[o.jsx("div",{className:`iw-flex iw-h-12 iw-w-16 iw-items-center iw-justify-center iw-rounded-xl iw-border iw-transition-all ${e?"iw-border-[#E7EAF1] iw-bg-white iw-text-[#062260]":"iw-border-rose-200 iw-bg-rose-50 iw-text-rose-600"}`,children:e?o.jsx(d6,{className:"iw-h-6 iw-w-6"}):o.jsx(h6,{className:"iw-h-6 iw-w-6"})}),e&&o.jsx("div",{className:"iw-absolute -iw-right-1 -iw-top-1 iw-flex iw-h-4 iw-w-4 iw-items-center iw-justify-center iw-rounded-full iw-bg-[#22C55E] iw-text-white",children:o.jsx(As,{className:"iw-h-2.5 iw-w-2.5"})})]}),o.jsxs("div",{className:"iw-relative",children:[o.jsx("div",{className:`iw-flex iw-h-12 iw-w-16 iw-items-center iw-justify-center iw-rounded-xl iw-border iw-transition-all ${t?"iw-border-[#E7EAF1] iw-bg-white iw-text-[#062260]":"iw-border-rose-200 iw-bg-rose-50 iw-text-rose-600"}`,children:t?o.jsx(v6,{className:"iw-h-6 iw-w-6"}):o.jsx(b6,{className:"iw-h-6 iw-w-6"})}),t&&o.jsx("div",{className:"iw-absolute -iw-right-1 -iw-top-1 iw-flex iw-h-4 iw-w-4 iw-items-center iw-justify-center iw-rounded-full iw-bg-[#22C55E] iw-text-white",children:o.jsx(As,{className:"iw-h-2.5 iw-w-2.5"})})]})]}),o.jsx(d3,{onClick:a,disabled:u,className:`iw-h-12 iw-flex-1 iw-max-w-[220px] !iw-bg-[#F1F5FE] !iw-text-[#062260] !iw-font-bold iw-border-none iw-rounded-lg ${u?"iw-opacity-50":"hover:iw-opacity-75"}`,children:n})]})]})},My=({steps:e,currentStepIndex:t})=>o.jsx("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-4 iw-w-full iw-py-6",children:e.map((n,a)=>{const i=a<t,l=a===t;return o.jsxs(y.Fragment,{children:[o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[o.jsx("div",{className:`iw-flex iw-size-9 iw-text-[#062260] iw-items-center iw-justify-center iw-rounded-full iw-font-semibold iw-border ${l||i?"iw-border-[#0EB00E] iw-bg-[#E9FFE6]":"iw-border-[#BDE0FD] iw-bg-[#E6F3FF]"}`,children:i?o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("polyline",{points:"20 6 9 17 4 12"})}):a+1}),o.jsx("span",{className:`iw-text-sm iw-font-medium ${l||i?"iw-text-[#062260]":"iw-text-[#5C6686]"}`,children:n.label})]}),a<e.length-1&&o.jsx("div",{className:"iw-flex-1 iw-max-w-[120px] iw-border-t iw-border-dotted iw-border-[#B3B9CB]"})]},a)})}),Cy=["Don't refresh or reload the page during your assessment","Don't switch tabs or open other applications while session is ongoing","Don't leave your position during the session","Don't disable or interfere with video/audio monitoring"],Dy=({isOpen:e,onStart:t,gazeEnabled:n=!1,videoFeedRef:a,interviewId:i="",interview_duration:l=_s})=>{const r=y.useRef(null),s=y.useRef(null),[c,u]=y.useState(!1),[f,h]=y.useState(!1),[d,g]=y.useState(0),[v,S]=y.useState(!1),_=y.useRef(null),w=y.useRef(null),m=A=>{_.current=A,a&&(typeof a=="function"?a(A):a.current=A)},p=()=>{s.current&&(s.current.getTracks().forEach(A=>A.stop()),s.current=null)},b=async()=>{try{const A=await navigator.mediaDevices.getUserMedia({video:{width:{ideal:1280},height:{ideal:720}},audio:!0});s.current=A,r.current&&(r.current.srcObject=A),u(!0)}catch(A){console.error("Media permission error:",A);let O="Unable to access camera or microphone.";(A==null?void 0:A.name)==="NotAllowedError"?O="Permissions denied. Please allow access to camera and microphone.":(A==null?void 0:A.name)==="NotFoundError"?O="No camera/microphone found. Please connect a device and retry.":A!=null&&A.message&&(O=A.message),u(!1),console.log(O)}finally{}};if(y.useEffect(()=>{if(!e){p();return}return b(),()=>p()},[e]),y.useEffect(()=>()=>{w.current&&(clearInterval(w.current),w.current=null)},[]),!e)return null;const[T,N]=y.useState("face_detected"),x=async()=>{h(!0);const A=()=>{var O;return(O=_.current)==null?void 0:O.setReference()};A(),w.current&&clearInterval(w.current),w.current=setInterval(A,500)},C=[{label:n?"Calibrate your camera":"Camera & Mic permission"},{label:"Basic guidelines"}];return o.jsx("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-gray-900/40 iw-backdrop-blur-sm iw-p-4 iw-overflow-auto",children:o.jsxs("div",{className:"iw-w-full iw-max-w-[700px] iw-bg-white iw-rounded-xl iw-shadow-2xl iw-overflow-auto",children:[o.jsxs("div",{className:"iw-px-5 iw-pt-5",children:[o.jsx("h2",{className:"iw-text-[#062260] iw-text-2xl iw-font-medium iw-tracking-tight",children:"Final checks before you go live"}),o.jsx("div",{className:"iw-mt-4 iw-bg-[#F1F5FE] iw-rounded-xl iw-p-3 iw-border iw-border-[#E7EAF1]",children:o.jsx("p",{className:"iw-text-[#5C6686] iw-text-sm iw-leading-relaxed",children:"To ensure the integrity of the interview process, this platform uses your device’s camera to monitor your face and gaze direction. We do not store any outside this session"})}),o.jsx("div",{className:"iw-mt-6 iw-border-b iw-border-dashed iw-border-[#B3B9CB] iw-w-full"}),o.jsx(My,{steps:C,currentStepIndex:d})]}),o.jsx("div",{className:"iw-px-5 iw-pb-5 iw-flex iw-flex-col iw-items-center",children:d===0?o.jsxs("div",{className:"iw-w-full iw-flex iw-flex-col iw-items-center iw-gap-6",children:[o.jsx("div",{className:"iw-w-full iw-max-w-[600px] iw-aspect-video iw-bg-slate-100 iw-rounded-2xl iw-overflow-hidden iw-relative iw-border iw-border-slate-200",children:n?o.jsx(h3,{ref:m,interviewId:i,interview_duration:l,showProctoringUI:!1,showStatusOverlay:!0,onProctoringStatusChange:N,onSetReference:()=>{w.current&&(clearInterval(w.current),w.current=null),h(!1),g(1)}}):o.jsx("video",{ref:r,autoPlay:!0,playsInline:!0,muted:!0,className:"iw-w-full iw-h-full iw-object-cover",style:{transform:"scaleX(-1)"}})}),o.jsx(g3,{micEnabled:c,videoEnabled:c,buttonText:n?f?"Calibrating...":"Start calibrate":"Next",onButtonClick:()=>{n?x():g(1)},disabled:!v||n&&T!=="face_detected"||!n&&!c,isAgreed:v,onAgreedToggle:S})]}):o.jsxs("div",{className:"iw-w-full iw-flex iw-flex-col iw-gap-6",children:[o.jsx("div",{className:"iw-w-full iw-bg-[#F8FAFF] iw-rounded-2xl iw-p-8 iw-flex iw-flex-col iw-gap-5",children:Cy.map((A,O)=>o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-4",children:[o.jsx("div",{className:"iw-flex iw-h-7 iw-w-7 iw-min-w-[28px] iw-items-center iw-justify-center iw-rounded-full iw-bg-[#DBEAFE] iw-text-[#062260] iw-text-xs iw-font-bold",children:O+1}),o.jsx("span",{className:"iw-text-[#5C6686] iw-font-medium",children:A})]},O))}),o.jsx(g3,{buttonText:"Start interview",onButtonClick:()=>{t(),p()},isAgreed:v,onAgreedToggle:S,showMediaIcons:!1})]})})]})})};var I=(e=>(e.IDLE="idle",e.FETCHING_QUESTION="fetching_question",e.READING_QUESTION="reading_question",e.THINKING="thinking",e.ANSWERING="answering",e.TRANSCRIBING="transcribing",e.EDITING="editing",e.SUBMITTING="submitting",e.COMPLETED="completed",e))(I||{});const w3={thinkingDuration:0,answeringDuration:120,editingDuration:30},m3={idle:{next:"fetching_question"},fetching_question:{next:"reading_question"},reading_question:{next:"answering"},thinking:{next:"answering",duration:0},answering:{next:"transcribing",duration:120},transcribing:{next:"editing"},editing:{next:"submitting",duration:30},submitting:{next:"completed"},completed:{next:"completed"}};class Oy{constructor(t={},n={}){Kt(this,"config");Kt(this,"state");Kt(this,"phaseIntervalId",null);Kt(this,"globalIntervalId",null);Kt(this,"callbacks");this.config={...w3,...t},this.callbacks=n,this.state={phase:"idle",currentPhaseTimeRemaining:0,totalTimeElapsed:0,currentQuestionNumber:0}}updateConfig(t){this.config={...this.config,...t}}getState(){return{...this.state}}startQuestion(){this.state.currentQuestionNumber===0&&this.startGlobalTimer(),this.state.currentQuestionNumber=this.state.currentQuestionNumber+1,this.state.phase="fetching_question",this.notifyChange()}nextPhase(){const t=this.state.phase;let n=m3[t];if(!n)return;if(n.next==="editing"&&this.config.editingDuration===0){const i=m3.editing;i&&(n=i)}this.stopPhaseTimer(),this.state.phase=n.next;const a=this.getDurationForPhase(n.next);a>0?(this.state.currentPhaseTimeRemaining=a,this.startPhaseTimer()):this.state.currentPhaseTimeRemaining=0,this.notifyChange()}completeInterview(){var t,n;this.stopGlobalTimer(),this.stopPhaseTimer(),this.state.phase="completed",(n=(t=this.callbacks).onInterviewEnd)==null||n.call(t),this.notifyChange()}destroy(){this.stopPhaseTimer(),this.stopGlobalTimer()}getDurationForPhase(t){switch(t){case"thinking":return this.config.thinkingDuration;case"answering":return this.config.answeringDuration;case"editing":return this.config.editingDuration;default:return 0}}startGlobalTimer(){this.globalIntervalId=setInterval(()=>{var t,n;this.state.totalTimeElapsed++,(n=(t=this.callbacks).onTick)==null||n.call(t,this.getState())},1e3)}stopGlobalTimer(){this.globalIntervalId&&(clearInterval(this.globalIntervalId),this.globalIntervalId=null)}startPhaseTimer(){this.phaseIntervalId=setInterval(()=>{this.state.currentPhaseTimeRemaining--,this.state.currentPhaseTimeRemaining<=0&&this.nextPhase()},1e3)}stopPhaseTimer(){this.phaseIntervalId&&(clearInterval(this.phaseIntervalId),this.phaseIntervalId=null)}notifyChange(){var t,n;(n=(t=this.callbacks).onPhaseChange)==null||n.call(t,this.state.phase,this.getState())}}function zy(e={}){const{config:t={},callbacks:n={}}=e,a=y.useRef(null);a.current||(a.current=new Oy(t,{}));const i=a.current,[l,r]=y.useState(i.getState()),s=y.useCallback(()=>{r(i.getState())},[i]);y.useEffect(()=>{const h={onPhaseChange:(d,g)=>{var v;s(),(v=n.onPhaseChange)==null||v.call(n,d,g)},onTick:d=>{var g;s(),(g=n.onTick)==null||g.call(n,d)},onInterviewEnd:()=>{var d;s(),(d=n.onInterviewEnd)==null||d.call(n)}};i.callbacks=h},[i,n,s]),y.useEffect(()=>{i.updateConfig(t)},[i,t]),y.useEffect(()=>()=>{i.destroy()},[i]);const c=y.useCallback(()=>{i.startQuestion(),s()},[i,s]),u=y.useCallback(()=>{i.nextPhase(),s()},[i,s]),f=y.useCallback(()=>{i.completeInterview(),s()},[i,s]);return{state:l,startQuestion:c,nextPhase:u,completeInterview:f,timerService:i}}function ky(e,t={}){const[n,a]=y.useState({data:null,loading:!1,error:null}),i=y.useCallback(async(...l)=>{var r,s,c,u;a(f=>({...f,loading:!0,error:null}));try{const f=await e(...l);a(h=>({...h,data:f,loading:!1,error:null})),(r=t.onSuccess)==null||r.call(t,f),(s=t.onSettled)==null||s.call(t,f,null)}catch(f){const h=f.type?f:{type:"unknown",message:f.message||"Unknown error",retryable:!0,userMessage:"Something went wrong. Please try again.",originalError:f};a(d=>({...d,loading:!1,error:h})),(c=t.onError)==null||c.call(t,h),(u=t.onSettled)==null||u.call(t,null,h)}},[e,t]);return{...n,execute:i}}const Ly=e=>{const[t,n]=y.useState(null),[a,i]=y.useState(!1),l=document,r=()=>!!(l.fullscreenEnabled||l.webkitFullscreenEnabled||l.mozFullScreenEnabled||l.msFullscreenEnabled),s=()=>l.fullscreenElement||l.webkitFullscreenElement||l.mozFullScreenElement||l.msFullscreenElement,c=async g=>{var v;try{if(!r())throw new Error("Fullscreen is not supported in this environment");g.requestFullscreen?await g.requestFullscreen():g.webkitRequestFullscreen?await g.webkitRequestFullscreen():g.mozRequestFullScreen?await g.mozRequestFullScreen():g.msRequestFullscreen&&await g.msRequestFullscreen()}catch(S){const _={name:"FullscreenError",message:S instanceof Error?S.message:"Failed to enter fullscreen"};n(_),(v=e==null?void 0:e.onError)==null||v.call(e,_)}},u=async()=>{var g;try{l.exitFullscreen?await l.exitFullscreen():l.webkitExitFullscreen?await l.webkitExitFullscreen():l.mozCancelFullScreen?await l.mozCancelFullScreen():l.msExitFullscreen&&await l.msExitFullscreen()}catch(v){const S={name:"FullscreenError",message:v instanceof Error?v.message:"Failed to exit fullscreen"};n(S),(g=e==null?void 0:e.onError)==null||g.call(e,S)}},f=y.useCallback(()=>{var v;const g=!!s();i(g),(v=e==null?void 0:e.onFullScreenChange)==null||v.call(e,g)},[e]);y.useEffect(()=>{const g=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];return g.forEach(v=>{document.addEventListener(v,f)}),()=>{g.forEach(v=>{document.removeEventListener(v,f)})}},[f]);const h=async g=>{n(null);const v=g??document.documentElement;await c(v)};return{isFullScreen:a,toggleFullScreen:async g=>{a?await u():await h(g)},enterFullScreen:h,exitFullScreen:u,error:t}};function y3(){const e=xs();return y.useMemo(()=>{const n=e.api||{};return new o1(n)},[e.api])}const Uy=e=>{y.useEffect(()=>{const t=a=>{(a.ctrlKey||a.metaKey)&&["c","v","a","t","n","w","r","s","p"].includes(a.key.toLowerCase())&&(a.preventDefault(),e({type:"blocked_shortcut",severity:"low",details:{action:"shortcut_pressed",reason:`Attempted to use a blocked keyboard shortcut: Ctrl + ${a.key}`}})),a.key.startsWith("F")&&a.key.length<=3&&(a.preventDefault(),e({type:"blocked_function_key",severity:"low",details:{action:"function_key_pressed",reason:`Attempted to use a blocked function key: ${a.key}`}})),a.altKey&&a.key==="Tab"&&(a.preventDefault(),e({type:"alt_tab_attempt",severity:"medium",details:{action:"alt_tab",reason:"Attempted to use the Alt + Tab shortcut"}}))},n=a=>{a.preventDefault(),e({type:"right_click_attempt",severity:"low",details:{action:"right_click",reason:"Attempted to use the right click"}})};return document.addEventListener("keydown",t),document.addEventListener("contextmenu",n),()=>{document.removeEventListener("keydown",t),document.removeEventListener("contextmenu",n)}},[e])},By=(e={})=>{const[t,n]=y.useState(!1),[a,i]=y.useState(!1),[l,r]=y.useState(null),[s,c]=y.useState(null),[u,f]=y.useState(null);e.config&&rl.updateConfig(e.config);const h=y.useCallback(async S=>{var _;try{c(null),r(null),f(null),await rl.startRecording(S,{onStart:()=>{var w;n(!0),(w=e.onStart)==null||w.call(e)},onStop:()=>{var w;n(!1),(w=e.onStop)==null||w.call(e)},onError:w=>{var p;const m=w instanceof be?w:new be(w.message,"RECORDING_ERROR",!0);c(m),n(!1),(p=e.onError)==null||p.call(e,m)}})}catch(w){const m=w instanceof be?w:new be(w instanceof Error?w.message:String(w),"START_FAILED",!1);throw c(m),n(!1),(_=e.onError)==null||_.call(e,m),m}},[]),d=y.useCallback(async()=>{var S,_;try{const w=await rl.stopRecording();return f(w),n(!1),(S=e.onStop)==null||S.call(e),w}catch(w){const m=w instanceof be?w:new be(w instanceof Error?w.message:String(w),"STOP_FAILED",!1);throw c(m),n(!1),(_=e.onError)==null||_.call(e,m),m}},[]),g=y.useCallback(async(S,_={})=>{var w,m;try{c(null),i(!0);const p={audioBlob:S,..._},b=await rl.transcribe(p);return r(b.transcript),i(!1),(w=e.onTranscriptionComplete)==null||w.call(e,b),b}catch(p){const b=p instanceof be?p:new be(p instanceof Error?p.message:String(p),"TRANSCRIPTION_FAILED",!0);throw c(b),i(!1),(m=e.onError)==null||m.call(e,b),b}},[]),v=y.useCallback(()=>{rl.cancelRecording(),n(!1),f(null)},[]);return{startRecording:h,stopRecording:d,transcribe:g,cancelRecording:v,isRecording:t,isTranscribing:a,transcript:l,error:s,audioBlob:u}},Gy=e=>{const t=y.useRef(null),n=y.useRef(!1);y.useEffect(()=>{const a=()=>{document.hidden&&(n.current=!0,t.current&&(clearTimeout(t.current),t.current=null),e({type:"tab_switch",severity:"high",details:{action:"tab_hidden",reason:"Attempted to switch tabs or applications"}}),setTimeout(()=>{n.current=!1},100))},i=()=>{n.current||(t.current=setTimeout(()=>{n.current||e({type:"focus_loss",severity:"medium",details:{action:"window_blur",reason:"Focus lost from the interview window"}}),t.current=null},50))};return document.addEventListener("visibilitychange",a),window.addEventListener("blur",i),()=>{document.removeEventListener("visibilitychange",a),window.removeEventListener("blur",i),t.current&&clearTimeout(t.current)}},[e])},Hy=()=>{y.useEffect(()=>{const e=document.createElement("style");return e.textContent=`
24
16
  * {
25
17
  -webkit-user-select: none !important;
26
18
  -moz-user-select: none !important;
@@ -33,7 +25,7 @@
33
25
  -ms-user-select: text !important;
34
26
  user-select: text !important;
35
27
  }
36
- `,document.head.appendChild(e),()=>{document.head.removeChild(e)}},[])};class Yy{constructor(){Qt(this,"currentAudio",null)}async play(t,n){var i,a;try{if(this.stop(),(i=n==null?void 0:n.onStart)==null||i.call(n),!t)throw new Error("No audio data provided");const l=window.atob(t),s=new Uint8Array(l==null?void 0:l.length);for(let c=0;c<(l==null?void 0:l.length);c++)s[c]=l==null?void 0:l.charCodeAt(c);const r=new Blob([s],{type:"audio/wav"}),o=URL.createObjectURL(r);return this.currentAudio=new Audio(o),new Promise((c,f)=>{if(!this.currentAudio){f(new Error("Audio element not created"));return}const h=this.currentAudio;h.onended=()=>{var d;URL.revokeObjectURL(o),this.currentAudio=null,(d=n==null?void 0:n.onEnd)==null||d.call(n),c()},h.onerror=d=>{var v;URL.revokeObjectURL(o),this.currentAudio=null;const m=new Error(`Audio playback failed: ${d}`);(v=n==null?void 0:n.onError)==null||v.call(n,m),f(m)},h.play().catch(d=>{var v;URL.revokeObjectURL(o),this.currentAudio=null;const m=new Error(`Failed to play audio: ${d.message}`);(v=n==null?void 0:n.onError)==null||v.call(n,m),f(m)})})}catch(l){const s=l instanceof Error?l:new Error(`TTS Error: ${String(l)}`);throw(a=n==null?void 0:n.onError)==null||a.call(n,s),s}}stop(){this.currentAudio&&(this.currentAudio.pause(),this.currentAudio.currentTime=0,this.currentAudio=null)}isPlaying(){return this.currentAudio!==null&&!this.currentAudio.paused}}const x3=new Yy,Xy=(e={})=>{const[t,n]=y.useState(!1),[i,a]=y.useState(!1),[l,s]=y.useState(null),r=y.useCallback(async c=>{var f;try{s(null),a(!0),await x3.play(c,{onStart:()=>{var h;a(!1),n(!0),(h=e.onStart)==null||h.call(e)},onEnd:()=>{var h;n(!1),(h=e.onEnd)==null||h.call(e)},onError:h=>{var d;n(!1),a(!1),s(h),(d=e.onError)==null||d.call(e,h)}})}catch(h){const d=h instanceof Error?h:new Error(String(h));throw s(d),n(!1),a(!1),(f=e.onError)==null||f.call(e,d),d}},[e]),o=y.useCallback(()=>{x3.stop(),n(!1),a(!1)},[]);return{speak:r,stop:o,isPlaying:t,isLoading:i,error:l}},Qy=({onViolation:e,onEnd:t,maxViolations:n=5})=>{const{addViolation:i}=a6(),a=n6(),l=i6(),s=y.useRef(l);y.useEffect(()=>{s.current=l},[l]);const r=y.useCallback(c=>{t&&t(c,s.current)},[t]);return{logViolation:y.useCallback(({type:c,severity:f,details:h})=>{const d={id:c6(),type:c,severity:f,details:h,timestamp:Date.now()};i(d);const m=s.current+1;e&&e(d,m),m>=n&&r("excessive_violations")},[i,e,n,r]),onInterviewEnd:r,violationCount:l,logList:a}},Zy=()=>{y.useEffect(()=>{function e(){console.clear(),console.log(`
28
+ `,document.head.appendChild(e),()=>{document.head.removeChild(e)}},[])};class jy{constructor(){Kt(this,"currentAudio",null)}async play(t,n){var a,i;try{if(this.stop(),(a=n==null?void 0:n.onStart)==null||a.call(n),!t)throw new Error("No audio data provided");const l=window.atob(t),r=new Uint8Array(l==null?void 0:l.length);for(let u=0;u<(l==null?void 0:l.length);u++)r[u]=l==null?void 0:l.charCodeAt(u);const s=new Blob([r],{type:"audio/wav"}),c=URL.createObjectURL(s);return this.currentAudio=new Audio(c),new Promise((u,f)=>{if(!this.currentAudio){f(new Error("Audio element not created"));return}const h=this.currentAudio;h.onended=()=>{var d;URL.revokeObjectURL(c),this.currentAudio=null,(d=n==null?void 0:n.onEnd)==null||d.call(n),u()},h.onerror=d=>{var v;URL.revokeObjectURL(c),this.currentAudio=null;const g=new Error(`Audio playback failed: ${d}`);(v=n==null?void 0:n.onError)==null||v.call(n,g),f(g)},h.play().catch(d=>{var v;URL.revokeObjectURL(c),this.currentAudio=null;const g=new Error(`Failed to play audio: ${d.message}`);(v=n==null?void 0:n.onError)==null||v.call(n,g),f(g)})})}catch(l){const r=l instanceof Error?l:new Error(`TTS Error: ${String(l)}`);throw(i=n==null?void 0:n.onError)==null||i.call(n,r),r}}stop(){this.currentAudio&&(this.currentAudio.pause(),this.currentAudio.currentTime=0,this.currentAudio=null)}isPlaying(){return this.currentAudio!==null&&!this.currentAudio.paused}}const p3=new jy,Vy=(e={})=>{const[t,n]=y.useState(!1),[a,i]=y.useState(!1),[l,r]=y.useState(null),s=y.useCallback(async u=>{var f;try{r(null),i(!0),await p3.play(u,{onStart:()=>{var h;i(!1),n(!0),(h=e.onStart)==null||h.call(e)},onEnd:()=>{var h;n(!1),(h=e.onEnd)==null||h.call(e)},onError:h=>{var d;n(!1),i(!1),r(h),(d=e.onError)==null||d.call(e,h)}})}catch(h){const d=h instanceof Error?h:new Error(String(h));throw r(d),n(!1),i(!1),(f=e.onError)==null||f.call(e,d),d}},[e]),c=y.useCallback(()=>{p3.stop(),n(!1),i(!1)},[]);return{speak:s,stop:c,isPlaying:t,isLoading:a,error:l}},qy=({onViolation:e,onEnd:t,maxViolations:n=5})=>{const{addViolation:a}=$m(),i=Rm(),l=Pm(),r=y.useRef(l);y.useEffect(()=>{r.current=l},[l]);const s=y.useCallback(u=>{t&&t(u,r.current)},[t]);return{logViolation:y.useCallback(({type:u,severity:f,details:h})=>{const d={id:l6(),type:u,severity:f,details:h,timestamp:Date.now()};a(d);const g=r.current+1;e&&e(d,g),g>=n&&s("excessive_violations")},[a,e,n,s]),onInterviewEnd:s,violationCount:l,logList:i}},Fy=()=>{y.useEffect(()=>{function e(){console.clear(),console.log(`
37
29
  %c
38
30
  ╔═══════════════════════════════════════════════════════════════════════╗
39
31
  ║ ║
@@ -79,7 +71,7 @@
79
71
  │ │
80
72
  │ 💡 IMMEDIATE ACTION REQUIRED: │
81
73
  │ Close developer tools to continue interview │
82
- └─────────────────────────────────────────────────────────────┘`,"color: #ffd93d; font-size: 14px; font-family: monospace; background: rgba(255, 217, 61, 0.1); padding: 10px;")}const t={open:!1,orientation:null},n=160,i=setInterval(()=>{window.outerHeight-window.innerHeight>n||window.outerWidth-window.innerWidth>n?t.open||(t.open=!0,t.orientation=window.outerWidth-window.innerWidth>n?"vertical":"horizontal",e()):t.open&&(t.open=!1,console.log("%c🌟 Developer tools closed. Interview continues smoothly! ✨","color: #4ecdc4; font-weight: bold; text-shadow: 0 0 10px #4ecdc4;"))},500),a=s=>{if(s.keyCode===123||s.ctrlKey&&s.shiftKey&&(s.keyCode===73||s.keyCode===74)||s.ctrlKey&&s.keyCode===85)return s.preventDefault(),console.log("%c🎭 Nice try! Keyboard shortcuts are disabled during interviews ✨","color: #ffd93d; font-weight: bold; text-shadow: 0 0 10px #ffd93d;"),!1},l=s=>(s.preventDefault(),console.log("%c🌈 Right-click menu disabled for interview integrity! 🎪","color: #ff9ff3; font-weight: bold; text-shadow: 0 0 10px #ff9ff3;"),!1);return document.addEventListener("keydown",a),document.addEventListener("contextmenu",l),()=>{clearInterval(i),document.removeEventListener("keydown",a),document.removeEventListener("contextmenu",l),delete window.showStats,delete window.interviewTips}},[])};var S3={exports:{}},fu={},E3={exports:{}},_3={};/**
74
+ └─────────────────────────────────────────────────────────────┘`,"color: #ffd93d; font-size: 14px; font-family: monospace; background: rgba(255, 217, 61, 0.1); padding: 10px;")}const t={open:!1,orientation:null},n=160,a=setInterval(()=>{window.outerHeight-window.innerHeight>n||window.outerWidth-window.innerWidth>n?t.open||(t.open=!0,t.orientation=window.outerWidth-window.innerWidth>n?"vertical":"horizontal",e()):t.open&&(t.open=!1,console.log("%c🌟 Developer tools closed. Interview continues smoothly! ✨","color: #4ecdc4; font-weight: bold; text-shadow: 0 0 10px #4ecdc4;"))},500),i=r=>{if(r.keyCode===123||r.ctrlKey&&r.shiftKey&&(r.keyCode===73||r.keyCode===74)||r.ctrlKey&&r.keyCode===85)return r.preventDefault(),console.log("%c🎭 Nice try! Keyboard shortcuts are disabled during interviews ✨","color: #ffd93d; font-weight: bold; text-shadow: 0 0 10px #ffd93d;"),!1},l=r=>(r.preventDefault(),console.log("%c🌈 Right-click menu disabled for interview integrity! 🎪","color: #ff9ff3; font-weight: bold; text-shadow: 0 0 10px #ff9ff3;"),!1);return document.addEventListener("keydown",i),document.addEventListener("contextmenu",l),()=>{clearInterval(a),document.removeEventListener("keydown",i),document.removeEventListener("contextmenu",l),delete window.showStats,delete window.interviewTips}},[])};var v3={exports:{}},co={},b3={exports:{}},S3={};/**
83
75
  * @license React
84
76
  * scheduler.production.js
85
77
  *
@@ -87,7 +79,7 @@
87
79
  *
88
80
  * This source code is licensed under the MIT license found in the
89
81
  * LICENSE file in the root directory of this source tree.
90
- */(function(e){function t(j,G){var R=j.length;j.push(G);e:for(;0<R;){var $=R-1>>>1,se=j[$];if(0<a(se,G))j[$]=G,j[R]=se,R=$;else break e}}function n(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var G=j[0],R=j.pop();if(R!==G){j[0]=R;e:for(var $=0,se=j.length,ut=se>>>1;$<ut;){var bn=2*($+1)-1,fn=j[bn],Xt=bn+1,ot=j[Xt];if(0>a(fn,R))Xt<se&&0>a(ot,fn)?(j[$]=ot,j[Xt]=R,$=Xt):(j[$]=fn,j[bn]=R,$=bn);else if(Xt<se&&0>a(ot,R))j[$]=ot,j[Xt]=R,$=Xt;else break e}}return G}function a(j,G){var R=j.sortIndex-G.sortIndex;return R!==0?R:j.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,r=s.now();e.unstable_now=function(){return s.now()-r}}var o=[],c=[],f=1,h=null,d=3,m=!1,v=!1,x=!1,E=!1,g=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;function b(j){for(var G=n(c);G!==null;){if(G.callback===null)i(c);else if(G.startTime<=j)i(c),G.sortIndex=G.expirationTime,t(o,G);else break;G=n(c)}}function A(j){if(x=!1,b(j),!v)if(n(o)!==null)v=!0,N||(N=!0,Re());else{var G=n(c);G!==null&&xt(A,G.startTime-j)}}var N=!1,_=-1,M=5,T=-1;function D(){return E?!0:!(e.unstable_now()-T<M)}function Ee(){if(E=!1,N){var j=e.unstable_now();T=j;var G=!0;try{e:{v=!1,x&&(x=!1,w(_),_=-1),m=!0;var R=d;try{t:{for(b(j),h=n(o);h!==null&&!(h.expirationTime>j&&D());){var $=h.callback;if(typeof $=="function"){h.callback=null,d=h.priorityLevel;var se=$(h.expirationTime<=j);if(j=e.unstable_now(),typeof se=="function"){h.callback=se,b(j),G=!0;break t}h===n(o)&&i(o),b(j)}else i(o);h=n(o)}if(h!==null)G=!0;else{var ut=n(c);ut!==null&&xt(A,ut.startTime-j),G=!1}}break e}finally{h=null,d=R,m=!1}G=void 0}}finally{G?Re():N=!1}}}var Re;if(typeof p=="function")Re=function(){p(Ee)};else if(typeof MessageChannel<"u"){var rt=new MessageChannel,cn=rt.port2;rt.port1.onmessage=Ee,Re=function(){cn.postMessage(null)}}else Re=function(){g(Ee,0)};function xt(j,G){_=g(function(){j(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(j){switch(d){case 1:case 2:case 3:var G=3;break;default:G=d}var R=d;d=G;try{return j()}finally{d=R}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(j,G){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var R=d;d=j;try{return G()}finally{d=R}},e.unstable_scheduleCallback=function(j,G,R){var $=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?$+R:$):R=$,j){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=R+se,j={id:f++,callback:G,priorityLevel:j,startTime:R,expirationTime:se,sortIndex:-1},R>$?(j.sortIndex=R,t(c,j),n(o)===null&&j===n(c)&&(x?(w(_),_=-1):x=!0,xt(A,R-$))):(j.sortIndex=se,t(o,j),v||m||(v=!0,N||(N=!0,Re()))),j},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(j){var G=d;return function(){var R=d;d=G;try{return j.apply(this,arguments)}finally{d=R}}}})(_3),E3.exports=_3;var Ky=E3.exports;/**
82
+ */(function(e){function t(M,j){var H=M.length;M.push(j);e:for(;0<H;){var $=H-1>>>1,re=M[$];if(0<i(re,j))M[$]=j,M[H]=re,H=$;else break e}}function n(M){return M.length===0?null:M[0]}function a(M){if(M.length===0)return null;var j=M[0],H=M.pop();if(H!==j){M[0]=H;e:for(var $=0,re=M.length,ot=re>>>1;$<ot;){var bn=2*($+1)-1,fn=M[bn],Qt=bn+1,ct=M[Qt];if(0>i(fn,H))Qt<re&&0>i(ct,fn)?(M[$]=ct,M[Qt]=H,$=Qt):(M[$]=fn,M[bn]=H,$=bn);else if(Qt<re&&0>i(ct,H))M[$]=ct,M[Qt]=H,$=Qt;else break e}}return j}function i(M,j){var H=M.sortIndex-j.sortIndex;return H!==0?H:M.id-j.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var r=Date,s=r.now();e.unstable_now=function(){return r.now()-s}}var c=[],u=[],f=1,h=null,d=3,g=!1,v=!1,S=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;function b(M){for(var j=n(u);j!==null;){if(j.callback===null)a(u);else if(j.startTime<=M)a(u),j.sortIndex=j.expirationTime,t(c,j);else break;j=n(u)}}function T(M){if(S=!1,b(M),!v)if(n(c)!==null)v=!0,N||(N=!0,He());else{var j=n(u);j!==null&&St(T,j.startTime-M)}}var N=!1,x=-1,C=5,A=-1;function O(){return _?!0:!(e.unstable_now()-A<C)}function _e(){if(_=!1,N){var M=e.unstable_now();A=M;var j=!0;try{e:{v=!1,S&&(S=!1,m(x),x=-1),g=!0;var H=d;try{t:{for(b(M),h=n(c);h!==null&&!(h.expirationTime>M&&O());){var $=h.callback;if(typeof $=="function"){h.callback=null,d=h.priorityLevel;var re=$(h.expirationTime<=M);if(M=e.unstable_now(),typeof re=="function"){h.callback=re,b(M),j=!0;break t}h===n(c)&&a(c),b(M)}else a(c);h=n(c)}if(h!==null)j=!0;else{var ot=n(u);ot!==null&&St(T,ot.startTime-M),j=!1}}break e}finally{h=null,d=H,g=!1}j=void 0}}finally{j?He():N=!1}}}var He;if(typeof p=="function")He=function(){p(_e)};else if(typeof MessageChannel<"u"){var st=new MessageChannel,un=st.port2;st.port1.onmessage=_e,He=function(){un.postMessage(null)}}else He=function(){w(_e,0)};function St(M,j){x=w(function(){M(e.unstable_now())},j)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(M){switch(d){case 1:case 2:case 3:var j=3;break;default:j=d}var H=d;d=j;try{return M()}finally{d=H}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(M,j){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var H=d;d=M;try{return j()}finally{d=H}},e.unstable_scheduleCallback=function(M,j,H){var $=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?$+H:$):H=$,M){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=H+re,M={id:f++,callback:j,priorityLevel:M,startTime:H,expirationTime:re,sortIndex:-1},H>$?(M.sortIndex=H,t(u,M),n(c)===null&&M===n(u)&&(S?(m(x),x=-1):S=!0,St(T,H-$))):(M.sortIndex=re,t(c,M),v||g||(v=!0,N||(N=!0,He()))),M},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(M){var j=d;return function(){var H=d;d=j;try{return M.apply(this,arguments)}finally{d=H}}}})(S3),b3.exports=S3;var Yy=b3.exports;/**
91
83
  * @license React
92
84
  * react-dom-client.production.js
93
85
  *
@@ -95,15 +87,15 @@
95
87
  *
96
88
  * This source code is licensed under the MIT license found in the
97
89
  * LICENSE file in the root directory of this source tree.
98
- */var qe=Ky,T3=y,Iy=Zi;function S(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function A3(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Es(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function N3(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function j3(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function M3(e){if(Es(e)!==e)throw Error(S(188))}function Jy(e){var t=e.alternate;if(!t){if(t=Es(e),t===null)throw Error(S(188));return t!==e?null:e}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var l=a.alternate;if(l===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===l.child){for(l=a.child;l;){if(l===n)return M3(a),e;if(l===i)return M3(a),t;l=l.sibling}throw Error(S(188))}if(n.return!==i.return)n=a,i=l;else{for(var s=!1,r=a.child;r;){if(r===n){s=!0,n=a,i=l;break}if(r===i){s=!0,i=a,n=l;break}r=r.sibling}if(!s){for(r=l.child;r;){if(r===n){s=!0,n=l,i=a;break}if(r===i){s=!0,i=l,n=a;break}r=r.sibling}if(!s)throw Error(S(189))}}if(n.alternate!==i)throw Error(S(190))}if(n.tag!==3)throw Error(S(188));return n.stateNode.current===n?e:t}function C3(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C3(e),t!==null)return t;e=e.sibling}return null}var oe=Object.assign,Wy=Symbol.for("react.element"),du=Symbol.for("react.transitional.element"),_s=Symbol.for("react.portal"),ul=Symbol.for("react.fragment"),D3=Symbol.for("react.strict_mode"),Ef=Symbol.for("react.profiler"),O3=Symbol.for("react.consumer"),Fn=Symbol.for("react.context"),_f=Symbol.for("react.forward_ref"),Tf=Symbol.for("react.suspense"),Af=Symbol.for("react.suspense_list"),Nf=Symbol.for("react.memo"),vi=Symbol.for("react.lazy"),jf=Symbol.for("react.activity"),Py=Symbol.for("react.memo_cache_sentinel"),z3=Symbol.iterator;function Ts(e){return e===null||typeof e!="object"?null:(e=z3&&e[z3]||e["@@iterator"],typeof e=="function"?e:null)}var $y=Symbol.for("react.client.reference");function Mf(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$y?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ul:return"Fragment";case Ef:return"Profiler";case D3:return"StrictMode";case Tf:return"Suspense";case Af:return"SuspenseList";case jf:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _s:return"Portal";case Fn:return e.displayName||"Context";case O3:return(e._context.displayName||"Context")+".Consumer";case _f:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nf:return t=e.displayName||null,t!==null?t:Mf(e.type)||"Memo";case vi:t=e._payload,e=e._init;try{return Mf(e(t))}catch{}}return null}var As=Array.isArray,B=T3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=Iy.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oa={pending:!1,data:null,method:null,action:null},Cf=[],ol=-1;function Dn(e){return{current:e}}function Ke(e){0>ol||(e.current=Cf[ol],Cf[ol]=null,ol--)}function ue(e,t){ol++,Cf[ol]=e.current,e.current=t}var On=Dn(null),Ns=Dn(null),bi=Dn(null),hu=Dn(null);function mu(e,t){switch(ue(bi,t),ue(Ns,e),ue(On,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?aw(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=aw(t),e=lw(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ke(On),ue(On,e)}function cl(){Ke(On),Ke(Ns),Ke(bi)}function Df(e){e.memoizedState!==null&&ue(hu,e);var t=On.current,n=lw(t,e.type);t!==n&&(ue(Ns,e),ue(On,n))}function gu(e){Ns.current===e&&(Ke(On),Ke(Ns)),hu.current===e&&(Ke(hu),wr._currentValue=oa)}var Of,k3;function ca(e){if(Of===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Of=t&&t[1]||"",k3=-1<n.stack.indexOf(`
90
+ */var Fe=Yy,E3=y,Xy=W2;function E(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function _3(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Er(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function x3(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function A3(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function T3(e){if(Er(e)!==e)throw Error(E(188))}function Qy(e){var t=e.alternate;if(!t){if(t=Er(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return T3(i),e;if(l===a)return T3(i),t;l=l.sibling}throw Error(E(188))}if(n.return!==a.return)n=i,a=l;else{for(var r=!1,s=i.child;s;){if(s===n){r=!0,n=i,a=l;break}if(s===a){r=!0,a=i,n=l;break}s=s.sibling}if(!r){for(s=l.child;s;){if(s===n){r=!0,n=l,a=i;break}if(s===a){r=!0,a=l,n=i;break}s=s.sibling}if(!r)throw Error(E(189))}}if(n.alternate!==a)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function N3(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=N3(e),t!==null)return t;e=e.sibling}return null}var ce=Object.assign,Ky=Symbol.for("react.element"),uo=Symbol.for("react.transitional.element"),_r=Symbol.for("react.portal"),sl=Symbol.for("react.fragment"),M3=Symbol.for("react.strict_mode"),Sf=Symbol.for("react.profiler"),C3=Symbol.for("react.consumer"),Yn=Symbol.for("react.context"),Ef=Symbol.for("react.forward_ref"),_f=Symbol.for("react.suspense"),xf=Symbol.for("react.suspense_list"),Af=Symbol.for("react.memo"),va=Symbol.for("react.lazy"),Tf=Symbol.for("react.activity"),Zy=Symbol.for("react.memo_cache_sentinel"),D3=Symbol.iterator;function xr(e){return e===null||typeof e!="object"?null:(e=D3&&e[D3]||e["@@iterator"],typeof e=="function"?e:null)}var Iy=Symbol.for("react.client.reference");function Nf(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Iy?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sl:return"Fragment";case Sf:return"Profiler";case M3:return"StrictMode";case _f:return"Suspense";case xf:return"SuspenseList";case Tf:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _r:return"Portal";case Yn:return e.displayName||"Context";case C3:return(e._context.displayName||"Context")+".Consumer";case Ef:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Af:return t=e.displayName||null,t!==null?t:Nf(e.type)||"Memo";case va:t=e._payload,e=e._init;try{return Nf(e(t))}catch{}}return null}var Ar=Array.isArray,G=E3.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=Xy.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oi={pending:!1,data:null,method:null,action:null},Mf=[],ol=-1;function On(e){return{current:e}}function Ie(e){0>ol||(e.current=Mf[ol],Mf[ol]=null,ol--)}function oe(e,t){ol++,Mf[ol]=e.current,e.current=t}var zn=On(null),Tr=On(null),ba=On(null),fo=On(null);function ho(e,t){switch(oe(ba,t),oe(Tr,e),oe(zn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?tm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=tm(t),e=nm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ie(zn),oe(zn,e)}function cl(){Ie(zn),Ie(Tr),Ie(ba)}function Cf(e){e.memoizedState!==null&&oe(fo,e);var t=zn.current,n=nm(t,e.type);t!==n&&(oe(Tr,e),oe(zn,n))}function go(e){Tr.current===e&&(Ie(zn),Ie(Tr)),fo.current===e&&(Ie(fo),ws._currentValue=oi)}var Df,O3;function ci(e){if(Df===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Df=t&&t[1]||"",O3=-1<n.stack.indexOf(`
99
91
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
100
- `+Of+e+k3}var zf=!1;function kf(e,t){if(!e||zf)return"";zf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(m){var d=m}Reflect.construct(e,[],h)}else{try{h.call()}catch(m){d=m}e.call(h.prototype)}}else{try{throw Error()}catch(m){d=m}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(m){if(m&&d&&typeof m.stack=="string")return[m.stack,d.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=i.DetermineComponentFrameRoot(),s=l[0],r=l[1];if(s&&r){var o=s.split(`
101
- `),c=r.split(`
102
- `);for(a=i=0;i<o.length&&!o[i].includes("DetermineComponentFrameRoot");)i++;for(;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;if(i===o.length||a===c.length)for(i=o.length-1,a=c.length-1;1<=i&&0<=a&&o[i]!==c[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==c[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==c[a]){var f=`
103
- `+o[i].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=i&&0<=a);break}}}finally{zf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ca(n):""}function ep(e,t){switch(e.tag){case 26:case 27:case 5:return ca(e.type);case 16:return ca("Lazy");case 13:return e.child!==t&&t!==null?ca("Suspense Fallback"):ca("Suspense");case 19:return ca("SuspenseList");case 0:case 15:return kf(e.type,!1);case 11:return kf(e.type.render,!1);case 1:return kf(e.type,!0);case 31:return ca("Activity");default:return""}}function L3(e){try{var t="",n=null;do t+=ep(e,n),n=e,e=e.return;while(e);return t}catch(i){return`
104
- Error generating stack: `+i.message+`
105
- `+i.stack}}var Lf=Object.prototype.hasOwnProperty,Uf=qe.unstable_scheduleCallback,Bf=qe.unstable_cancelCallback,tp=qe.unstable_shouldYield,np=qe.unstable_requestPaint,Lt=qe.unstable_now,ip=qe.unstable_getCurrentPriorityLevel,U3=qe.unstable_ImmediatePriority,B3=qe.unstable_UserBlockingPriority,wu=qe.unstable_NormalPriority,ap=qe.unstable_LowPriority,R3=qe.unstable_IdlePriority,lp=qe.log,sp=qe.unstable_setDisableYieldValue,js=null,Ut=null;function xi(e){if(typeof lp=="function"&&sp(e),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(js,e)}catch{}}var Bt=Math.clz32?Math.clz32:op,rp=Math.log,up=Math.LN2;function op(e){return e>>>=0,e===0?32:31-(rp(e)/up|0)|0}var yu=256,pu=262144,vu=4194304;function fa(e){var t=e&42;if(t!==0)return t;switch(e&-e){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function bu(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var a=0,l=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var r=i&134217727;return r!==0?(i=r&~l,i!==0?a=fa(i):(s&=r,s!==0?a=fa(s):n||(n=r&~e,n!==0&&(a=fa(n))))):(r=i&~l,r!==0?a=fa(r):s!==0?a=fa(s):n||(n=i&~e,n!==0&&(a=fa(n)))),a===0?0:t!==0&&t!==a&&!(t&l)&&(l=a&-a,n=t&-t,l>=n||l===32&&(n&4194048)!==0)?t:a}function Ms(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function cp(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function G3(){var e=vu;return vu<<=1,!(vu&62914560)&&(vu=4194304),e}function Rf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Cs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fp(e,t,n,i,a,l){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,o=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var f=31-Bt(n),h=1<<f;r[f]=0,o[f]=-1;var d=c[f];if(d!==null)for(c[f]=null,f=0;f<d.length;f++){var m=d[f];m!==null&&(m.lane&=-536870913)}n&=~h}i!==0&&H3(e,i,0),l!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=l&~(s&~t))}function H3(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Bt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&261930}function V3(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Bt(n),a=1<<i;a&t|e[i]&t&&(e[i]|=t),n&=~a}}function q3(e,t){var n=t&-t;return n=n&42?1:Gf(n),n&(e.suspendedLanes|t)?0:n}function Gf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Hf(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function F3(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:jw(e.type))}function Y3(e,t){var n=W.p;try{return W.p=e,t()}finally{W.p=n}}var Si=Math.random().toString(36).slice(2),Pe="__reactFiber$"+Si,mt="__reactProps$"+Si,fl="__reactContainer$"+Si,Vf="__reactEvents$"+Si,dp="__reactListeners$"+Si,hp="__reactHandles$"+Si,X3="__reactResources$"+Si,Ds="__reactMarker$"+Si;function qf(e){delete e[Pe],delete e[mt],delete e[Vf],delete e[dp],delete e[hp]}function dl(e){var t=e[Pe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fl]||n[Pe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=dw(e);e!==null;){if(n=e[Pe])return n;e=dw(e)}return t}e=n,n=e.parentNode}return null}function hl(e){if(e=e[Pe]||e[fl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Os(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(S(33))}function ml(e){var t=e[X3];return t||(t=e[X3]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ie(e){e[Ds]=!0}var Q3=new Set,Z3={};function da(e,t){gl(e,t),gl(e+"Capture",t)}function gl(e,t){for(Z3[e]=t,e=0;e<t.length;e++)Q3.add(t[e])}var mp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),K3={},I3={};function gp(e){return Lf.call(I3,e)?!0:Lf.call(K3,e)?!1:mp.test(e)?I3[e]=!0:(K3[e]=!0,!1)}function xu(e,t,n){if(gp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Su(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Yn(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}function $t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function J3(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wp(e,t,n){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var a=i.get,l=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){n=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ff(e){if(!e._valueTracker){var t=J3(e)?"checked":"value";e._valueTracker=wp(e,t,""+e[t])}}function W3(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=J3(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function Eu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var yp=/[\n"\\]/g;function en(e){return e.replace(yp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Yf(e,t,n,i,a,l,s,r){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+$t(t)):e.value!==""+$t(t)&&(e.value=""+$t(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Xf(e,s,$t(t)):n!=null?Xf(e,s,$t(n)):i!=null&&e.removeAttribute("value"),a==null&&l!=null&&(e.defaultChecked=!!l),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+$t(r):e.removeAttribute("name")}function P3(e,t,n,i,a,l,s,r){if(l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.type=l),t!=null||n!=null){if(!(l!=="submit"&&l!=="reset"||t!=null)){Ff(e);return}n=n!=null?""+$t(n):"",t=t!=null?""+$t(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}i=i??a,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=r?e.checked:!!i,e.defaultChecked=!!i,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Ff(e)}function Xf(e,t,n){t==="number"&&Eu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wl(e,t,n,i){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&i&&(e[n].defaultSelected=!0)}else{for(n=""+$t(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function $3(e,t,n){if(t!=null&&(t=""+$t(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+$t(n):""}function e4(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(S(92));if(As(i)){if(1<i.length)throw Error(S(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=$t(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i),Ff(e)}function yl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function t4(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||pp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function n4(e,t,n){if(t!=null&&typeof t!="object")throw Error(S(62));if(e=e.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var a in t)i=t[a],t.hasOwnProperty(a)&&n[a]!==i&&t4(e,a,i)}else for(var l in t)t.hasOwnProperty(l)&&t4(e,l,t[l])}function Qf(e){if(e.indexOf("-")===-1)return!1;switch(e){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 vp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),bp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function _u(e){return bp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xn(){}var Zf=null;function Kf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pl=null,vl=null;function i4(e){var t=hl(e);if(t&&(e=t.stateNode)){var n=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Yf(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+en(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=i[mt]||null;if(!a)throw Error(S(90));Yf(i,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&W3(i)}break e;case"textarea":$3(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&wl(e,!!n.multiple,t,!1)}}}var If=!1;function a4(e,t,n){if(If)return e(t,n);If=!0;try{var i=e(t);return i}finally{if(If=!1,(pl!==null||vl!==null)&&(fo(),pl&&(t=pl,e=vl,vl=pl=null,i4(t),e)))for(t=0;t<e.length;t++)i4(e[t])}}function zs(e,t){var n=e.stateNode;if(n===null)return null;var i=n[mt]||null;if(i===null)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(S(231,t,typeof n));return n}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jf=!1;if(Qn)try{var ks={};Object.defineProperty(ks,"passive",{get:function(){Jf=!0}}),window.addEventListener("test",ks,ks),window.removeEventListener("test",ks,ks)}catch{Jf=!1}var Ei=null,Wf=null,Tu=null;function l4(){if(Tu)return Tu;var e,t=Wf,n=t.length,i,a="value"in Ei?Ei.value:Ei.textContent,l=a.length;for(e=0;e<n&&t[e]===a[e];e++);var s=n-e;for(i=1;i<=s&&t[n-i]===a[l-i];i++);return Tu=a.slice(e,1<i?1-i:void 0)}function Au(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nu(){return!0}function s4(){return!1}function gt(e){function t(n,i,a,l,s){this._reactName=n,this._targetInst=a,this.type=i,this.nativeEvent=l,this.target=s,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(l):l[r]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?Nu:s4,this.isPropagationStopped=s4,this}return oe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Nu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Nu)},persist:function(){},isPersistent:Nu}),t}var ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ju=gt(ha),Ls=oe({},ha,{view:0,detail:0}),xp=gt(Ls),Pf,$f,Us,Mu=oe({},Ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:td,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Us&&(Us&&e.type==="mousemove"?(Pf=e.screenX-Us.screenX,$f=e.screenY-Us.screenY):$f=Pf=0,Us=e),Pf)},movementY:function(e){return"movementY"in e?e.movementY:$f}}),r4=gt(Mu),Sp=oe({},Mu,{dataTransfer:0}),Ep=gt(Sp),_p=oe({},Ls,{relatedTarget:0}),ed=gt(_p),Tp=oe({},ha,{animationName:0,elapsedTime:0,pseudoElement:0}),Ap=gt(Tp),Np=oe({},ha,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jp=gt(Np),Mp=oe({},ha,{data:0}),u4=gt(Mp),Cp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dp={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"},Op={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Op[e])?!!t[e]:!1}function td(){return zp}var kp=oe({},Ls,{key:function(e){if(e.key){var t=Cp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Au(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:td,charCode:function(e){return e.type==="keypress"?Au(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Au(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lp=gt(kp),Up=oe({},Mu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),o4=gt(Up),Bp=oe({},Ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:td}),Rp=gt(Bp),Gp=oe({},ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hp=gt(Gp),Vp=oe({},Mu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),qp=gt(Vp),Fp=oe({},ha,{newState:0,oldState:0}),Yp=gt(Fp),Xp=[9,13,27,32],nd=Qn&&"CompositionEvent"in window,Bs=null;Qn&&"documentMode"in document&&(Bs=document.documentMode);var Qp=Qn&&"TextEvent"in window&&!Bs,c4=Qn&&(!nd||Bs&&8<Bs&&11>=Bs),f4=" ",d4=!1;function h4(e,t){switch(e){case"keyup":return Xp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function m4(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bl=!1;function Zp(e,t){switch(e){case"compositionend":return m4(t);case"keypress":return t.which!==32?null:(d4=!0,f4);case"textInput":return e=t.data,e===f4&&d4?null:e;default:return null}}function Kp(e,t){if(bl)return e==="compositionend"||!nd&&h4(e,t)?(e=l4(),Tu=Wf=Ei=null,bl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return c4&&t.locale!=="ko"?null:t.data;default:return null}}var Ip={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 g4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ip[e.type]:t==="textarea"}function w4(e,t,n,i){pl?vl?vl.push(i):vl=[i]:pl=i,t=vo(t,"onChange"),0<t.length&&(n=new ju("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var Rs=null,Gs=null;function Jp(e){Pg(e,0)}function Cu(e){var t=Os(e);if(W3(t))return e}function y4(e,t){if(e==="change")return t}var p4=!1;if(Qn){var id;if(Qn){var ad="oninput"in document;if(!ad){var v4=document.createElement("div");v4.setAttribute("oninput","return;"),ad=typeof v4.oninput=="function"}id=ad}else id=!1;p4=id&&(!document.documentMode||9<document.documentMode)}function b4(){Rs&&(Rs.detachEvent("onpropertychange",x4),Gs=Rs=null)}function x4(e){if(e.propertyName==="value"&&Cu(Gs)){var t=[];w4(t,Gs,e,Kf(e)),a4(Jp,t)}}function Wp(e,t,n){e==="focusin"?(b4(),Rs=t,Gs=n,Rs.attachEvent("onpropertychange",x4)):e==="focusout"&&b4()}function Pp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Cu(Gs)}function $p(e,t){if(e==="click")return Cu(t)}function ev(e,t){if(e==="input"||e==="change")return Cu(t)}function tv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rt=typeof Object.is=="function"?Object.is:tv;function Hs(e,t){if(Rt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var a=n[i];if(!Lf.call(t,a)||!Rt(e[a],t[a]))return!1}return!0}function S4(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function E4(e,t){var n=S4(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=S4(n)}}function _4(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_4(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function T4(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Eu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Eu(e.document)}return t}function ld(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var nv=Qn&&"documentMode"in document&&11>=document.documentMode,xl=null,sd=null,Vs=null,rd=!1;function A4(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;rd||xl==null||xl!==Eu(i)||(i=xl,"selectionStart"in i&&ld(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Vs&&Hs(Vs,i)||(Vs=i,i=vo(sd,"onSelect"),0<i.length&&(t=new ju("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=xl)))}function ma(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sl={animationend:ma("Animation","AnimationEnd"),animationiteration:ma("Animation","AnimationIteration"),animationstart:ma("Animation","AnimationStart"),transitionrun:ma("Transition","TransitionRun"),transitionstart:ma("Transition","TransitionStart"),transitioncancel:ma("Transition","TransitionCancel"),transitionend:ma("Transition","TransitionEnd")},ud={},N4={};Qn&&(N4=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function ga(e){if(ud[e])return ud[e];if(!Sl[e])return e;var t=Sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in N4)return ud[e]=t[n];return e}var j4=ga("animationend"),M4=ga("animationiteration"),C4=ga("animationstart"),iv=ga("transitionrun"),av=ga("transitionstart"),lv=ga("transitioncancel"),D4=ga("transitionend"),O4=new Map,od="abort auxClick beforeToggle 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(" ");od.push("scrollEnd");function yn(e,t){O4.set(e,t),da(t,[e])}var Du=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},tn=[],El=0,cd=0;function Ou(){for(var e=El,t=cd=El=0;t<e;){var n=tn[t];tn[t++]=null;var i=tn[t];tn[t++]=null;var a=tn[t];tn[t++]=null;var l=tn[t];if(tn[t++]=null,i!==null&&a!==null){var s=i.pending;s===null?a.next=a:(a.next=s.next,s.next=a),i.pending=a}l!==0&&z4(n,a,l)}}function zu(e,t,n,i){tn[El++]=e,tn[El++]=t,tn[El++]=n,tn[El++]=i,cd|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function fd(e,t,n,i){return zu(e,t,n,i),ku(e)}function wa(e,t){return zu(e,null,null,t),ku(e)}function z4(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var a=!1,l=e.return;l!==null;)l.childLanes|=n,i=l.alternate,i!==null&&(i.childLanes|=n),l.tag===22&&(e=l.stateNode,e===null||e._visibility&1||(a=!0)),e=l,l=l.return;return e.tag===3?(l=e.stateNode,a&&t!==null&&(a=31-Bt(n),e=l.hiddenUpdates,i=e[a],i===null?e[a]=[t]:i.push(t),t.lane=n|536870912),l):null}function ku(e){if(50<or)throw or=0,b2=null,Error(S(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _l={};function sv(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gt(e,t,n,i){return new sv(e,t,n,i)}function dd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,t){var n=e.alternate;return n===null?(n=Gt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function k4(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Lu(e,t,n,i,a,l){var s=0;if(i=e,typeof e=="function")dd(e)&&(s=1);else if(typeof e=="string")s=f8(e,n,On.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case jf:return e=Gt(31,n,t,a),e.elementType=jf,e.lanes=l,e;case ul:return ya(n.children,a,l,t);case D3:s=8,a|=24;break;case Ef:return e=Gt(12,n,t,a|2),e.elementType=Ef,e.lanes=l,e;case Tf:return e=Gt(13,n,t,a),e.elementType=Tf,e.lanes=l,e;case Af:return e=Gt(19,n,t,a),e.elementType=Af,e.lanes=l,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fn:s=10;break e;case O3:s=9;break e;case _f:s=11;break e;case Nf:s=14;break e;case vi:s=16,i=null;break e}s=29,n=Error(S(130,e===null?"null":typeof e,"")),i=null}return t=Gt(s,n,t,a),t.elementType=e,t.type=i,t.lanes=l,t}function ya(e,t,n,i){return e=Gt(7,e,i,t),e.lanes=n,e}function hd(e,t,n){return e=Gt(6,e,null,t),e.lanes=n,e}function L4(e){var t=Gt(18,null,null,0);return t.stateNode=e,t}function md(e,t,n){return t=Gt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var U4=new WeakMap;function nn(e,t){if(typeof e=="object"&&e!==null){var n=U4.get(e);return n!==void 0?n:(t={value:e,source:t,stack:L3(t)},U4.set(e,t),t)}return{value:e,source:t,stack:L3(t)}}var Tl=[],Al=0,Uu=null,qs=0,an=[],ln=0,_i=null,zn=1,kn="";function Kn(e,t){Tl[Al++]=qs,Tl[Al++]=Uu,Uu=e,qs=t}function B4(e,t,n){an[ln++]=zn,an[ln++]=kn,an[ln++]=_i,_i=e;var i=zn;e=kn;var a=32-Bt(i)-1;i&=~(1<<a),n+=1;var l=32-Bt(t)+a;if(30<l){var s=a-a%5;l=(i&(1<<s)-1).toString(32),i>>=s,a-=s,zn=1<<32-Bt(t)+a|n<<a|i,kn=l+e}else zn=1<<l|n<<a|i,kn=e}function gd(e){e.return!==null&&(Kn(e,1),B4(e,1,0))}function wd(e){for(;e===Uu;)Uu=Tl[--Al],Tl[Al]=null,qs=Tl[--Al],Tl[Al]=null;for(;e===_i;)_i=an[--ln],an[ln]=null,kn=an[--ln],an[ln]=null,zn=an[--ln],an[ln]=null}function R4(e,t){an[ln++]=zn,an[ln++]=kn,an[ln++]=_i,zn=t.id,kn=t.overflow,_i=e}var $e=null,ce=null,X=!1,Ti=null,sn=!1,yd=Error(S(519));function Ai(e){var t=Error(S(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fs(nn(t,e)),yd}function G4(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[Pe]=e,t[mt]=i,n){case"dialog":F("cancel",t),F("close",t);break;case"iframe":case"object":case"embed":F("load",t);break;case"video":case"audio":for(n=0;n<fr.length;n++)F(fr[n],t);break;case"source":F("error",t);break;case"img":case"image":case"link":F("error",t),F("load",t);break;case"details":F("toggle",t);break;case"input":F("invalid",t),P3(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":F("invalid",t);break;case"textarea":F("invalid",t),e4(t,i.value,i.defaultValue,i.children)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||nw(t.textContent,n)?(i.popover!=null&&(F("beforetoggle",t),F("toggle",t)),i.onScroll!=null&&F("scroll",t),i.onScrollEnd!=null&&F("scrollend",t),i.onClick!=null&&(t.onclick=Xn),t=!0):t=!1,t||Ai(e,!0)}function H4(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:sn=!1;return;case 27:case 3:sn=!0;return;default:$e=$e.return}}function Nl(e){if(e!==$e)return!1;if(!X)return H4(e),X=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||L2(e.type,e.memoizedProps)),n=!n),n&&ce&&Ai(e),H4(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));ce=fw(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));ce=fw(e)}else t===27?(t=ce,Hi(e.type)?(e=H2,H2=null,ce=e):ce=t):ce=$e?un(e.stateNode.nextSibling):null;return!0}function pa(){ce=$e=null,X=!1}function pd(){var e=Ti;return e!==null&&(vt===null?vt=e:vt.push.apply(vt,e),Ti=null),e}function Fs(e){Ti===null?Ti=[e]:Ti.push(e)}var vd=Dn(null),va=null,In=null;function Ni(e,t,n){ue(vd,t._currentValue),t._currentValue=n}function Jn(e){e._currentValue=vd.current,Ke(vd)}function bd(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function xd(e,t,n,i){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var l=a.dependencies;if(l!==null){var s=a.child;l=l.firstContext;e:for(;l!==null;){var r=l;l=a;for(var o=0;o<t.length;o++)if(r.context===t[o]){l.lanes|=n,r=l.alternate,r!==null&&(r.lanes|=n),bd(l.return,n,e),i||(s=null);break e}l=r.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(S(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),bd(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function jl(e,t,n,i){e=null;for(var a=t,l=!1;a!==null;){if(!l){if(a.flags&524288)l=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(S(387));if(s=s.memoizedProps,s!==null){var r=a.type;Rt(a.pendingProps.value,s.value)||(e!==null?e.push(r):e=[r])}}else if(a===hu.current){if(s=a.alternate,s===null)throw Error(S(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(wr):e=[wr])}a=a.return}e!==null&&xd(t,e,n,i),t.flags|=262144}function Bu(e){for(e=e.firstContext;e!==null;){if(!Rt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ba(e){va=e,In=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function et(e){return V4(va,e)}function Ru(e,t){return va===null&&ba(e),V4(e,t)}function V4(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},In===null){if(e===null)throw Error(S(308));In=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else In=In.next=t;return n}var rv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},uv=qe.unstable_scheduleCallback,ov=qe.unstable_NormalPriority,ke={$$typeof:Fn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sd(){return{controller:new rv,data:new Map,refCount:0}}function Ys(e){e.refCount--,e.refCount===0&&uv(ov,function(){e.controller.abort()})}var Xs=null,Ed=0,Ml=0,Cl=null;function cv(e,t){if(Xs===null){var n=Xs=[];Ed=0,Ml=A2(),Cl={status:"pending",value:void 0,then:function(i){n.push(i)}}}return Ed++,t.then(q4,q4),t}function q4(){if(--Ed===0&&Xs!==null){Cl!==null&&(Cl.status="fulfilled");var e=Xs;Xs=null,Ml=0,Cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fv(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(i.status="rejected",i.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),i}var F4=B.S;B.S=function(e,t){Ag=Lt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&cv(e,t),F4!==null&&F4(e,t)};var xa=Dn(null);function _d(){var e=xa.current;return e!==null?e:le.pooledCache}function Gu(e,t){t===null?ue(xa,xa.current):ue(xa,t.pool)}function Y4(){var e=_d();return e===null?null:{parent:ke._currentValue,pool:e}}var Dl=Error(S(460)),Td=Error(S(474)),Hu=Error(S(542)),Vu={then:function(){}};function X4(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Q4(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xn,Xn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,K4(e),e;default:if(typeof t.status=="string")t.then(Xn,Xn);else{if(e=le,e!==null&&100<e.shellSuspendCounter)throw Error(S(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=i}},function(i){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,K4(e),e}throw Ea=t,Dl}}function Sa(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ea=n,Dl):n}}var Ea=null;function Z4(){if(Ea===null)throw Error(S(459));var e=Ea;return Ea=null,e}function K4(e){if(e===Dl||e===Hu)throw Error(S(483))}var Ol=null,Qs=0;function qu(e){var t=Qs;return Qs+=1,Ol===null&&(Ol=[]),Q4(Ol,e,t)}function Zs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fu(e,t){throw t.$$typeof===Wy?Error(S(525)):(e=Object.prototype.toString.call(t),Error(S(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function I4(e){function t(g,w){if(e){var p=g.deletions;p===null?(g.deletions=[w],g.flags|=16):p.push(w)}}function n(g,w){if(!e)return null;for(;w!==null;)t(g,w),w=w.sibling;return null}function i(g){for(var w=new Map;g!==null;)g.key!==null?w.set(g.key,g):w.set(g.index,g),g=g.sibling;return w}function a(g,w){return g=Zn(g,w),g.index=0,g.sibling=null,g}function l(g,w,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<w?(g.flags|=67108866,w):p):(g.flags|=67108866,w)):(g.flags|=1048576,w)}function s(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function r(g,w,p,b){return w===null||w.tag!==6?(w=hd(p,g.mode,b),w.return=g,w):(w=a(w,p),w.return=g,w)}function o(g,w,p,b){var A=p.type;return A===ul?f(g,w,p.props.children,b,p.key):w!==null&&(w.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===vi&&Sa(A)===w.type)?(w=a(w,p.props),Zs(w,p),w.return=g,w):(w=Lu(p.type,p.key,p.props,null,g.mode,b),Zs(w,p),w.return=g,w)}function c(g,w,p,b){return w===null||w.tag!==4||w.stateNode.containerInfo!==p.containerInfo||w.stateNode.implementation!==p.implementation?(w=md(p,g.mode,b),w.return=g,w):(w=a(w,p.children||[]),w.return=g,w)}function f(g,w,p,b,A){return w===null||w.tag!==7?(w=ya(p,g.mode,b,A),w.return=g,w):(w=a(w,p),w.return=g,w)}function h(g,w,p){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=hd(""+w,g.mode,p),w.return=g,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case du:return p=Lu(w.type,w.key,w.props,null,g.mode,p),Zs(p,w),p.return=g,p;case _s:return w=md(w,g.mode,p),w.return=g,w;case vi:return w=Sa(w),h(g,w,p)}if(As(w)||Ts(w))return w=ya(w,g.mode,p,null),w.return=g,w;if(typeof w.then=="function")return h(g,qu(w),p);if(w.$$typeof===Fn)return h(g,Ru(g,w),p);Fu(g,w)}return null}function d(g,w,p,b){var A=w!==null?w.key:null;if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return A!==null?null:r(g,w,""+p,b);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case du:return p.key===A?o(g,w,p,b):null;case _s:return p.key===A?c(g,w,p,b):null;case vi:return p=Sa(p),d(g,w,p,b)}if(As(p)||Ts(p))return A!==null?null:f(g,w,p,b,null);if(typeof p.then=="function")return d(g,w,qu(p),b);if(p.$$typeof===Fn)return d(g,w,Ru(g,p),b);Fu(g,p)}return null}function m(g,w,p,b,A){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return g=g.get(p)||null,r(w,g,""+b,A);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case du:return g=g.get(b.key===null?p:b.key)||null,o(w,g,b,A);case _s:return g=g.get(b.key===null?p:b.key)||null,c(w,g,b,A);case vi:return b=Sa(b),m(g,w,p,b,A)}if(As(b)||Ts(b))return g=g.get(p)||null,f(w,g,b,A,null);if(typeof b.then=="function")return m(g,w,p,qu(b),A);if(b.$$typeof===Fn)return m(g,w,p,Ru(w,b),A);Fu(w,b)}return null}function v(g,w,p,b){for(var A=null,N=null,_=w,M=w=0,T=null;_!==null&&M<p.length;M++){_.index>M?(T=_,_=null):T=_.sibling;var D=d(g,_,p[M],b);if(D===null){_===null&&(_=T);break}e&&_&&D.alternate===null&&t(g,_),w=l(D,w,M),N===null?A=D:N.sibling=D,N=D,_=T}if(M===p.length)return n(g,_),X&&Kn(g,M),A;if(_===null){for(;M<p.length;M++)_=h(g,p[M],b),_!==null&&(w=l(_,w,M),N===null?A=_:N.sibling=_,N=_);return X&&Kn(g,M),A}for(_=i(_);M<p.length;M++)T=m(_,g,M,p[M],b),T!==null&&(e&&T.alternate!==null&&_.delete(T.key===null?M:T.key),w=l(T,w,M),N===null?A=T:N.sibling=T,N=T);return e&&_.forEach(function(Ee){return t(g,Ee)}),X&&Kn(g,M),A}function x(g,w,p,b){if(p==null)throw Error(S(151));for(var A=null,N=null,_=w,M=w=0,T=null,D=p.next();_!==null&&!D.done;M++,D=p.next()){_.index>M?(T=_,_=null):T=_.sibling;var Ee=d(g,_,D.value,b);if(Ee===null){_===null&&(_=T);break}e&&_&&Ee.alternate===null&&t(g,_),w=l(Ee,w,M),N===null?A=Ee:N.sibling=Ee,N=Ee,_=T}if(D.done)return n(g,_),X&&Kn(g,M),A;if(_===null){for(;!D.done;M++,D=p.next())D=h(g,D.value,b),D!==null&&(w=l(D,w,M),N===null?A=D:N.sibling=D,N=D);return X&&Kn(g,M),A}for(_=i(_);!D.done;M++,D=p.next())D=m(_,g,M,D.value,b),D!==null&&(e&&D.alternate!==null&&_.delete(D.key===null?M:D.key),w=l(D,w,M),N===null?A=D:N.sibling=D,N=D);return e&&_.forEach(function(Re){return t(g,Re)}),X&&Kn(g,M),A}function E(g,w,p,b){if(typeof p=="object"&&p!==null&&p.type===ul&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case du:e:{for(var A=p.key;w!==null;){if(w.key===A){if(A=p.type,A===ul){if(w.tag===7){n(g,w.sibling),b=a(w,p.props.children),b.return=g,g=b;break e}}else if(w.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===vi&&Sa(A)===w.type){n(g,w.sibling),b=a(w,p.props),Zs(b,p),b.return=g,g=b;break e}n(g,w);break}else t(g,w);w=w.sibling}p.type===ul?(b=ya(p.props.children,g.mode,b,p.key),b.return=g,g=b):(b=Lu(p.type,p.key,p.props,null,g.mode,b),Zs(b,p),b.return=g,g=b)}return s(g);case _s:e:{for(A=p.key;w!==null;){if(w.key===A)if(w.tag===4&&w.stateNode.containerInfo===p.containerInfo&&w.stateNode.implementation===p.implementation){n(g,w.sibling),b=a(w,p.children||[]),b.return=g,g=b;break e}else{n(g,w);break}else t(g,w);w=w.sibling}b=md(p,g.mode,b),b.return=g,g=b}return s(g);case vi:return p=Sa(p),E(g,w,p,b)}if(As(p))return v(g,w,p,b);if(Ts(p)){if(A=Ts(p),typeof A!="function")throw Error(S(150));return p=A.call(p),x(g,w,p,b)}if(typeof p.then=="function")return E(g,w,qu(p),b);if(p.$$typeof===Fn)return E(g,w,Ru(g,p),b);Fu(g,p)}return typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint"?(p=""+p,w!==null&&w.tag===6?(n(g,w.sibling),b=a(w,p),b.return=g,g=b):(n(g,w),b=hd(p,g.mode,b),b.return=g,g=b),s(g)):n(g,w)}return function(g,w,p,b){try{Qs=0;var A=E(g,w,p,b);return Ol=null,A}catch(_){if(_===Dl||_===Hu)throw _;var N=Gt(29,_,null,g.mode);return N.lanes=b,N.return=g,N}finally{}}}var _a=I4(!0),J4=I4(!1),ji=!1;function Ad(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Mi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ci(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,P&2){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,t=ku(e),z4(e,null,n),t}return zu(e,i,t,n),ku(e)}function Ks(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,V3(e,n)}}function jd(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var a=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};l===null?a=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?a=l=t:l=l.next=t}else a=l=t;n={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:l,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Md=!1;function Is(){if(Md){var e=Cl;if(e!==null)throw e}}function Js(e,t,n,i){Md=!1;var a=e.updateQueue;ji=!1;var l=a.firstBaseUpdate,s=a.lastBaseUpdate,r=a.shared.pending;if(r!==null){a.shared.pending=null;var o=r,c=o.next;o.next=null,s===null?l=c:s.next=c,s=o;var f=e.alternate;f!==null&&(f=f.updateQueue,r=f.lastBaseUpdate,r!==s&&(r===null?f.firstBaseUpdate=c:r.next=c,f.lastBaseUpdate=o))}if(l!==null){var h=a.baseState;s=0,f=c=o=null,r=l;do{var d=r.lane&-536870913,m=d!==r.lane;if(m?(Y&d)===d:(i&d)===d){d!==0&&d===Ml&&(Md=!0),f!==null&&(f=f.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var v=e,x=r;d=t;var E=n;switch(x.tag){case 1:if(v=x.payload,typeof v=="function"){h=v.call(E,h,d);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,d=typeof v=="function"?v.call(E,h,d):v,d==null)break e;h=oe({},h,d);break e;case 2:ji=!0}}d=r.callback,d!==null&&(e.flags|=64,m&&(e.flags|=8192),m=a.callbacks,m===null?a.callbacks=[d]:m.push(d))}else m={lane:d,tag:r.tag,payload:r.payload,callback:r.callback,next:null},f===null?(c=f=m,o=h):f=f.next=m,s|=d;if(r=r.next,r===null){if(r=a.shared.pending,r===null)break;m=r,r=m.next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}while(!0);f===null&&(o=h),a.baseState=o,a.firstBaseUpdate=c,a.lastBaseUpdate=f,l===null&&(a.shared.lanes=0),Li|=s,e.lanes=s,e.memoizedState=h}}function W4(e,t){if(typeof e!="function")throw Error(S(191,e));e.call(t)}function P4(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)W4(n[e],t)}var zl=Dn(null),Yu=Dn(0);function $4(e,t){e=li,ue(Yu,e),ue(zl,t),li=e|t.baseLanes}function Cd(){ue(Yu,li),ue(zl,zl.current)}function Dd(){li=Yu.current,Ke(zl),Ke(Yu)}var Ht=Dn(null),rn=null;function Di(e){var t=e.alternate;ue(je,je.current&1),ue(Ht,e),rn===null&&(t===null||zl.current!==null||t.memoizedState!==null)&&(rn=e)}function Od(e){ue(je,je.current),ue(Ht,e),rn===null&&(rn=e)}function em(e){e.tag===22?(ue(je,je.current),ue(Ht,e),rn===null&&(rn=e)):Oi()}function Oi(){ue(je,je.current),ue(Ht,Ht.current)}function Vt(e){Ke(Ht),rn===e&&(rn=null),Ke(je)}var je=Dn(0);function Xu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||R2(n)||G2(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wn=0,H=null,ie=null,Le=null,Qu=!1,kl=!1,Ta=!1,Zu=0,Ws=0,Ll=null,dv=0;function xe(){throw Error(S(321))}function zd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rt(e[n],t[n]))return!1;return!0}function kd(e,t,n,i,a,l){return Wn=l,H=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?Bm:Id,Ta=!1,l=n(i,a),Ta=!1,kl&&(l=nm(t,n,i,a)),tm(e),l}function tm(e){B.H=er;var t=ie!==null&&ie.next!==null;if(Wn=0,Le=ie=H=null,Qu=!1,Ws=0,Ll=null,t)throw Error(S(300));e===null||Ue||(e=e.dependencies,e!==null&&Bu(e)&&(Ue=!0))}function nm(e,t,n,i){H=e;var a=0;do{if(kl&&(Ll=null),Ws=0,kl=!1,25<=a)throw Error(S(301));if(a+=1,Le=ie=null,e.updateQueue!=null){var l=e.updateQueue;l.lastEffect=null,l.events=null,l.stores=null,l.memoCache!=null&&(l.memoCache.index=0)}B.H=Rm,l=t(n,i)}while(kl);return l}function hv(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?Ps(t):t,e=e.useState()[0],(ie!==null?ie.memoizedState:null)!==e&&(H.flags|=1024),t}function Ld(){var e=Zu!==0;return Zu=0,e}function Ud(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Bd(e){if(Qu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qu=!1}Wn=0,Le=ie=H=null,kl=!1,Ws=Zu=0,Ll=null}function st(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?H.memoizedState=Le=e:Le=Le.next=e,Le}function Me(){if(ie===null){var e=H.alternate;e=e!==null?e.memoizedState:null}else e=ie.next;var t=Le===null?H.memoizedState:Le.next;if(t!==null)Le=t,ie=e;else{if(e===null)throw H.alternate===null?Error(S(467)):Error(S(310));ie=e,e={memoizedState:ie.memoizedState,baseState:ie.baseState,baseQueue:ie.baseQueue,queue:ie.queue,next:null},Le===null?H.memoizedState=Le=e:Le=Le.next=e}return Le}function Ku(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ps(e){var t=Ws;return Ws+=1,Ll===null&&(Ll=[]),e=Q4(Ll,e,t),t=H,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?Bm:Id),e}function Iu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ps(e);if(e.$$typeof===Fn)return et(e)}throw Error(S(438,String(e)))}function Rd(e){var t=null,n=H.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=H.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ku(),H.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=Py;return t.index++,n}function Pn(e,t){return typeof t=="function"?t(e):t}function Ju(e){var t=Me();return Gd(t,ie,e)}function Gd(e,t,n){var i=e.queue;if(i===null)throw Error(S(311));i.lastRenderedReducer=n;var a=e.baseQueue,l=i.pending;if(l!==null){if(a!==null){var s=a.next;a.next=l.next,l.next=s}t.baseQueue=a=l,i.pending=null}if(l=e.baseState,a===null)e.memoizedState=l;else{t=a.next;var r=s=null,o=null,c=t,f=!1;do{var h=c.lane&-536870913;if(h!==c.lane?(Y&h)===h:(Wn&h)===h){var d=c.revertLane;if(d===0)o!==null&&(o=o.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===Ml&&(f=!0);else if((Wn&d)===d){c=c.next,d===Ml&&(f=!0);continue}else h={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(r=o=h,s=l):o=o.next=h,H.lanes|=d,Li|=d;h=c.action,Ta&&n(l,h),l=c.hasEagerState?c.eagerState:n(l,h)}else d={lane:h,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(r=o=d,s=l):o=o.next=d,H.lanes|=h,Li|=h;c=c.next}while(c!==null&&c!==t);if(o===null?s=l:o.next=r,!Rt(l,e.memoizedState)&&(Ue=!0,f&&(n=Cl,n!==null)))throw n;e.memoizedState=l,e.baseState=s,e.baseQueue=o,i.lastRenderedState=l}return a===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Hd(e){var t=Me(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,l=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do l=e(l,s.action),s=s.next;while(s!==a);Rt(l,t.memoizedState)||(Ue=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,i]}function im(e,t,n){var i=H,a=Me(),l=X;if(l){if(n===void 0)throw Error(S(407));n=n()}else n=t();var s=!Rt((ie||a).memoizedState,n);if(s&&(a.memoizedState=n,Ue=!0),a=a.queue,Fd(sm.bind(null,i,a,e),[e]),a.getSnapshot!==t||s||Le!==null&&Le.memoizedState.tag&1){if(i.flags|=2048,Ul(9,{destroy:void 0},lm.bind(null,i,a,n,t),null),le===null)throw Error(S(349));l||Wn&127||am(i,t,n)}return n}function am(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=H.updateQueue,t===null?(t=Ku(),H.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lm(e,t,n,i){t.value=n,t.getSnapshot=i,rm(t)&&um(e)}function sm(e,t,n){return n(function(){rm(t)&&um(e)})}function rm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rt(e,n)}catch{return!0}}function um(e){var t=wa(e,2);t!==null&&bt(t,e,2)}function Vd(e){var t=st();if(typeof e=="function"){var n=e;if(e=n(),Ta){xi(!0);try{n()}finally{xi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:e},t}function om(e,t,n,i){return e.baseState=n,Gd(e,ie,typeof i=="function"?i:Pn)}function mv(e,t,n,i,a){if($u(e))throw Error(S(485));if(e=t.action,e!==null){var l={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){l.listeners.push(s)}};B.T!==null?n(!0):l.isTransition=!1,i(l),n=t.pending,n===null?(l.next=t.pending=l,cm(t,l)):(l.next=n.next,t.pending=n.next=l)}}function cm(e,t){var n=t.action,i=t.payload,a=e.state;if(t.isTransition){var l=B.T,s={};B.T=s;try{var r=n(a,i),o=B.S;o!==null&&o(s,r),fm(e,t,r)}catch(c){qd(e,t,c)}finally{l!==null&&s.types!==null&&(l.types=s.types),B.T=l}}else try{l=n(a,i),fm(e,t,l)}catch(c){qd(e,t,c)}}function fm(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){dm(e,t,i)},function(i){return qd(e,t,i)}):dm(e,t,n)}function dm(e,t,n){t.status="fulfilled",t.value=n,hm(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,cm(e,n)))}function qd(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,hm(t),t=t.next;while(t!==i)}e.action=null}function hm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mm(e,t){return t}function gm(e,t){if(X){var n=le.formState;if(n!==null){e:{var i=H;if(X){if(ce){t:{for(var a=ce,l=sn;a.nodeType!==8;){if(!l){a=null;break t}if(a=un(a.nextSibling),a===null){a=null;break t}}l=a.data,a=l==="F!"||l==="F"?a:null}if(a){ce=un(a.nextSibling),i=a.data==="F!";break e}}Ai(i)}i=!1}i&&(t=n[0])}}return n=st(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mm,lastRenderedState:t},n.queue=i,n=km.bind(null,H,i),i.dispatch=n,i=Vd(!1),l=Kd.bind(null,H,!1,i.queue),i=st(),a={state:t,dispatch:null,action:e,pending:null},i.queue=a,n=mv.bind(null,H,a,l,n),a.dispatch=n,i.memoizedState=e,[t,n,!1]}function wm(e){var t=Me();return ym(t,ie,e)}function ym(e,t,n){if(t=Gd(e,t,mm)[0],e=Ju(Pn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ps(t)}catch(s){throw s===Dl?Hu:s}else i=t;t=Me();var a=t.queue,l=a.dispatch;return n!==t.memoizedState&&(H.flags|=2048,Ul(9,{destroy:void 0},gv.bind(null,a,n),null)),[i,l,e]}function gv(e,t){e.action=t}function pm(e){var t=Me(),n=ie;if(n!==null)return ym(t,n,e);Me(),t=t.memoizedState,n=Me();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Ul(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},t=H.updateQueue,t===null&&(t=Ku(),H.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function vm(){return Me().memoizedState}function Wu(e,t,n,i){var a=st();H.flags|=e,a.memoizedState=Ul(1|t,{destroy:void 0},n,i===void 0?null:i)}function Pu(e,t,n,i){var a=Me();i=i===void 0?null:i;var l=a.memoizedState.inst;ie!==null&&i!==null&&zd(i,ie.memoizedState.deps)?a.memoizedState=Ul(t,l,n,i):(H.flags|=e,a.memoizedState=Ul(1|t,l,n,i))}function bm(e,t){Wu(8390656,8,e,t)}function Fd(e,t){Pu(2048,8,e,t)}function wv(e){H.flags|=4;var t=H.updateQueue;if(t===null)t=Ku(),H.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function xm(e){var t=Me().memoizedState;return wv({ref:t,nextImpl:e}),function(){if(P&2)throw Error(S(440));return t.impl.apply(void 0,arguments)}}function Sm(e,t){return Pu(4,2,e,t)}function Em(e,t){return Pu(4,4,e,t)}function _m(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tm(e,t,n){n=n!=null?n.concat([e]):null,Pu(4,4,_m.bind(null,t,e),n)}function Yd(){}function Am(e,t){var n=Me();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&zd(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Nm(e,t){var n=Me();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&zd(t,i[1]))return i[0];if(i=e(),Ta){xi(!0);try{e()}finally{xi(!1)}}return n.memoizedState=[i,t],i}function Xd(e,t,n){return n===void 0||Wn&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=jg(),H.lanes|=e,Li|=e,n)}function jm(e,t,n,i){return Rt(n,t)?n:zl.current!==null?(e=Xd(e,n,i),Rt(e,t)||(Ue=!0),e):!(Wn&42)||Wn&1073741824&&!(Y&261930)?(Ue=!0,e.memoizedState=n):(e=jg(),H.lanes|=e,Li|=e,t)}function Mm(e,t,n,i,a){var l=W.p;W.p=l!==0&&8>l?l:8;var s=B.T,r={};B.T=r,Kd(e,!1,t,n);try{var o=a(),c=B.S;if(c!==null&&c(r,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var f=fv(o,i);$s(e,t,f,Yt(e))}else $s(e,t,i,Yt(e))}catch(h){$s(e,t,{then:function(){},status:"rejected",reason:h},Yt())}finally{W.p=l,s!==null&&r.types!==null&&(s.types=r.types),B.T=s}}function yv(){}function Qd(e,t,n,i){if(e.tag!==5)throw Error(S(476));var a=Cm(e).queue;Mm(e,a,t,oa,n===null?yv:function(){return Dm(e),n(i)})}function Cm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oa,baseState:oa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:oa},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Dm(e){var t=Cm(e);t.next===null&&(t=e.alternate.memoizedState),$s(e,t.next.queue,{},Yt())}function Zd(){return et(wr)}function Om(){return Me().memoizedState}function zm(){return Me().memoizedState}function pv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Yt();e=Mi(n);var i=Ci(t,e,n);i!==null&&(bt(i,t,n),Ks(i,t,n)),t={cache:Sd()},e.payload=t;return}t=t.return}}function vv(e,t,n){var i=Yt();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},$u(e)?Lm(t,n):(n=fd(e,t,n,i),n!==null&&(bt(n,e,i),Um(n,t,i)))}function km(e,t,n){var i=Yt();$s(e,t,n,i)}function $s(e,t,n,i){var a={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if($u(e))Lm(t,a);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,r=l(s,n);if(a.hasEagerState=!0,a.eagerState=r,Rt(r,s))return zu(e,t,a,0),le===null&&Ou(),!1}catch{}finally{}if(n=fd(e,t,a,i),n!==null)return bt(n,e,i),Um(n,t,i),!0}return!1}function Kd(e,t,n,i){if(i={lane:2,revertLane:A2(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},$u(e)){if(t)throw Error(S(479))}else t=fd(e,n,i,2),t!==null&&bt(t,e,2)}function $u(e){var t=e.alternate;return e===H||t!==null&&t===H}function Lm(e,t){kl=Qu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Um(e,t,n){if(n&4194048){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,V3(e,n)}}var er={readContext:et,use:Iu,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useLayoutEffect:xe,useInsertionEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useSyncExternalStore:xe,useId:xe,useHostTransitionStatus:xe,useFormState:xe,useActionState:xe,useOptimistic:xe,useMemoCache:xe,useCacheRefresh:xe};er.useEffectEvent=xe;var Bm={readContext:et,use:Iu,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:bm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Wu(4194308,4,_m.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wu(4194308,4,e,t)},useInsertionEffect:function(e,t){Wu(4,2,e,t)},useMemo:function(e,t){var n=st();t=t===void 0?null:t;var i=e();if(Ta){xi(!0);try{e()}finally{xi(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=st();if(n!==void 0){var a=n(t);if(Ta){xi(!0);try{n(t)}finally{xi(!1)}}}else a=t;return i.memoizedState=i.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},i.queue=e,e=e.dispatch=vv.bind(null,H,e),[i.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:function(e){e=Vd(e);var t=e.queue,n=km.bind(null,H,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yd,useDeferredValue:function(e,t){var n=st();return Xd(n,e,t)},useTransition:function(){var e=Vd(!1);return e=Mm.bind(null,H,e.queue,!0,!1),st().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=H,a=st();if(X){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),le===null)throw Error(S(349));Y&127||am(i,t,n)}a.memoizedState=n;var l={value:n,getSnapshot:t};return a.queue=l,bm(sm.bind(null,i,l,e),[e]),i.flags|=2048,Ul(9,{destroy:void 0},lm.bind(null,i,l,n,t),null),n},useId:function(){var e=st(),t=le.identifierPrefix;if(X){var n=kn,i=zn;n=(i&~(1<<32-Bt(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Zu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=dv++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zd,useFormState:gm,useActionState:gm,useOptimistic:function(e){var t=st();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Kd.bind(null,H,!0,n),n.dispatch=t,[e,t]},useMemoCache:Rd,useCacheRefresh:function(){return st().memoizedState=pv.bind(null,H)},useEffectEvent:function(e){var t=st(),n={impl:e};return t.memoizedState=n,function(){if(P&2)throw Error(S(440));return n.impl.apply(void 0,arguments)}}},Id={readContext:et,use:Iu,useCallback:Am,useContext:et,useEffect:Fd,useImperativeHandle:Tm,useInsertionEffect:Sm,useLayoutEffect:Em,useMemo:Nm,useReducer:Ju,useRef:vm,useState:function(){return Ju(Pn)},useDebugValue:Yd,useDeferredValue:function(e,t){var n=Me();return jm(n,ie.memoizedState,e,t)},useTransition:function(){var e=Ju(Pn)[0],t=Me().memoizedState;return[typeof e=="boolean"?e:Ps(e),t]},useSyncExternalStore:im,useId:Om,useHostTransitionStatus:Zd,useFormState:wm,useActionState:wm,useOptimistic:function(e,t){var n=Me();return om(n,ie,e,t)},useMemoCache:Rd,useCacheRefresh:zm};Id.useEffectEvent=xm;var Rm={readContext:et,use:Iu,useCallback:Am,useContext:et,useEffect:Fd,useImperativeHandle:Tm,useInsertionEffect:Sm,useLayoutEffect:Em,useMemo:Nm,useReducer:Hd,useRef:vm,useState:function(){return Hd(Pn)},useDebugValue:Yd,useDeferredValue:function(e,t){var n=Me();return ie===null?Xd(n,e,t):jm(n,ie.memoizedState,e,t)},useTransition:function(){var e=Hd(Pn)[0],t=Me().memoizedState;return[typeof e=="boolean"?e:Ps(e),t]},useSyncExternalStore:im,useId:Om,useHostTransitionStatus:Zd,useFormState:pm,useActionState:pm,useOptimistic:function(e,t){var n=Me();return ie!==null?om(n,ie,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Rd,useCacheRefresh:zm};Rm.useEffectEvent=xm;function Jd(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:oe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wd={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Yt(),a=Mi(i);a.payload=t,n!=null&&(a.callback=n),t=Ci(e,a,i),t!==null&&(bt(t,e,i),Ks(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Yt(),a=Mi(i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Ci(e,a,i),t!==null&&(bt(t,e,i),Ks(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Yt(),i=Mi(n);i.tag=2,t!=null&&(i.callback=t),t=Ci(e,i,n),t!==null&&(bt(t,e,n),Ks(t,e,n))}};function Gm(e,t,n,i,a,l,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,l,s):t.prototype&&t.prototype.isPureReactComponent?!Hs(n,i)||!Hs(a,l):!0}function Hm(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Wd.enqueueReplaceState(t,t.state,null)}function Aa(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=oe({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Vm(e){Du(e)}function qm(e){console.error(e)}function Fm(e){Du(e)}function eo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Ym(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Pd(e,t,n){return n=Mi(n),n.tag=3,n.payload={element:null},n.callback=function(){eo(e,t)},n}function Xm(e){return e=Mi(e),e.tag=3,e}function Qm(e,t,n,i){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var l=i.value;e.payload=function(){return a(l)},e.callback=function(){Ym(t,n,i)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){Ym(t,n,i),typeof a!="function"&&(Ui===null?Ui=new Set([this]):Ui.add(this));var r=i.stack;this.componentDidCatch(i.value,{componentStack:r!==null?r:""})})}function bv(e,t,n,i,a){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&jl(t,n,a,!0),n=Ht.current,n!==null){switch(n.tag){case 31:case 13:return rn===null?ho():n.alternate===null&&Se===0&&(Se=3),n.flags&=-257,n.flags|=65536,n.lanes=a,i===Vu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),E2(e,i,a)),!1;case 22:return n.flags|=65536,i===Vu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),E2(e,i,a)),!1}throw Error(S(435,n.tag))}return E2(e,i,a),ho(),!1}if(X)return t=Ht.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,i!==yd&&(e=Error(S(422),{cause:i}),Fs(nn(e,n)))):(i!==yd&&(t=Error(S(423),{cause:i}),Fs(nn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,i=nn(i,n),a=Pd(e.stateNode,i,a),jd(e,a),Se!==4&&(Se=2)),!1;var l=Error(S(520),{cause:i});if(l=nn(l,n),ur===null?ur=[l]:ur.push(l),Se!==4&&(Se=2),t===null)return!0;i=nn(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Pd(n.stateNode,i,e),jd(n,e),!1;case 1:if(t=n.type,l=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(Ui===null||!Ui.has(l))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Xm(a),Qm(a,e,n,i),jd(n,a),!1}n=n.return}while(n!==null);return!1}var $d=Error(S(461)),Ue=!1;function tt(e,t,n,i){t.child=e===null?J4(t,null,n,i):_a(t,e.child,n,i)}function Zm(e,t,n,i,a){n=n.render;var l=t.ref;if("ref"in i){var s={};for(var r in i)r!=="ref"&&(s[r]=i[r])}else s=i;return ba(t),i=kd(e,t,n,s,l,a),r=Ld(),e!==null&&!Ue?(Ud(e,t,a),$n(e,t,a)):(X&&r&&gd(t),t.flags|=1,tt(e,t,i,a),t.child)}function Km(e,t,n,i,a){if(e===null){var l=n.type;return typeof l=="function"&&!dd(l)&&l.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=l,Im(e,t,l,i,a)):(e=Lu(n.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!r2(e,a)){var s=l.memoizedProps;if(n=n.compare,n=n!==null?n:Hs,n(s,i)&&e.ref===t.ref)return $n(e,t,a)}return t.flags|=1,e=Zn(l,i),e.ref=t.ref,e.return=t,t.child=e}function Im(e,t,n,i,a){if(e!==null){var l=e.memoizedProps;if(Hs(l,i)&&e.ref===t.ref)if(Ue=!1,t.pendingProps=i=l,r2(e,a))e.flags&131072&&(Ue=!0);else return t.lanes=e.lanes,$n(e,t,a)}return e2(e,t,n,i,a)}function Jm(e,t,n,i){var a=i.children,l=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if(t.flags&128){if(l=l!==null?l.baseLanes|n:n,e!==null){for(i=t.child=e.child,a=0;i!==null;)a=a|i.lanes|i.childLanes,i=i.sibling;i=a&~l}else i=0,t.child=null;return Wm(e,t,l,n,i)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gu(t,l!==null?l.cachePool:null),l!==null?$4(t,l):Cd(),em(t);else return i=t.lanes=536870912,Wm(e,t,l!==null?l.baseLanes|n:n,n,i)}else l!==null?(Gu(t,l.cachePool),$4(t,l),Oi(),t.memoizedState=null):(e!==null&&Gu(t,null),Cd(),Oi());return tt(e,t,a,n),t.child}function tr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Wm(e,t,n,i,a){var l=_d();return l=l===null?null:{parent:ke._currentValue,pool:l},t.memoizedState={baseLanes:n,cachePool:l},e!==null&&Gu(t,null),Cd(),em(t),e!==null&&jl(e,t,i,!0),t.childLanes=a,null}function to(e,t){return t=io({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pm(e,t,n){return _a(t,e.child,null,n),e=to(t,t.pendingProps),e.flags|=2,Vt(t),t.memoizedState=null,e}function xv(e,t,n){var i=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(X){if(i.mode==="hidden")return e=to(t,i),t.lanes=536870912,tr(null,e);if(Od(t),(e=ce)?(e=cw(e,sn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i!==null?{id:zn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},n=L4(e),n.return=t,t.child=n,$e=t,ce=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return to(t,i)}var l=e.memoizedState;if(l!==null){var s=l.dehydrated;if(Od(t),a)if(t.flags&256)t.flags&=-257,t=Pm(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(S(558));else if(Ue||jl(e,t,n,!1),a=(n&e.childLanes)!==0,Ue||a){if(i=le,i!==null&&(s=q3(i,n),s!==0&&s!==l.retryLane))throw l.retryLane=s,wa(e,s),bt(i,e,s),$d;ho(),t=Pm(e,t,n)}else e=l.treeContext,ce=un(s.nextSibling),$e=t,X=!0,Ti=null,sn=!1,e!==null&&R4(t,e),t=to(t,i),t.flags|=4096;return t}return e=Zn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function no(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(S(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function e2(e,t,n,i,a){return ba(t),n=kd(e,t,n,i,void 0,a),i=Ld(),e!==null&&!Ue?(Ud(e,t,a),$n(e,t,a)):(X&&i&&gd(t),t.flags|=1,tt(e,t,n,a),t.child)}function $m(e,t,n,i,a,l){return ba(t),t.updateQueue=null,n=nm(t,i,n,a),tm(e),i=Ld(),e!==null&&!Ue?(Ud(e,t,l),$n(e,t,l)):(X&&i&&gd(t),t.flags|=1,tt(e,t,n,l),t.child)}function eg(e,t,n,i,a){if(ba(t),t.stateNode===null){var l=_l,s=n.contextType;typeof s=="object"&&s!==null&&(l=et(s)),l=new n(i,l),t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Wd,t.stateNode=l,l._reactInternals=t,l=t.stateNode,l.props=i,l.state=t.memoizedState,l.refs={},Ad(t),s=n.contextType,l.context=typeof s=="object"&&s!==null?et(s):_l,l.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(Jd(t,n,s,i),l.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(s=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),s!==l.state&&Wd.enqueueReplaceState(l,l.state,null),Js(t,i,l,a),Is(),l.state=t.memoizedState),typeof l.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){l=t.stateNode;var r=t.memoizedProps,o=Aa(n,r);l.props=o;var c=l.context,f=n.contextType;s=_l,typeof f=="object"&&f!==null&&(s=et(f));var h=n.getDerivedStateFromProps;f=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(r||c!==s)&&Hm(t,l,i,s),ji=!1;var d=t.memoizedState;l.state=d,Js(t,i,l,a),Is(),c=t.memoizedState,r||d!==c||ji?(typeof h=="function"&&(Jd(t,n,h,i),c=t.memoizedState),(o=ji||Gm(t,n,o,i,d,c,s))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=c),l.props=i,l.state=c,l.context=s,i=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{l=t.stateNode,Nd(e,t),s=t.memoizedProps,f=Aa(n,s),l.props=f,h=t.pendingProps,d=l.context,c=n.contextType,o=_l,typeof c=="object"&&c!==null&&(o=et(c)),r=n.getDerivedStateFromProps,(c=typeof r=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==h||d!==o)&&Hm(t,l,i,o),ji=!1,d=t.memoizedState,l.state=d,Js(t,i,l,a),Is();var m=t.memoizedState;s!==h||d!==m||ji||e!==null&&e.dependencies!==null&&Bu(e.dependencies)?(typeof r=="function"&&(Jd(t,n,r,i),m=t.memoizedState),(f=ji||Gm(t,n,f,i,d,m,o)||e!==null&&e.dependencies!==null&&Bu(e.dependencies))?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(i,m,o),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(i,m,o)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=m),l.props=i,l.state=m,l.context=o,i=f):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),i=!1)}return l=i,no(e,t),i=(t.flags&128)!==0,l||i?(l=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:l.render(),t.flags|=1,e!==null&&i?(t.child=_a(t,e.child,null,a),t.child=_a(t,null,n,a)):tt(e,t,n,a),t.memoizedState=l.state,e=t.child):e=$n(e,t,a),e}function tg(e,t,n,i){return pa(),t.flags|=256,tt(e,t,n,i),t.child}var t2={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function n2(e){return{baseLanes:e,cachePool:Y4()}}function i2(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ft),e}function ng(e,t,n){var i=t.pendingProps,a=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(je.current&2)!==0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(X){if(a?Di(t):Oi(),(e=ce)?(e=cw(e,sn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:_i!==null?{id:zn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},n=L4(e),n.return=t,t.child=n,$e=t,ce=null)):e=null,e===null)throw Ai(t);return G2(e)?t.lanes=32:t.lanes=536870912,null}var r=i.children;return i=i.fallback,a?(Oi(),a=t.mode,r=io({mode:"hidden",children:r},a),i=ya(i,a,n,null),r.return=t,i.return=t,r.sibling=i,t.child=r,i=t.child,i.memoizedState=n2(n),i.childLanes=i2(e,s,n),t.memoizedState=t2,tr(null,i)):(Di(t),a2(t,r))}var o=e.memoizedState;if(o!==null&&(r=o.dehydrated,r!==null)){if(l)t.flags&256?(Di(t),t.flags&=-257,t=l2(e,t,n)):t.memoizedState!==null?(Oi(),t.child=e.child,t.flags|=128,t=null):(Oi(),r=i.fallback,a=t.mode,i=io({mode:"visible",children:i.children},a),r=ya(r,a,n,null),r.flags|=2,i.return=t,r.return=t,i.sibling=r,t.child=i,_a(t,e.child,null,n),i=t.child,i.memoizedState=n2(n),i.childLanes=i2(e,s,n),t.memoizedState=t2,t=tr(null,i));else if(Di(t),G2(r)){if(s=r.nextSibling&&r.nextSibling.dataset,s)var c=s.dgst;s=c,i=Error(S(419)),i.stack="",i.digest=s,Fs({value:i,source:null,stack:null}),t=l2(e,t,n)}else if(Ue||jl(e,t,n,!1),s=(n&e.childLanes)!==0,Ue||s){if(s=le,s!==null&&(i=q3(s,n),i!==0&&i!==o.retryLane))throw o.retryLane=i,wa(e,i),bt(s,e,i),$d;R2(r)||ho(),t=l2(e,t,n)}else R2(r)?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,ce=un(r.nextSibling),$e=t,X=!0,Ti=null,sn=!1,e!==null&&R4(t,e),t=a2(t,i.children),t.flags|=4096);return t}return a?(Oi(),r=i.fallback,a=t.mode,o=e.child,c=o.sibling,i=Zn(o,{mode:"hidden",children:i.children}),i.subtreeFlags=o.subtreeFlags&65011712,c!==null?r=Zn(c,r):(r=ya(r,a,n,null),r.flags|=2),r.return=t,i.return=t,i.sibling=r,t.child=i,tr(null,i),i=t.child,r=e.child.memoizedState,r===null?r=n2(n):(a=r.cachePool,a!==null?(o=ke._currentValue,a=a.parent!==o?{parent:o,pool:o}:a):a=Y4(),r={baseLanes:r.baseLanes|n,cachePool:a}),i.memoizedState=r,i.childLanes=i2(e,s,n),t.memoizedState=t2,tr(e.child,i)):(Di(t),n=e.child,e=n.sibling,n=Zn(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function a2(e,t){return t=io({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function io(e,t){return e=Gt(22,e,null,t),e.lanes=0,e}function l2(e,t,n){return _a(t,e.child,null,n),e=a2(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ig(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),bd(e.return,t,n)}function s2(e,t,n,i,a,l){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:a,treeForkCount:l}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=a,s.treeForkCount=l)}function ag(e,t,n){var i=t.pendingProps,a=i.revealOrder,l=i.tail;i=i.children;var s=je.current,r=(s&2)!==0;if(r?(s=s&1|2,t.flags|=128):s&=1,ue(je,s),tt(e,t,i,n),i=X?qs:0,!r&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ig(e,n,t);else if(e.tag===19)ig(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Xu(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),s2(t,!1,a,n,l,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Xu(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}s2(t,!0,n,null,l,i);break;case"together":s2(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function $n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Li|=t.lanes,!(n&t.childLanes))if(e!==null){if(jl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,n=Zn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function r2(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Bu(e)))}function Sv(e,t,n){switch(t.tag){case 3:mu(t,t.stateNode.containerInfo),Ni(t,ke,e.memoizedState.cache),pa();break;case 27:case 5:Df(t);break;case 4:mu(t,t.stateNode.containerInfo);break;case 10:Ni(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Od(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Di(t),t.flags|=128,null):n&t.child.childLanes?ng(e,t,n):(Di(t),e=$n(e,t,n),e!==null?e.sibling:null);Di(t);break;case 19:var a=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(jl(e,t,n,!1),i=(n&t.childLanes)!==0),a){if(i)return ag(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),ue(je,je.current),i)break;return null;case 22:return t.lanes=0,Jm(e,t,n,t.pendingProps);case 24:Ni(t,ke,e.memoizedState.cache)}return $n(e,t,n)}function lg(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ue=!0;else{if(!r2(e,n)&&!(t.flags&128))return Ue=!1,Sv(e,t,n);Ue=!!(e.flags&131072)}else Ue=!1,X&&t.flags&1048576&&B4(t,qs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Sa(t.elementType),t.type=e,typeof e=="function")dd(e)?(i=Aa(e,i),t.tag=1,t=eg(null,t,e,i,n)):(t.tag=0,t=e2(null,t,e,i,n));else{if(e!=null){var a=e.$$typeof;if(a===_f){t.tag=11,t=Zm(null,t,e,i,n);break e}else if(a===Nf){t.tag=14,t=Km(null,t,e,i,n);break e}}throw t=Mf(e)||e,Error(S(306,t,""))}}return t;case 0:return e2(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,a=Aa(i,t.pendingProps),eg(e,t,i,a,n);case 3:e:{if(mu(t,t.stateNode.containerInfo),e===null)throw Error(S(387));i=t.pendingProps;var l=t.memoizedState;a=l.element,Nd(e,t),Js(t,i,null,n);var s=t.memoizedState;if(i=s.cache,Ni(t,ke,i),i!==l.cache&&xd(t,[ke],n,!0),Is(),i=s.element,l.isDehydrated)if(l={element:i,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){t=tg(e,t,i,n);break e}else if(i!==a){a=nn(Error(S(424)),t),Fs(a),t=tg(e,t,i,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ce=un(e.firstChild),$e=t,X=!0,Ti=null,sn=!0,n=J4(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(pa(),i===a){t=$n(e,t,n);break e}tt(e,t,i,n)}t=t.child}return t;case 26:return no(e,t),e===null?(n=ww(t.type,null,t.pendingProps,null))?t.memoizedState=n:X||(n=t.type,e=t.pendingProps,i=bo(bi.current).createElement(n),i[Pe]=t,i[mt]=e,nt(i,n,e),Ie(i),t.stateNode=i):t.memoizedState=ww(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Df(t),e===null&&X&&(i=t.stateNode=hw(t.type,t.pendingProps,bi.current),$e=t,sn=!0,a=ce,Hi(t.type)?(H2=a,ce=un(i.firstChild)):ce=a),tt(e,t,t.pendingProps.children,n),no(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&X&&((a=i=ce)&&(i=Pv(i,t.type,t.pendingProps,sn),i!==null?(t.stateNode=i,$e=t,ce=un(i.firstChild),sn=!1,a=!0):a=!1),a||Ai(t)),Df(t),a=t.type,l=t.pendingProps,s=e!==null?e.memoizedProps:null,i=l.children,L2(a,l)?i=null:s!==null&&L2(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=kd(e,t,hv,null,null,n),wr._currentValue=a),no(e,t),tt(e,t,i,n),t.child;case 6:return e===null&&X&&((e=n=ce)&&(n=$v(n,t.pendingProps,sn),n!==null?(t.stateNode=n,$e=t,ce=null,e=!0):e=!1),e||Ai(t)),null;case 13:return ng(e,t,n);case 4:return mu(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=_a(t,null,i,n):tt(e,t,i,n),t.child;case 11:return Zm(e,t,t.type,t.pendingProps,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,Ni(t,t.type,i.value),tt(e,t,i.children,n),t.child;case 9:return a=t.type._context,i=t.pendingProps.children,ba(t),a=et(a),i=i(a),t.flags|=1,tt(e,t,i,n),t.child;case 14:return Km(e,t,t.type,t.pendingProps,n);case 15:return Im(e,t,t.type,t.pendingProps,n);case 19:return ag(e,t,n);case 31:return xv(e,t,n);case 22:return Jm(e,t,n,t.pendingProps);case 24:return ba(t),i=et(ke),e===null?(a=_d(),a===null&&(a=le,l=Sd(),a.pooledCache=l,l.refCount++,l!==null&&(a.pooledCacheLanes|=n),a=l),t.memoizedState={parent:i,cache:a},Ad(t),Ni(t,ke,a)):(e.lanes&n&&(Nd(e,t),Js(t,null,null,n),Is()),a=e.memoizedState,l=t.memoizedState,a.parent!==i?(a={parent:i,cache:i},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ni(t,ke,i)):(i=l.cache,Ni(t,ke,i),i!==a.cache&&xd(t,[ke],n,!0))),tt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(S(156,t.tag))}function ei(e){e.flags|=4}function u2(e,t,n,i,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Og())e.flags|=8192;else throw Ea=Vu,Td}else e.flags&=-16777217}function sg(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!xw(t))if(Og())e.flags|=8192;else throw Ea=Vu,Td}function ao(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?G3():536870912,e.lanes|=t,Hl|=t)}function nr(e,t){if(!X)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags&65011712,i|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Ev(e,t,n){var i=t.pendingProps;switch(wd(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fe(t),null;case 1:return fe(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Jn(ke),cl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Nl(t)?ei(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pd())),fe(t),null;case 26:var a=t.type,l=t.memoizedState;return e===null?(ei(t),l!==null?(fe(t),sg(t,l)):(fe(t),u2(t,a,null,i,n))):l?l!==e.memoizedState?(ei(t),fe(t),sg(t,l)):(fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&ei(t),fe(t),u2(t,a,e,i,n)),null;case 27:if(gu(t),n=bi.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ei(t);else{if(!i){if(t.stateNode===null)throw Error(S(166));return fe(t),null}e=On.current,Nl(t)?G4(t):(e=hw(a,i,n),t.stateNode=e,ei(t))}return fe(t),null;case 5:if(gu(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&ei(t);else{if(!i){if(t.stateNode===null)throw Error(S(166));return fe(t),null}if(l=On.current,Nl(t))G4(t);else{var s=bo(bi.current);switch(l){case 1:l=s.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:l=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":l=s.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":l=s.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":l=s.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild);break;case"select":l=typeof i.is=="string"?s.createElement("select",{is:i.is}):s.createElement("select"),i.multiple?l.multiple=!0:i.size&&(l.size=i.size);break;default:l=typeof i.is=="string"?s.createElement(a,{is:i.is}):s.createElement(a)}}l[Pe]=t,l[mt]=i;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)l.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=l;e:switch(nt(l,a,i),a){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&ei(t)}}return fe(t),u2(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&ei(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(S(166));if(e=bi.current,Nl(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,a=$e,a!==null)switch(a.tag){case 27:case 5:i=a.memoizedProps}e[Pe]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||nw(e.nodeValue,n)),e||Ai(t,!0)}else e=bo(e).createTextNode(i),e[Pe]=t,t.stateNode=e}return fe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=Nl(t),n!==null){if(e===null){if(!i)throw Error(S(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(557));e[Pe]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fe(t),e=!1}else n=pd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Vt(t),t):(Vt(t),null);if(t.flags&128)throw Error(S(558))}return fe(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Nl(t),i!==null&&i.dehydrated!==null){if(e===null){if(!a)throw Error(S(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(S(317));a[Pe]=t}else pa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fe(t),a=!1}else a=pd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Vt(t),t):(Vt(t),null)}return Vt(t),t.flags&128?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,a=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(a=i.alternate.memoizedState.cachePool.pool),l=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),l!==a&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ao(t,t.updateQueue),fe(t),null);case 4:return cl(),e===null&&C2(t.stateNode.containerInfo),fe(t),null;case 10:return Jn(t.type),fe(t),null;case 19:if(Ke(je),i=t.memoizedState,i===null)return fe(t),null;if(a=(t.flags&128)!==0,l=i.rendering,l===null)if(a)nr(i,!1);else{if(Se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=Xu(e),l!==null){for(t.flags|=128,nr(i,!1),e=l.updateQueue,t.updateQueue=e,ao(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)k4(n,e),n=n.sibling;return ue(je,je.current&1|2),X&&Kn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Lt()>oo&&(t.flags|=128,a=!0,nr(i,!1),t.lanes=4194304)}else{if(!a)if(e=Xu(l),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ao(t,e),nr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!X)return fe(t),null}else 2*Lt()-i.renderingStartTime>oo&&n!==536870912&&(t.flags|=128,a=!0,nr(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(e=i.last,e!==null?e.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Lt(),e.sibling=null,n=je.current,ue(je,a?n&1|2:n&1),X&&Kn(t,i.treeForkCount),e):(fe(t),null);case 22:case 23:return Vt(t),Dd(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(fe(t),t.subtreeFlags&6&&(t.flags|=8192)):fe(t),n=t.updateQueue,n!==null&&ao(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&Ke(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jn(ke),fe(t),null;case 25:return null;case 30:return null}throw Error(S(156,t.tag))}function _v(e,t){switch(wd(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(ke),cl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return gu(t),null;case 31:if(t.memoizedState!==null){if(Vt(t),t.alternate===null)throw Error(S(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));pa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ke(je),null;case 4:return cl(),null;case 10:return Jn(t.type),null;case 22:case 23:return Vt(t),Dd(),e!==null&&Ke(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(ke),null;case 25:return null;default:return null}}function rg(e,t){switch(wd(t),t.tag){case 3:Jn(ke),cl();break;case 26:case 27:case 5:gu(t);break;case 4:cl();break;case 31:t.memoizedState!==null&&Vt(t);break;case 13:Vt(t);break;case 19:Ke(je);break;case 10:Jn(t.type);break;case 22:case 23:Vt(t),Dd(),e!==null&&Ke(xa);break;case 24:Jn(ke)}}function ir(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var a=i.next;n=a;do{if((n.tag&e)===e){i=void 0;var l=n.create,s=n.inst;i=l(),s.destroy=i}n=n.next}while(n!==a)}}catch(r){te(t,t.return,r)}}function zi(e,t,n){try{var i=t.updateQueue,a=i!==null?i.lastEffect:null;if(a!==null){var l=a.next;i=l;do{if((i.tag&e)===e){var s=i.inst,r=s.destroy;if(r!==void 0){s.destroy=void 0,a=t;var o=n,c=r;try{c()}catch(f){te(a,o,f)}}}i=i.next}while(i!==l)}}catch(f){te(t,t.return,f)}}function ug(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{P4(t,n)}catch(i){te(e,e.return,i)}}}function og(e,t,n){n.props=Aa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){te(e,t,i)}}function ar(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(a){te(e,t,a)}}function Ln(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(a){te(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){te(e,t,a)}else n.current=null}function cg(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(a){te(e,e.return,a)}}function o2(e,t,n){try{var i=e.stateNode;Qv(i,e.type,n,t),i[mt]=t}catch(a){te(e,e.return,a)}}function fg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hi(e.type)||e.tag===4}function c2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Hi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function f2(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xn));else if(i!==4&&(i===27&&Hi(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(f2(e,t,n),e=e.sibling;e!==null;)f2(e,t,n),e=e.sibling}function lo(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&Hi(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(lo(e,t,n),e=e.sibling;e!==null;)lo(e,t,n),e=e.sibling}function dg(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);nt(t,i,n),t[Pe]=e,t[mt]=n}catch(l){te(e,e.return,l)}}var ti=!1,Be=!1,d2=!1,hg=typeof WeakSet=="function"?WeakSet:Set,Je=null;function Tv(e,t){if(e=e.containerInfo,z2=No,e=T4(e),ld(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,l=i.focusNode;i=i.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,r=-1,o=-1,c=0,f=0,h=e,d=null;t:for(;;){for(var m;h!==n||a!==0&&h.nodeType!==3||(r=s+a),h!==l||i!==0&&h.nodeType!==3||(o=s+i),h.nodeType===3&&(s+=h.nodeValue.length),(m=h.firstChild)!==null;)d=h,h=m;for(;;){if(h===e)break t;if(d===n&&++c===a&&(r=s),d===l&&++f===i&&(o=s),(m=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=m}n=r===-1||o===-1?null:{start:r,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(k2={focusedElem:e,selectionRange:n},No=!1,Je=t;Je!==null;)if(t=Je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Je=e;else for(;Je!==null;){switch(t=Je,l=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&l!==null){e=void 0,n=t,a=l.memoizedProps,l=l.memoizedState,i=n.stateNode;try{var v=Aa(n.type,a);e=i.getSnapshotBeforeUpdate(v,l),i.__reactInternalSnapshotBeforeUpdate=e}catch(x){te(n,n.return,x)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)B2(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":B2(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(S(163))}if(e=t.sibling,e!==null){e.return=t.return,Je=e;break}Je=t.return}}function mg(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:ii(e,n),i&4&&ir(5,n);break;case 1:if(ii(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(s){te(n,n.return,s)}else{var a=Aa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){te(n,n.return,s)}}i&64&&ug(n),i&512&&ar(n,n.return);break;case 3:if(ii(e,n),i&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{P4(e,t)}catch(s){te(n,n.return,s)}}break;case 27:t===null&&i&4&&dg(n);case 26:case 5:ii(e,n),t===null&&i&4&&cg(n),i&512&&ar(n,n.return);break;case 12:ii(e,n);break;case 31:ii(e,n),i&4&&yg(e,n);break;case 13:ii(e,n),i&4&&pg(e,n),i&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=kv.bind(null,n),e8(e,n))));break;case 22:if(i=n.memoizedState!==null||ti,!i){t=t!==null&&t.memoizedState!==null||Be,a=ti;var l=Be;ti=i,(Be=t)&&!l?ai(e,n,(n.subtreeFlags&8772)!==0):ii(e,n),ti=a,Be=l}break;case 30:break;default:ii(e,n)}}function gg(e){var t=e.alternate;t!==null&&(e.alternate=null,gg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qf(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ge=null,wt=!1;function ni(e,t,n){for(n=n.child;n!==null;)wg(e,t,n),n=n.sibling}function wg(e,t,n){if(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(js,n)}catch{}switch(n.tag){case 26:Be||Ln(n,t),ni(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Be||Ln(n,t);var i=ge,a=wt;Hi(n.type)&&(ge=n.stateNode,wt=!1),ni(e,t,n),hr(n.stateNode),ge=i,wt=a;break;case 5:Be||Ln(n,t);case 6:if(i=ge,a=wt,ge=null,ni(e,t,n),ge=i,wt=a,ge!==null)if(wt)try{(ge.nodeType===9?ge.body:ge.nodeName==="HTML"?ge.ownerDocument.body:ge).removeChild(n.stateNode)}catch(l){te(n,t,l)}else try{ge.removeChild(n.stateNode)}catch(l){te(n,t,l)}break;case 18:ge!==null&&(wt?(e=ge,uw(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Kl(e)):uw(ge,n.stateNode));break;case 4:i=ge,a=wt,ge=n.stateNode.containerInfo,wt=!0,ni(e,t,n),ge=i,wt=a;break;case 0:case 11:case 14:case 15:zi(2,n,t),Be||zi(4,n,t),ni(e,t,n);break;case 1:Be||(Ln(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&og(n,t,i)),ni(e,t,n);break;case 21:ni(e,t,n);break;case 22:Be=(i=Be)||n.memoizedState!==null,ni(e,t,n),Be=i;break;default:ni(e,t,n)}}function yg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kl(e)}catch(n){te(t,t.return,n)}}}function pg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kl(e)}catch(n){te(t,t.return,n)}}function Av(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new hg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new hg),t;default:throw Error(S(435,e.tag))}}function so(e,t){var n=Av(e);t.forEach(function(i){if(!n.has(i)){n.add(i);var a=Lv.bind(null,e,i);i.then(a,a)}})}function yt(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i],l=e,s=t,r=s;e:for(;r!==null;){switch(r.tag){case 27:if(Hi(r.type)){ge=r.stateNode,wt=!1;break e}break;case 5:ge=r.stateNode,wt=!1;break e;case 3:case 4:ge=r.stateNode.containerInfo,wt=!0;break e}r=r.return}if(ge===null)throw Error(S(160));wg(l,s,a),ge=null,wt=!1,l=a.alternate,l!==null&&(l.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vg(t,e),t=t.sibling}var pn=null;function vg(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yt(t,e),pt(e),i&4&&(zi(3,e,e.return),ir(3,e),zi(5,e,e.return));break;case 1:yt(t,e),pt(e),i&512&&(Be||n===null||Ln(n,n.return)),i&64&&ti&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var a=pn;if(yt(t,e),pt(e),i&512&&(Be||n===null||Ln(n,n.return)),i&4){var l=n!==null?n.memoizedState:null;if(i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(i){case"title":l=a.getElementsByTagName("title")[0],(!l||l[Ds]||l[Pe]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=a.createElement(i),a.head.insertBefore(l,a.querySelector("head > title"))),nt(l,i,n),l[Pe]=e,Ie(l),i=l;break e;case"link":var s=vw("link","href",a).get(i+(n.href||""));if(s){for(var r=0;r<s.length;r++)if(l=s[r],l.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(r,1);break t}}l=a.createElement(i),nt(l,i,n),a.head.appendChild(l);break;case"meta":if(s=vw("meta","content",a).get(i+(n.content||""))){for(r=0;r<s.length;r++)if(l=s[r],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(r,1);break t}}l=a.createElement(i),nt(l,i,n),a.head.appendChild(l);break;default:throw Error(S(468,i))}l[Pe]=e,Ie(l),i=l}e.stateNode=i}else bw(a,e.type,e.stateNode);else e.stateNode=pw(a,i,e.memoizedProps);else l!==i?(l===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):l.count--,i===null?bw(a,e.type,e.stateNode):pw(a,i,e.memoizedProps)):i===null&&e.stateNode!==null&&o2(e,e.memoizedProps,n.memoizedProps)}break;case 27:yt(t,e),pt(e),i&512&&(Be||n===null||Ln(n,n.return)),n!==null&&i&4&&o2(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yt(t,e),pt(e),i&512&&(Be||n===null||Ln(n,n.return)),e.flags&32){a=e.stateNode;try{yl(a,"")}catch(v){te(e,e.return,v)}}i&4&&e.stateNode!=null&&(a=e.memoizedProps,o2(e,a,n!==null?n.memoizedProps:a)),i&1024&&(d2=!0);break;case 6:if(yt(t,e),pt(e),i&4){if(e.stateNode===null)throw Error(S(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(v){te(e,e.return,v)}}break;case 3:if(Eo=null,a=pn,pn=xo(t.containerInfo),yt(t,e),pn=a,pt(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Kl(t.containerInfo)}catch(v){te(e,e.return,v)}d2&&(d2=!1,bg(e));break;case 4:i=pn,pn=xo(e.stateNode.containerInfo),yt(t,e),pt(e),pn=i;break;case 12:yt(t,e),pt(e);break;case 31:yt(t,e),pt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,so(e,i)));break;case 13:yt(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uo=Lt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,so(e,i)));break;case 22:a=e.memoizedState!==null;var o=n!==null&&n.memoizedState!==null,c=ti,f=Be;if(ti=c||a,Be=f||o,yt(t,e),Be=f,ti=c,pt(e),i&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||o||ti||Be||Na(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){o=n=t;try{if(l=o.stateNode,a)s=l.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{r=o.stateNode;var h=o.memoizedProps.style,d=h!=null&&h.hasOwnProperty("display")?h.display:null;r.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(v){te(o,o.return,v)}}}else if(t.tag===6){if(n===null){o=t;try{o.stateNode.nodeValue=a?"":o.memoizedProps}catch(v){te(o,o.return,v)}}}else if(t.tag===18){if(n===null){o=t;try{var m=o.stateNode;a?ow(m,!0):ow(o.stateNode,!1)}catch(v){te(o,o.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,so(e,n))));break;case 19:yt(t,e),pt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,so(e,i)));break;case 30:break;case 21:break;default:yt(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var n,i=e.return;i!==null;){if(fg(i)){n=i;break}i=i.return}if(n==null)throw Error(S(160));switch(n.tag){case 27:var a=n.stateNode,l=c2(e);lo(e,l,a);break;case 5:var s=n.stateNode;n.flags&32&&(yl(s,""),n.flags&=-33);var r=c2(e);lo(e,r,s);break;case 3:case 4:var o=n.stateNode.containerInfo,c=c2(e);f2(e,c,o);break;default:throw Error(S(161))}}catch(f){te(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ii(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mg(e,t.alternate,t),t=t.sibling}function Na(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zi(4,t,t.return),Na(t);break;case 1:Ln(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&og(t,t.return,n),Na(t);break;case 27:hr(t.stateNode);case 26:case 5:Ln(t,t.return),Na(t);break;case 22:t.memoizedState===null&&Na(t);break;case 30:Na(t);break;default:Na(t)}e=e.sibling}}function ai(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,a=e,l=t,s=l.flags;switch(l.tag){case 0:case 11:case 15:ai(a,l,n),ir(4,l);break;case 1:if(ai(a,l,n),i=l,a=i.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(c){te(i,i.return,c)}if(i=l,a=i.updateQueue,a!==null){var r=i.stateNode;try{var o=a.shared.hiddenCallbacks;if(o!==null)for(a.shared.hiddenCallbacks=null,a=0;a<o.length;a++)W4(o[a],r)}catch(c){te(i,i.return,c)}}n&&s&64&&ug(l),ar(l,l.return);break;case 27:dg(l);case 26:case 5:ai(a,l,n),n&&i===null&&s&4&&cg(l),ar(l,l.return);break;case 12:ai(a,l,n);break;case 31:ai(a,l,n),n&&s&4&&yg(a,l);break;case 13:ai(a,l,n),n&&s&4&&pg(a,l);break;case 22:l.memoizedState===null&&ai(a,l,n),ar(l,l.return);break;case 30:break;default:ai(a,l,n)}t=t.sibling}}function h2(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ys(n))}function m2(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ys(e))}function vn(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xg(e,t,n,i),t=t.sibling}function xg(e,t,n,i){var a=t.flags;switch(t.tag){case 0:case 11:case 15:vn(e,t,n,i),a&2048&&ir(9,t);break;case 1:vn(e,t,n,i);break;case 3:vn(e,t,n,i),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ys(e)));break;case 12:if(a&2048){vn(e,t,n,i),e=t.stateNode;try{var l=t.memoizedProps,s=l.id,r=l.onPostCommit;typeof r=="function"&&r(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){te(t,t.return,o)}}else vn(e,t,n,i);break;case 31:vn(e,t,n,i);break;case 13:vn(e,t,n,i);break;case 23:break;case 22:l=t.stateNode,s=t.alternate,t.memoizedState!==null?l._visibility&2?vn(e,t,n,i):lr(e,t):l._visibility&2?vn(e,t,n,i):(l._visibility|=2,Bl(e,t,n,i,(t.subtreeFlags&10256)!==0||!1)),a&2048&&h2(s,t);break;case 24:vn(e,t,n,i),a&2048&&m2(t.alternate,t);break;default:vn(e,t,n,i)}}function Bl(e,t,n,i,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var l=e,s=t,r=n,o=i,c=s.flags;switch(s.tag){case 0:case 11:case 15:Bl(l,s,r,o,a),ir(8,s);break;case 23:break;case 22:var f=s.stateNode;s.memoizedState!==null?f._visibility&2?Bl(l,s,r,o,a):lr(l,s):(f._visibility|=2,Bl(l,s,r,o,a)),a&&c&2048&&h2(s.alternate,s);break;case 24:Bl(l,s,r,o,a),a&&c&2048&&m2(s.alternate,s);break;default:Bl(l,s,r,o,a)}t=t.sibling}}function lr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,a=i.flags;switch(i.tag){case 22:lr(n,i),a&2048&&h2(i.alternate,i);break;case 24:lr(n,i),a&2048&&m2(i.alternate,i);break;default:lr(n,i)}t=t.sibling}}var sr=8192;function Rl(e,t,n){if(e.subtreeFlags&sr)for(e=e.child;e!==null;)Sg(e,t,n),e=e.sibling}function Sg(e,t,n){switch(e.tag){case 26:Rl(e,t,n),e.flags&sr&&e.memoizedState!==null&&d8(n,pn,e.memoizedState,e.memoizedProps);break;case 5:Rl(e,t,n);break;case 3:case 4:var i=pn;pn=xo(e.stateNode.containerInfo),Rl(e,t,n),pn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=sr,sr=16777216,Rl(e,t,n),sr=i):Rl(e,t,n));break;default:Rl(e,t,n)}}function Eg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function rr(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Je=i,Tg(i,e)}Eg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_g(e),e=e.sibling}function _g(e){switch(e.tag){case 0:case 11:case 15:rr(e),e.flags&2048&&zi(9,e,e.return);break;case 3:rr(e);break;case 12:rr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ro(e)):rr(e);break;default:rr(e)}}function ro(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Je=i,Tg(i,e)}Eg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zi(8,t,t.return),ro(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ro(t));break;default:ro(t)}e=e.sibling}}function Tg(e,t){for(;Je!==null;){var n=Je;switch(n.tag){case 0:case 11:case 15:zi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Ys(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,Je=i;else e:for(n=e;Je!==null;){i=Je;var a=i.sibling,l=i.return;if(gg(i),i===n){Je=null;break e}if(a!==null){a.return=l,Je=a;break e}Je=l}}}var Nv={getCacheForType:function(e){var t=et(ke),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return et(ke).controller.signal}},jv=typeof WeakMap=="function"?WeakMap:Map,P=0,le=null,q=null,Y=0,ee=0,qt=null,ki=!1,Gl=!1,g2=!1,li=0,Se=0,Li=0,ja=0,w2=0,Ft=0,Hl=0,ur=null,vt=null,y2=!1,uo=0,Ag=0,oo=1/0,co=null,Ui=null,Fe=0,Bi=null,Vl=null,si=0,p2=0,v2=null,Ng=null,or=0,b2=null;function Yt(){return P&2&&Y!==0?Y&-Y:B.T!==null?A2():F3()}function jg(){if(Ft===0)if(!(Y&536870912)||X){var e=pu;pu<<=1,!(pu&3932160)&&(pu=262144),Ft=e}else Ft=536870912;return e=Ht.current,e!==null&&(e.flags|=32),Ft}function bt(e,t,n){(e===le&&(ee===2||ee===9)||e.cancelPendingCommit!==null)&&(ql(e,0),Ri(e,Y,Ft,!1)),Cs(e,n),(!(P&2)||e!==le)&&(e===le&&(!(P&2)&&(ja|=n),Se===4&&Ri(e,Y,Ft,!1)),Un(e))}function Mg(e,t,n){if(P&6)throw Error(S(327));var i=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ms(e,t),a=i?Dv(e,t):S2(e,t,!0),l=i;do{if(a===0){Gl&&!i&&Ri(e,t,0,!1);break}else{if(n=e.current.alternate,l&&!Mv(n)){a=S2(e,t,!1),l=!1;continue}if(a===2){if(l=t,e.errorRecoveryDisabledLanes&l)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var r=e;a=ur;var o=r.current.memoizedState.isDehydrated;if(o&&(ql(r,s).flags|=256),s=S2(r,s,!1),s!==2){if(g2&&!o){r.errorRecoveryDisabledLanes|=l,ja|=l,a=4;break e}l=vt,vt=a,l!==null&&(vt===null?vt=l:vt.push.apply(vt,l))}a=s}if(l=!1,a!==2)continue}}if(a===1){ql(e,0),Ri(e,t,0,!0);break}e:{switch(i=e,l=a,l){case 0:case 1:throw Error(S(345));case 4:if((t&4194048)!==t)break;case 6:Ri(i,t,Ft,!ki);break e;case 2:vt=null;break;case 3:case 5:break;default:throw Error(S(329))}if((t&62914560)===t&&(a=uo+300-Lt(),10<a)){if(Ri(i,t,Ft,!ki),bu(i,0,!0)!==0)break e;si=t,i.timeoutHandle=sw(Cg.bind(null,i,n,vt,co,y2,t,Ft,ja,Hl,ki,l,"Throttled",-0,0),a);break e}Cg(i,n,vt,co,y2,t,Ft,ja,Hl,ki,l,null,-0,0)}}break}while(!0);Un(e)}function Cg(e,t,n,i,a,l,s,r,o,c,f,h,d,m){if(e.timeoutHandle=-1,h=t.subtreeFlags,h&8192||(h&16785408)===16785408){h={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},Sg(t,l,h);var v=(l&62914560)===l?uo-Lt():(l&4194048)===l?Ag-Lt():0;if(v=h8(h,v),v!==null){si=l,e.cancelPendingCommit=v(Rg.bind(null,e,t,l,n,i,a,s,r,o,f,h,null,d,m)),Ri(e,l,s,!c);return}}Rg(e,t,l,n,i,a,s,r,o)}function Mv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var a=n[i],l=a.getSnapshot;a=a.value;try{if(!Rt(l(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ri(e,t,n,i){t&=~w2,t&=~ja,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var a=t;0<a;){var l=31-Bt(a),s=1<<l;i[l]=-1,a&=~s}n!==0&&H3(e,n,t)}function fo(){return P&6?!0:(cr(0),!1)}function x2(){if(q!==null){if(ee===0)var e=q.return;else e=q,In=va=null,Bd(e),Ol=null,Qs=0,e=q;for(;e!==null;)rg(e.alternate,e),e=e.return;q=null}}function ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Iv(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),si=0,x2(),le=e,q=n=Zn(e.current,null),Y=t,ee=0,qt=null,ki=!1,Gl=Ms(e,t),g2=!1,Hl=Ft=w2=ja=Li=Se=0,vt=ur=null,y2=!1,t&8&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var a=31-Bt(i),l=1<<a;t|=e[a],i&=~l}return li=t,Ou(),n}function Dg(e,t){H=null,B.H=er,t===Dl||t===Hu?(t=Z4(),ee=3):t===Td?(t=Z4(),ee=4):ee=t===$d?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,q===null&&(Se=1,eo(e,nn(t,e.current)))}function Og(){var e=Ht.current;return e===null?!0:(Y&4194048)===Y?rn===null:(Y&62914560)===Y||Y&536870912?e===rn:!1}function zg(){var e=B.H;return B.H=er,e===null?er:e}function kg(){var e=B.A;return B.A=Nv,e}function ho(){Se=4,ki||(Y&4194048)!==Y&&Ht.current!==null||(Gl=!0),!(Li&134217727)&&!(ja&134217727)||le===null||Ri(le,Y,Ft,!1)}function S2(e,t,n){var i=P;P|=2;var a=zg(),l=kg();(le!==e||Y!==t)&&(co=null,ql(e,t)),t=!1;var s=Se;e:do try{if(ee!==0&&q!==null){var r=q,o=qt;switch(ee){case 8:x2(),s=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var c=ee;if(ee=0,qt=null,Fl(e,r,o,c),n&&Gl){s=0;break e}break;default:c=ee,ee=0,qt=null,Fl(e,r,o,c)}}Cv(),s=Se;break}catch(f){Dg(e,f)}while(!0);return t&&e.shellSuspendCounter++,In=va=null,P=i,B.H=a,B.A=l,q===null&&(le=null,Y=0,Ou()),s}function Cv(){for(;q!==null;)Lg(q)}function Dv(e,t){var n=P;P|=2;var i=zg(),a=kg();le!==e||Y!==t?(co=null,oo=Lt()+500,ql(e,t)):Gl=Ms(e,t);e:do try{if(ee!==0&&q!==null){t=q;var l=qt;t:switch(ee){case 1:ee=0,qt=null,Fl(e,t,l,1);break;case 2:case 9:if(X4(l)){ee=0,qt=null,Ug(t);break}t=function(){ee!==2&&ee!==9||le!==e||(ee=7),Un(e)},l.then(t,t);break e;case 3:ee=7;break e;case 4:ee=5;break e;case 7:X4(l)?(ee=0,qt=null,Ug(t)):(ee=0,qt=null,Fl(e,t,l,7));break;case 5:var s=null;switch(q.tag){case 26:s=q.memoizedState;case 5:case 27:var r=q;if(s?xw(s):r.stateNode.complete){ee=0,qt=null;var o=r.sibling;if(o!==null)q=o;else{var c=r.return;c!==null?(q=c,mo(c)):q=null}break t}}ee=0,qt=null,Fl(e,t,l,5);break;case 6:ee=0,qt=null,Fl(e,t,l,6);break;case 8:x2(),Se=6;break e;default:throw Error(S(462))}}Ov();break}catch(f){Dg(e,f)}while(!0);return In=va=null,B.H=i,B.A=a,P=n,q!==null?0:(le=null,Y=0,Ou(),Se)}function Ov(){for(;q!==null&&!tp();)Lg(q)}function Lg(e){var t=lg(e.alternate,e,li);e.memoizedProps=e.pendingProps,t===null?mo(e):q=t}function Ug(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=$m(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=$m(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Bd(t);default:rg(n,t),t=q=k4(t,li),t=lg(n,t,li)}e.memoizedProps=e.pendingProps,t===null?mo(e):q=t}function Fl(e,t,n,i){In=va=null,Bd(t),Ol=null,Qs=0;var a=t.return;try{if(bv(e,a,t,n,Y)){Se=1,eo(e,nn(n,e.current)),q=null;return}}catch(l){if(a!==null)throw q=a,l;Se=1,eo(e,nn(n,e.current)),q=null;return}t.flags&32768?(X||i===1?e=!0:Gl||Y&536870912?e=!1:(ki=e=!0,(i===2||i===9||i===3||i===6)&&(i=Ht.current,i!==null&&i.tag===13&&(i.flags|=16384))),Bg(t,e)):mo(t)}function mo(e){var t=e;do{if(t.flags&32768){Bg(t,ki);return}e=t.return;var n=Ev(t.alternate,t,li);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);Se===0&&(Se=5)}function Bg(e,t){do{var n=_v(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);Se=6,q=null}function Rg(e,t,n,i,a,l,s,r,o){e.cancelPendingCommit=null;do go();while(Fe!==0);if(P&6)throw Error(S(327));if(t!==null){if(t===e.current)throw Error(S(177));if(l=t.lanes|t.childLanes,l|=cd,fp(e,n,l,s,r,o),e===le&&(q=le=null,Y=0),Vl=t,Bi=e,si=n,p2=l,v2=a,Ng=i,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Uv(wu,function(){return Fg(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,t.subtreeFlags&13878||i){i=B.T,B.T=null,a=W.p,W.p=2,s=P,P|=4;try{Tv(e,t,n)}finally{P=s,W.p=a,B.T=i}}Fe=1,Gg(),Hg(),Vg()}}function Gg(){if(Fe===1){Fe=0;var e=Bi,t=Vl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=B.T,B.T=null;var i=W.p;W.p=2;var a=P;P|=4;try{vg(t,e);var l=k2,s=T4(e.containerInfo),r=l.focusedElem,o=l.selectionRange;if(s!==r&&r&&r.ownerDocument&&_4(r.ownerDocument.documentElement,r)){if(o!==null&&ld(r)){var c=o.start,f=o.end;if(f===void 0&&(f=c),"selectionStart"in r)r.selectionStart=c,r.selectionEnd=Math.min(f,r.value.length);else{var h=r.ownerDocument||document,d=h&&h.defaultView||window;if(d.getSelection){var m=d.getSelection(),v=r.textContent.length,x=Math.min(o.start,v),E=o.end===void 0?x:Math.min(o.end,v);!m.extend&&x>E&&(s=E,E=x,x=s);var g=E4(r,x),w=E4(r,E);if(g&&w&&(m.rangeCount!==1||m.anchorNode!==g.node||m.anchorOffset!==g.offset||m.focusNode!==w.node||m.focusOffset!==w.offset)){var p=h.createRange();p.setStart(g.node,g.offset),m.removeAllRanges(),x>E?(m.addRange(p),m.extend(w.node,w.offset)):(p.setEnd(w.node,w.offset),m.addRange(p))}}}}for(h=[],m=r;m=m.parentNode;)m.nodeType===1&&h.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<h.length;r++){var b=h[r];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}No=!!z2,k2=z2=null}finally{P=a,W.p=i,B.T=n}}e.current=t,Fe=2}}function Hg(){if(Fe===2){Fe=0;var e=Bi,t=Vl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=B.T,B.T=null;var i=W.p;W.p=2;var a=P;P|=4;try{mg(e,t.alternate,t)}finally{P=a,W.p=i,B.T=n}}Fe=3}}function Vg(){if(Fe===4||Fe===3){Fe=0,np();var e=Bi,t=Vl,n=si,i=Ng;t.subtreeFlags&10256||t.flags&10256?Fe=5:(Fe=0,Vl=Bi=null,qg(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Ui=null),Hf(n),t=t.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(js,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=B.T,a=W.p,W.p=2,B.T=null;try{for(var l=e.onRecoverableError,s=0;s<i.length;s++){var r=i[s];l(r.value,{componentStack:r.stack})}}finally{B.T=t,W.p=a}}si&3&&go(),Un(e),a=e.pendingLanes,n&261930&&a&42?e===b2?or++:(or=0,b2=e):or=0,cr(0)}}function qg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ys(t)))}function go(){return Gg(),Hg(),Vg(),Fg()}function Fg(){if(Fe!==5)return!1;var e=Bi,t=p2;p2=0;var n=Hf(si),i=B.T,a=W.p;try{W.p=32>n?32:n,B.T=null,n=v2,v2=null;var l=Bi,s=si;if(Fe=0,Vl=Bi=null,si=0,P&6)throw Error(S(331));var r=P;if(P|=4,_g(l.current),xg(l,l.current,s,n),P=r,cr(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(js,l)}catch{}return!0}finally{W.p=a,B.T=i,qg(e,t)}}function Yg(e,t,n){t=nn(n,t),t=Pd(e.stateNode,t,2),e=Ci(e,t,2),e!==null&&(Cs(e,2),Un(e))}function te(e,t,n){if(e.tag===3)Yg(e,e,n);else for(;t!==null;){if(t.tag===3){Yg(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ui===null||!Ui.has(i))){e=nn(n,e),n=Xm(2),i=Ci(t,n,2),i!==null&&(Qm(n,i,t,e),Cs(i,2),Un(i));break}}t=t.return}}function E2(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new jv;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(n)||(g2=!0,a.add(n),e=zv.bind(null,e,t,n),t.then(e,e))}function zv(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,le===e&&(Y&n)===n&&(Se===4||Se===3&&(Y&62914560)===Y&&300>Lt()-uo?!(P&2)&&ql(e,0):w2|=n,Hl===Y&&(Hl=0)),Un(e)}function Xg(e,t){t===0&&(t=G3()),e=wa(e,t),e!==null&&(Cs(e,t),Un(e))}function kv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xg(e,n)}function Lv(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(S(314))}i!==null&&i.delete(t),Xg(e,n)}function Uv(e,t){return Uf(e,t)}var wo=null,Yl=null,_2=!1,yo=!1,T2=!1,Gi=0;function Un(e){e!==Yl&&e.next===null&&(Yl===null?wo=Yl=e:Yl=Yl.next=e),yo=!0,_2||(_2=!0,Rv())}function cr(e,t){if(!T2&&yo){T2=!0;do for(var n=!1,i=wo;i!==null;){if(e!==0){var a=i.pendingLanes;if(a===0)var l=0;else{var s=i.suspendedLanes,r=i.pingedLanes;l=(1<<31-Bt(42|e)+1)-1,l&=a&~(s&~r),l=l&201326741?l&201326741|1:l?l|2:0}l!==0&&(n=!0,Ig(i,l))}else l=Y,l=bu(i,i===le?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),!(l&3)||Ms(i,l)||(n=!0,Ig(i,l));i=i.next}while(n);T2=!1}}function Bv(){Qg()}function Qg(){yo=_2=!1;var e=0;Gi!==0&&Kv()&&(e=Gi);for(var t=Lt(),n=null,i=wo;i!==null;){var a=i.next,l=Zg(i,t);l===0?(i.next=null,n===null?wo=a:n.next=a,a===null&&(Yl=n)):(n=i,(e!==0||l&3)&&(yo=!0)),i=a}Fe!==0&&Fe!==5||cr(e),Gi!==0&&(Gi=0)}function Zg(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,l=e.pendingLanes&-62914561;0<l;){var s=31-Bt(l),r=1<<s,o=a[s];o===-1?(!(r&n)||r&i)&&(a[s]=cp(r,t)):o<=t&&(e.expiredLanes|=r),l&=~r}if(t=le,n=Y,n=bu(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,n===0||e===t&&(ee===2||ee===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&Bf(i),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ms(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&Bf(i),Hf(n)){case 2:case 8:n=B3;break;case 32:n=wu;break;case 268435456:n=R3;break;default:n=wu}return i=Kg.bind(null,e),n=Uf(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&Bf(i),e.callbackPriority=2,e.callbackNode=null,2}function Kg(e,t){if(Fe!==0&&Fe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(go()&&e.callbackNode!==n)return null;var i=Y;return i=bu(e,e===le?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Mg(e,i,t),Zg(e,Lt()),e.callbackNode!=null&&e.callbackNode===n?Kg.bind(null,e):null)}function Ig(e,t){if(go())return null;Mg(e,t,!0)}function Rv(){Jv(function(){P&6?Uf(U3,Bv):Qg()})}function A2(){if(Gi===0){var e=Ml;e===0&&(e=yu,yu<<=1,!(yu&261888)&&(yu=256)),Gi=e}return Gi}function Jg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_u(""+e)}function Wg(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Gv(e,t,n,i,a){if(t==="submit"&&n&&n.stateNode===a){var l=Jg((a[mt]||null).action),s=i.submitter;s&&(t=(t=s[mt]||null)?Jg(t.formAction):s.getAttribute("formAction"),t!==null&&(l=t,s=null));var r=new ju("action","action",null,i,a);e.push({event:r,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Gi!==0){var o=s?Wg(a,s):new FormData(a);Qd(n,{pending:!0,data:o,method:a.method,action:l},null,o)}}else typeof l=="function"&&(r.preventDefault(),o=s?Wg(a,s):new FormData(a),Qd(n,{pending:!0,data:o,method:a.method,action:l},l,o))},currentTarget:a}]})}}for(var N2=0;N2<od.length;N2++){var j2=od[N2],Hv=j2.toLowerCase(),Vv=j2[0].toUpperCase()+j2.slice(1);yn(Hv,"on"+Vv)}yn(j4,"onAnimationEnd"),yn(M4,"onAnimationIteration"),yn(C4,"onAnimationStart"),yn("dblclick","onDoubleClick"),yn("focusin","onFocus"),yn("focusout","onBlur"),yn(iv,"onTransitionRun"),yn(av,"onTransitionStart"),yn(lv,"onTransitionCancel"),yn(D4,"onTransitionEnd"),gl("onMouseEnter",["mouseout","mouseover"]),gl("onMouseLeave",["mouseout","mouseover"]),gl("onPointerEnter",["pointerout","pointerover"]),gl("onPointerLeave",["pointerout","pointerover"]),da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),da("onBeforeInput",["compositionend","keypress","textInput","paste"]),da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fr="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(" "),qv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fr));function Pg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],a=i.event;i=i.listeners;e:{var l=void 0;if(t)for(var s=i.length-1;0<=s;s--){var r=i[s],o=r.instance,c=r.currentTarget;if(r=r.listener,o!==l&&a.isPropagationStopped())break e;l=r,a.currentTarget=c;try{l(a)}catch(f){Du(f)}a.currentTarget=null,l=o}else for(s=0;s<i.length;s++){if(r=i[s],o=r.instance,c=r.currentTarget,r=r.listener,o!==l&&a.isPropagationStopped())break e;l=r,a.currentTarget=c;try{l(a)}catch(f){Du(f)}a.currentTarget=null,l=o}}}}function F(e,t){var n=t[Vf];n===void 0&&(n=t[Vf]=new Set);var i=e+"__bubble";n.has(i)||($g(t,e,2,!1),n.add(i))}function M2(e,t,n){var i=0;t&&(i|=4),$g(n,e,i,t)}var po="_reactListening"+Math.random().toString(36).slice(2);function C2(e){if(!e[po]){e[po]=!0,Q3.forEach(function(n){n!=="selectionchange"&&(qv.has(n)||M2(n,!1,e),M2(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[po]||(t[po]=!0,M2("selectionchange",!1,t))}}function $g(e,t,n,i){switch(jw(t)){case 2:var a=w8;break;case 8:a=y8;break;default:a=X2}n=a.bind(null,t,n,e),a=void 0,!Jf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function D2(e,t,n,i,a){var l=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var s=i.tag;if(s===3||s===4){var r=i.stateNode.containerInfo;if(r===a)break;if(s===4)for(s=i.return;s!==null;){var o=s.tag;if((o===3||o===4)&&s.stateNode.containerInfo===a)return;s=s.return}for(;r!==null;){if(s=dl(r),s===null)return;if(o=s.tag,o===5||o===6||o===26||o===27){i=l=s;continue e}r=r.parentNode}}i=i.return}a4(function(){var c=l,f=Kf(n),h=[];e:{var d=O4.get(e);if(d!==void 0){var m=ju,v=e;switch(e){case"keypress":if(Au(n)===0)break e;case"keydown":case"keyup":m=Lp;break;case"focusin":v="focus",m=ed;break;case"focusout":v="blur",m=ed;break;case"beforeblur":case"afterblur":m=ed;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=r4;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Ep;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Rp;break;case j4:case M4:case C4:m=Ap;break;case D4:m=Hp;break;case"scroll":case"scrollend":m=xp;break;case"wheel":m=qp;break;case"copy":case"cut":case"paste":m=jp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=o4;break;case"toggle":case"beforetoggle":m=Yp}var x=(t&4)!==0,E=!x&&(e==="scroll"||e==="scrollend"),g=x?d!==null?d+"Capture":null:d;x=[];for(var w=c,p;w!==null;){var b=w;if(p=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||p===null||g===null||(b=zs(w,g),b!=null&&x.push(dr(w,b,p))),E)break;w=w.return}0<x.length&&(d=new m(d,v,null,n,f),h.push({event:d,listeners:x}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",d&&n!==Zf&&(v=n.relatedTarget||n.fromElement)&&(dl(v)||v[fl]))break e;if((m||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=c,v=v?dl(v):null,v!==null&&(E=Es(v),x=v.tag,v!==E||x!==5&&x!==27&&x!==6)&&(v=null)):(m=null,v=c),m!==v)){if(x=r4,b="onMouseLeave",g="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(x=o4,b="onPointerLeave",g="onPointerEnter",w="pointer"),E=m==null?d:Os(m),p=v==null?d:Os(v),d=new x(b,w+"leave",m,n,f),d.target=E,d.relatedTarget=p,b=null,dl(f)===c&&(x=new x(g,w+"enter",v,n,f),x.target=p,x.relatedTarget=E,b=x),E=b,m&&v)t:{for(x=Fv,g=m,w=v,p=0,b=g;b;b=x(b))p++;b=0;for(var A=w;A;A=x(A))b++;for(;0<p-b;)g=x(g),p--;for(;0<b-p;)w=x(w),b--;for(;p--;){if(g===w||w!==null&&g===w.alternate){x=g;break t}g=x(g),w=x(w)}x=null}else x=null;m!==null&&ew(h,d,m,x,!1),v!==null&&E!==null&&ew(h,E,v,x,!0)}}e:{if(d=c?Os(c):window,m=d.nodeName&&d.nodeName.toLowerCase(),m==="select"||m==="input"&&d.type==="file")var N=y4;else if(g4(d))if(p4)N=ev;else{N=Pp;var _=Wp}else m=d.nodeName,!m||m.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&Qf(c.elementType)&&(N=y4):N=$p;if(N&&(N=N(e,c))){w4(h,N,n,f);break e}_&&_(e,d,c),e==="focusout"&&c&&d.type==="number"&&c.memoizedProps.value!=null&&Xf(d,"number",d.value)}switch(_=c?Os(c):window,e){case"focusin":(g4(_)||_.contentEditable==="true")&&(xl=_,sd=c,Vs=null);break;case"focusout":Vs=sd=xl=null;break;case"mousedown":rd=!0;break;case"contextmenu":case"mouseup":case"dragend":rd=!1,A4(h,n,f);break;case"selectionchange":if(nv)break;case"keydown":case"keyup":A4(h,n,f)}var M;if(nd)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else bl?h4(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(c4&&n.locale!=="ko"&&(bl||T!=="onCompositionStart"?T==="onCompositionEnd"&&bl&&(M=l4()):(Ei=f,Wf="value"in Ei?Ei.value:Ei.textContent,bl=!0)),_=vo(c,T),0<_.length&&(T=new u4(T,e,null,n,f),h.push({event:T,listeners:_}),M?T.data=M:(M=m4(n),M!==null&&(T.data=M)))),(M=Qp?Zp(e,n):Kp(e,n))&&(T=vo(c,"onBeforeInput"),0<T.length&&(_=new u4("onBeforeInput","beforeinput",null,n,f),h.push({event:_,listeners:T}),_.data=M)),Gv(h,e,c,n,f)}Pg(h,t)})}function dr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vo(e,t){for(var n=t+"Capture",i=[];e!==null;){var a=e,l=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||l===null||(a=zs(e,n),a!=null&&i.unshift(dr(e,a,l)),a=zs(e,t),a!=null&&i.push(dr(e,a,l))),e.tag===3)return i;e=e.return}return[]}function Fv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ew(e,t,n,i,a){for(var l=t._reactName,s=[];n!==null&&n!==i;){var r=n,o=r.alternate,c=r.stateNode;if(r=r.tag,o!==null&&o===i)break;r!==5&&r!==26&&r!==27||c===null||(o=c,a?(c=zs(n,l),c!=null&&s.unshift(dr(n,c,o))):a||(c=zs(n,l),c!=null&&s.push(dr(n,c,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var Yv=/\r\n?/g,Xv=/\u0000|\uFFFD/g;function tw(e){return(typeof e=="string"?e:""+e).replace(Yv,`
106
- `).replace(Xv,"")}function nw(e,t){return t=tw(t),tw(e)===t}function ae(e,t,n,i,a,l){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||yl(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&yl(e,""+i);break;case"className":Su(e,"class",i);break;case"tabIndex":Su(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Su(e,n,i);break;case"style":n4(e,i,l);break;case"data":if(t!=="object"){Su(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=_u(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof l=="function"&&(n==="formAction"?(t!=="input"&&ae(e,t,"name",a.name,a,null),ae(e,t,"formEncType",a.formEncType,a,null),ae(e,t,"formMethod",a.formMethod,a,null),ae(e,t,"formTarget",a.formTarget,a,null)):(ae(e,t,"encType",a.encType,a,null),ae(e,t,"method",a.method,a,null),ae(e,t,"target",a.target,a,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=_u(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=Xn);break;case"onScroll":i!=null&&F("scroll",e);break;case"onScrollEnd":i!=null&&F("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(S(61));if(n=i.__html,n!=null){if(a.children!=null)throw Error(S(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}n=_u(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":F("beforetoggle",e),F("toggle",e),xu(e,"popover",i);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":xu(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=vp.get(n)||n,xu(e,n,i))}}function O2(e,t,n,i,a,l){switch(n){case"style":n4(e,i,l);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(S(61));if(n=i.__html,n!=null){if(a.children!=null)throw Error(S(60));e.innerHTML=n}}break;case"children":typeof i=="string"?yl(e,i):(typeof i=="number"||typeof i=="bigint")&&yl(e,""+i);break;case"onScroll":i!=null&&F("scroll",e);break;case"onScrollEnd":i!=null&&F("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Z3.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),l=e[mt]||null,l=l!=null?l[n]:null,typeof l=="function"&&e.removeEventListener(t,l,a),typeof i=="function")){typeof l!="function"&&l!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,a);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):xu(e,n,i)}}}function nt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":F("error",e),F("load",e);var i=!1,a=!1,l;for(l in n)if(n.hasOwnProperty(l)){var s=n[l];if(s!=null)switch(l){case"src":i=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(S(137,t));default:ae(e,t,l,s,n,null)}}a&&ae(e,t,"srcSet",n.srcSet,n,null),i&&ae(e,t,"src",n.src,n,null);return;case"input":F("invalid",e);var r=l=s=a=null,o=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var f=n[i];if(f!=null)switch(i){case"name":a=f;break;case"type":s=f;break;case"checked":o=f;break;case"defaultChecked":c=f;break;case"value":l=f;break;case"defaultValue":r=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(S(137,t));break;default:ae(e,t,i,f,n,null)}}P3(e,l,r,o,c,s,a,!1);return;case"select":F("invalid",e),i=s=l=null;for(a in n)if(n.hasOwnProperty(a)&&(r=n[a],r!=null))switch(a){case"value":l=r;break;case"defaultValue":s=r;break;case"multiple":i=r;default:ae(e,t,a,r,n,null)}t=l,n=s,e.multiple=!!i,t!=null?wl(e,!!i,t,!1):n!=null&&wl(e,!!i,n,!0);return;case"textarea":F("invalid",e),l=a=i=null;for(s in n)if(n.hasOwnProperty(s)&&(r=n[s],r!=null))switch(s){case"value":i=r;break;case"defaultValue":a=r;break;case"children":l=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(S(91));break;default:ae(e,t,s,r,n,null)}e4(e,i,a,l);return;case"option":for(o in n)if(n.hasOwnProperty(o)&&(i=n[o],i!=null))switch(o){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:ae(e,t,o,i,n,null)}return;case"dialog":F("beforetoggle",e),F("toggle",e),F("cancel",e),F("close",e);break;case"iframe":case"object":F("load",e);break;case"video":case"audio":for(i=0;i<fr.length;i++)F(fr[i],e);break;case"image":F("error",e),F("load",e);break;case"details":F("toggle",e);break;case"embed":case"source":case"link":F("error",e),F("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(i=n[c],i!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(S(137,t));default:ae(e,t,c,i,n,null)}return;default:if(Qf(t)){for(f in n)n.hasOwnProperty(f)&&(i=n[f],i!==void 0&&O2(e,t,f,i,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(i=n[r],i!=null&&ae(e,t,r,i,n,null))}function Qv(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,l=null,s=null,r=null,o=null,c=null,f=null;for(m in n){var h=n[m];if(n.hasOwnProperty(m)&&h!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":o=h;default:i.hasOwnProperty(m)||ae(e,t,m,null,i,h)}}for(var d in i){var m=i[d];if(h=n[d],i.hasOwnProperty(d)&&(m!=null||h!=null))switch(d){case"type":l=m;break;case"name":a=m;break;case"checked":c=m;break;case"defaultChecked":f=m;break;case"value":s=m;break;case"defaultValue":r=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(S(137,t));break;default:m!==h&&ae(e,t,d,m,i,h)}}Yf(e,s,r,o,c,f,l,a);return;case"select":m=s=r=d=null;for(l in n)if(o=n[l],n.hasOwnProperty(l)&&o!=null)switch(l){case"value":break;case"multiple":m=o;default:i.hasOwnProperty(l)||ae(e,t,l,null,i,o)}for(a in i)if(l=i[a],o=n[a],i.hasOwnProperty(a)&&(l!=null||o!=null))switch(a){case"value":d=l;break;case"defaultValue":r=l;break;case"multiple":s=l;default:l!==o&&ae(e,t,a,l,i,o)}t=r,n=s,i=m,d!=null?wl(e,!!n,d,!1):!!i!=!!n&&(t!=null?wl(e,!!n,t,!0):wl(e,!!n,n?[]:"",!1));return;case"textarea":m=d=null;for(r in n)if(a=n[r],n.hasOwnProperty(r)&&a!=null&&!i.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:ae(e,t,r,null,i,a)}for(s in i)if(a=i[s],l=n[s],i.hasOwnProperty(s)&&(a!=null||l!=null))switch(s){case"value":d=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(S(91));break;default:a!==l&&ae(e,t,s,a,i,l)}$3(e,d,m);return;case"option":for(var v in n)if(d=n[v],n.hasOwnProperty(v)&&d!=null&&!i.hasOwnProperty(v))switch(v){case"selected":e.selected=!1;break;default:ae(e,t,v,null,i,d)}for(o in i)if(d=i[o],m=n[o],i.hasOwnProperty(o)&&d!==m&&(d!=null||m!=null))switch(o){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:ae(e,t,o,d,i,m)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in n)d=n[x],n.hasOwnProperty(x)&&d!=null&&!i.hasOwnProperty(x)&&ae(e,t,x,null,i,d);for(c in i)if(d=i[c],m=n[c],i.hasOwnProperty(c)&&d!==m&&(d!=null||m!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(S(137,t));break;default:ae(e,t,c,d,i,m)}return;default:if(Qf(t)){for(var E in n)d=n[E],n.hasOwnProperty(E)&&d!==void 0&&!i.hasOwnProperty(E)&&O2(e,t,E,void 0,i,d);for(f in i)d=i[f],m=n[f],!i.hasOwnProperty(f)||d===m||d===void 0&&m===void 0||O2(e,t,f,d,i,m);return}}for(var g in n)d=n[g],n.hasOwnProperty(g)&&d!=null&&!i.hasOwnProperty(g)&&ae(e,t,g,null,i,d);for(h in i)d=i[h],m=n[h],!i.hasOwnProperty(h)||d===m||d==null&&m==null||ae(e,t,h,d,i,m)}function iw(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var a=n[i],l=a.transferSize,s=a.initiatorType,r=a.duration;if(l&&r&&iw(s)){for(s=0,r=a.responseEnd,i+=1;i<n.length;i++){var o=n[i],c=o.startTime;if(c>r)break;var f=o.transferSize,h=o.initiatorType;f&&iw(h)&&(o=o.responseEnd,s+=f*(o<r?1:(r-c)/(o-c)))}if(--i,t+=8*(l+s)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var z2=null,k2=null;function bo(e){return e.nodeType===9?e:e.ownerDocument}function aw(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function lw(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function L2(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var U2=null;function Kv(){var e=window.event;return e&&e.type==="popstate"?e===U2?!1:(U2=e,!0):(U2=null,!1)}var sw=typeof setTimeout=="function"?setTimeout:void 0,Iv=typeof clearTimeout=="function"?clearTimeout:void 0,rw=typeof Promise=="function"?Promise:void 0,Jv=typeof queueMicrotask=="function"?queueMicrotask:typeof rw<"u"?function(e){return rw.resolve(null).then(e).catch(Wv)}:sw;function Wv(e){setTimeout(function(){throw e})}function Hi(e){return e==="head"}function uw(e,t){var n=t,i=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(i===0){e.removeChild(a),Kl(t);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")hr(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,hr(n);for(var l=n.firstChild;l;){var s=l.nextSibling,r=l.nodeName;l[Ds]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&l.rel.toLowerCase()==="stylesheet"||n.removeChild(l),l=s}}else n==="body"&&hr(e.ownerDocument.body);n=a}while(n);Kl(t)}function ow(e,t){var n=e;e=0;do{var i=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=i}while(n)}function B2(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":B2(n),qf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Pv(e,t,n,i){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Ds])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(l=e.getAttribute("rel"),l==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(l!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(l=e.getAttribute("src"),(l!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&l&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var l=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===l)return e}else return e;if(e=un(e.nextSibling),e===null)break}return null}function $v(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=un(e.nextSibling),e===null))return null;return e}function cw(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=un(e.nextSibling),e===null))return null;return e}function R2(e){return e.data==="$?"||e.data==="$~"}function G2(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function e8(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function un(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var H2=null;function fw(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return un(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function dw(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function hw(e,t,n){switch(t=bo(n),e){case"html":if(e=t.documentElement,!e)throw Error(S(452));return e;case"head":if(e=t.head,!e)throw Error(S(453));return e;case"body":if(e=t.body,!e)throw Error(S(454));return e;default:throw Error(S(451))}}function hr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qf(e)}var on=new Map,mw=new Set;function xo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ri=W.d;W.d={f:t8,r:n8,D:i8,C:a8,L:l8,m:s8,X:u8,S:r8,M:o8};function t8(){var e=ri.f(),t=fo();return e||t}function n8(e){var t=hl(e);t!==null&&t.tag===5&&t.type==="form"?Dm(t):ri.r(e)}var Xl=typeof document>"u"?null:document;function gw(e,t,n){var i=Xl;if(i&&typeof t=="string"&&t){var a=en(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),mw.has(a)||(mw.add(a),e={rel:e,crossOrigin:n,href:t},i.querySelector(a)===null&&(t=i.createElement("link"),nt(t,"link",e),Ie(t),i.head.appendChild(t)))}}function i8(e){ri.D(e),gw("dns-prefetch",e,null)}function a8(e,t){ri.C(e,t),gw("preconnect",e,t)}function l8(e,t,n){ri.L(e,t,n);var i=Xl;if(i&&e&&t){var a='link[rel="preload"][as="'+en(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+en(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+en(n.imageSizes)+'"]')):a+='[href="'+en(e)+'"]';var l=a;switch(t){case"style":l=Ql(e);break;case"script":l=Zl(e)}on.has(l)||(e=oe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),on.set(l,e),i.querySelector(a)!==null||t==="style"&&i.querySelector(mr(l))||t==="script"&&i.querySelector(gr(l))||(t=i.createElement("link"),nt(t,"link",e),Ie(t),i.head.appendChild(t)))}}function s8(e,t){ri.m(e,t);var n=Xl;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+en(i)+'"][href="'+en(e)+'"]',l=a;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":l=Zl(e)}if(!on.has(l)&&(e=oe({rel:"modulepreload",href:e},t),on.set(l,e),n.querySelector(a)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gr(l)))return}i=n.createElement("link"),nt(i,"link",e),Ie(i),n.head.appendChild(i)}}}function r8(e,t,n){ri.S(e,t,n);var i=Xl;if(i&&e){var a=ml(i).hoistableStyles,l=Ql(e);t=t||"default";var s=a.get(l);if(!s){var r={loading:0,preload:null};if(s=i.querySelector(mr(l)))r.loading=5;else{e=oe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=on.get(l))&&V2(e,n);var o=s=i.createElement("link");Ie(o),nt(o,"link",e),o._p=new Promise(function(c,f){o.onload=c,o.onerror=f}),o.addEventListener("load",function(){r.loading|=1}),o.addEventListener("error",function(){r.loading|=2}),r.loading|=4,So(s,t,i)}s={type:"stylesheet",instance:s,count:1,state:r},a.set(l,s)}}}function u8(e,t){ri.X(e,t);var n=Xl;if(n&&e){var i=ml(n).hoistableScripts,a=Zl(e),l=i.get(a);l||(l=n.querySelector(gr(a)),l||(e=oe({src:e,async:!0},t),(t=on.get(a))&&q2(e,t),l=n.createElement("script"),Ie(l),nt(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},i.set(a,l))}}function o8(e,t){ri.M(e,t);var n=Xl;if(n&&e){var i=ml(n).hoistableScripts,a=Zl(e),l=i.get(a);l||(l=n.querySelector(gr(a)),l||(e=oe({src:e,async:!0,type:"module"},t),(t=on.get(a))&&q2(e,t),l=n.createElement("script"),Ie(l),nt(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},i.set(a,l))}}function ww(e,t,n,i){var a=(a=bi.current)?xo(a):null;if(!a)throw Error(S(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=ml(a).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ql(n.href);var l=ml(a).hoistableStyles,s=l.get(e);if(s||(a=a.ownerDocument||a,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},l.set(e,s),(l=a.querySelector(mr(e)))&&!l._p&&(s.instance=l,s.state.loading=5),on.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},on.set(e,n),l||c8(a,e,n,s.state))),t&&i===null)throw Error(S(528,""));return s}if(t&&i!==null)throw Error(S(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zl(n),n=ml(a).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(S(444,e))}}function Ql(e){return'href="'+en(e)+'"'}function mr(e){return'link[rel="stylesheet"]['+e+"]"}function yw(e){return oe({},e,{"data-precedence":e.precedence,precedence:null})}function c8(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),nt(t,"link",n),Ie(t),e.head.appendChild(t))}function Zl(e){return'[src="'+en(e)+'"]'}function gr(e){return"script[async]"+e}function pw(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+en(n.href)+'"]');if(i)return t.instance=i,Ie(i),i;var a=oe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ie(i),nt(i,"style",a),So(i,n.precedence,e),t.instance=i;case"stylesheet":a=Ql(n.href);var l=e.querySelector(mr(a));if(l)return t.state.loading|=4,t.instance=l,Ie(l),l;i=yw(n),(a=on.get(a))&&V2(i,a),l=(e.ownerDocument||e).createElement("link"),Ie(l);var s=l;return s._p=new Promise(function(r,o){s.onload=r,s.onerror=o}),nt(l,"link",i),t.state.loading|=4,So(l,n.precedence,e),t.instance=l;case"script":return l=Zl(n.src),(a=e.querySelector(gr(l)))?(t.instance=a,Ie(a),a):(i=n,(a=on.get(l))&&(i=oe({},n),q2(i,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ie(a),nt(a,"link",i),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(S(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(i=t.instance,t.state.loading|=4,So(i,n.precedence,e));return t.instance}function So(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=i.length?i[i.length-1]:null,l=a,s=0;s<i.length;s++){var r=i[s];if(r.dataset.precedence===t)l=r;else if(l!==a)break}l?l.parentNode.insertBefore(e,l.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function V2(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function q2(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Eo=null;function vw(e,t,n){if(Eo===null){var i=new Map,a=Eo=new Map;a.set(n,i)}else a=Eo,i=a.get(n),i||(i=new Map,a.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var l=n[a];if(!(l[Ds]||l[Pe]||e==="link"&&l.getAttribute("rel")==="stylesheet")&&l.namespaceURI!=="http://www.w3.org/2000/svg"){var s=l.getAttribute(t)||"";s=e+s;var r=i.get(s);r?r.push(l):i.set(s,[l])}}return i}function bw(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function f8(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function xw(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function d8(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=Ql(i.href),l=t.querySelector(mr(a));if(l){t=l._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_o.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=l,Ie(l);return}l=t.ownerDocument||t,i=yw(i),(a=on.get(a))&&V2(i,a),l=l.createElement("link"),Ie(l);var s=l;s._p=new Promise(function(r,o){s.onload=r,s.onerror=o}),nt(l,"link",i),n.instance=l}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=_o.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var F2=0;function h8(e,t){return e.stylesheets&&e.count===0&&Ao(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var i=setTimeout(function(){if(e.stylesheets&&Ao(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4+t);0<e.imgBytes&&F2===0&&(F2=62500*Zv());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ao(e,e.stylesheets),e.unsuspend)){var l=e.unsuspend;e.unsuspend=null,l()}},(e.imgBytes>F2?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(a)}}:null}function _o(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ao(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var To=null;function Ao(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,To=new Map,t.forEach(m8,e),To=null,_o.call(e))}function m8(e,t){if(!(t.state.loading&4)){var n=To.get(e);if(n)var i=n.get(null);else{n=new Map,To.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),l=0;l<a.length;l++){var s=a[l];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),i=s)}i&&n.set(null,i)}a=t.instance,s=a.getAttribute("data-precedence"),l=n.get(s)||i,l===i&&n.set(null,a),n.set(s,a),this.count++,i=_o.bind(this),a.addEventListener("load",i),a.addEventListener("error",i),l?l.parentNode.insertBefore(a,l.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var wr={$$typeof:Fn,Provider:null,Consumer:null,_currentValue:oa,_currentValue2:oa,_threadCount:0};function g8(e,t,n,i,a,l,s,r,o){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Rf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rf(0),this.hiddenUpdates=Rf(null),this.identifierPrefix=i,this.onUncaughtError=a,this.onCaughtError=l,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function Sw(e,t,n,i,a,l,s,r,o,c,f,h){return e=new g8(e,t,n,s,o,c,f,h,r),t=1,l===!0&&(t|=24),l=Gt(3,null,null,t),e.current=l,l.stateNode=e,t=Sd(),t.refCount++,e.pooledCache=t,t.refCount++,l.memoizedState={element:i,isDehydrated:n,cache:t},Ad(l),e}function Ew(e){return e?(e=_l,e):_l}function _w(e,t,n,i,a,l){a=Ew(a),i.context===null?i.context=a:i.pendingContext=a,i=Mi(t),i.payload={element:n},l=l===void 0?null:l,l!==null&&(i.callback=l),n=Ci(e,i,t),n!==null&&(bt(n,e,t),Ks(n,e,t))}function Tw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Y2(e,t){Tw(e,t),(e=e.alternate)&&Tw(e,t)}function Aw(e){if(e.tag===13||e.tag===31){var t=wa(e,67108864);t!==null&&bt(t,e,67108864),Y2(e,67108864)}}function Nw(e){if(e.tag===13||e.tag===31){var t=Yt();t=Gf(t);var n=wa(e,t);n!==null&&bt(n,e,t),Y2(e,t)}}var No=!0;function w8(e,t,n,i){var a=B.T;B.T=null;var l=W.p;try{W.p=2,X2(e,t,n,i)}finally{W.p=l,B.T=a}}function y8(e,t,n,i){var a=B.T;B.T=null;var l=W.p;try{W.p=8,X2(e,t,n,i)}finally{W.p=l,B.T=a}}function X2(e,t,n,i){if(No){var a=Q2(i);if(a===null)D2(e,t,i,jo,n),Mw(e,i);else if(v8(a,e,t,n,i))i.stopPropagation();else if(Mw(e,i),t&4&&-1<p8.indexOf(e)){for(;a!==null;){var l=hl(a);if(l!==null)switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var s=fa(l.pendingLanes);if(s!==0){var r=l;for(r.pendingLanes|=2,r.entangledLanes|=2;s;){var o=1<<31-Bt(s);r.entanglements[1]|=o,s&=~o}Un(l),!(P&6)&&(oo=Lt()+500,cr(0))}}break;case 31:case 13:r=wa(l,2),r!==null&&bt(r,l,2),fo(),Y2(l,2)}if(l=Q2(i),l===null&&D2(e,t,i,jo,n),l===a)break;a=l}a!==null&&i.stopPropagation()}else D2(e,t,i,null,n)}}function Q2(e){return e=Kf(e),Z2(e)}var jo=null;function Z2(e){if(jo=null,e=dl(e),e!==null){var t=Es(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=N3(t),e!==null)return e;e=null}else if(n===31){if(e=j3(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return jo=e,null}function jw(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ip()){case U3:return 2;case B3:return 8;case wu:case ap:return 32;case R3:return 268435456;default:return 32}default:return 32}}var K2=!1,Vi=null,qi=null,Fi=null,yr=new Map,pr=new Map,Yi=[],p8="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".split(" ");function Mw(e,t){switch(e){case"focusin":case"focusout":Vi=null;break;case"dragenter":case"dragleave":qi=null;break;case"mouseover":case"mouseout":Fi=null;break;case"pointerover":case"pointerout":yr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pr.delete(t.pointerId)}}function vr(e,t,n,i,a,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:l,targetContainers:[a]},t!==null&&(t=hl(t),t!==null&&Aw(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function v8(e,t,n,i,a){switch(t){case"focusin":return Vi=vr(Vi,e,t,n,i,a),!0;case"dragenter":return qi=vr(qi,e,t,n,i,a),!0;case"mouseover":return Fi=vr(Fi,e,t,n,i,a),!0;case"pointerover":var l=a.pointerId;return yr.set(l,vr(yr.get(l)||null,e,t,n,i,a)),!0;case"gotpointercapture":return l=a.pointerId,pr.set(l,vr(pr.get(l)||null,e,t,n,i,a)),!0}return!1}function Cw(e){var t=dl(e.target);if(t!==null){var n=Es(t);if(n!==null){if(t=n.tag,t===13){if(t=N3(n),t!==null){e.blockedOn=t,Y3(e.priority,function(){Nw(n)});return}}else if(t===31){if(t=j3(n),t!==null){e.blockedOn=t,Y3(e.priority,function(){Nw(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Q2(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);Zf=i,n.target.dispatchEvent(i),Zf=null}else return t=hl(n),t!==null&&Aw(t),e.blockedOn=n,!1;t.shift()}return!0}function Dw(e,t,n){Mo(e)&&n.delete(t)}function b8(){K2=!1,Vi!==null&&Mo(Vi)&&(Vi=null),qi!==null&&Mo(qi)&&(qi=null),Fi!==null&&Mo(Fi)&&(Fi=null),yr.forEach(Dw),pr.forEach(Dw)}function Co(e,t){e.blockedOn===t&&(e.blockedOn=null,K2||(K2=!0,qe.unstable_scheduleCallback(qe.unstable_NormalPriority,b8)))}var Do=null;function Ow(e){Do!==e&&(Do=e,qe.unstable_scheduleCallback(qe.unstable_NormalPriority,function(){Do===e&&(Do=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],a=e[t+2];if(typeof i!="function"){if(Z2(i||n)===null)continue;break}var l=hl(n);l!==null&&(e.splice(t,3),t-=3,Qd(l,{pending:!0,data:a,method:n.method,action:i},i,a))}}))}function Kl(e){function t(o){return Co(o,e)}Vi!==null&&Co(Vi,e),qi!==null&&Co(qi,e),Fi!==null&&Co(Fi,e),yr.forEach(t),pr.forEach(t);for(var n=0;n<Yi.length;n++){var i=Yi[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Yi.length&&(n=Yi[0],n.blockedOn===null);)Cw(n),n.blockedOn===null&&Yi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var a=n[i],l=n[i+1],s=a[mt]||null;if(typeof l=="function")s||Ow(n);else if(s){var r=null;if(l&&l.hasAttribute("formAction")){if(a=l,s=l[mt]||null)r=s.formAction;else if(Z2(a)!==null)continue}else r=s.action;typeof r=="function"?n[i+1]=r:(n.splice(i,3),i-=3),Ow(n)}}}function zw(){function e(l){l.canIntercept&&l.info==="react-transition"&&l.intercept({handler:function(){return new Promise(function(s){return a=s})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var l=navigation.currentEntry;l&&l.url!=null&&navigation.navigate(l.url,{state:l.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function I2(e){this._internalRoot=e}Oo.prototype.render=I2.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));var n=t.current,i=Yt();_w(n,i,e,t,null,null)},Oo.prototype.unmount=I2.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_w(e.current,2,null,e,null,null),fo(),t[fl]=null}};function Oo(e){this._internalRoot=e}Oo.prototype.unstable_scheduleHydration=function(e){if(e){var t=F3();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yi.length&&t!==0&&t<Yi[n].priority;n++);Yi.splice(n,0,e),n===0&&Cw(e)}};var kw=T3.version;if(kw!=="19.2.0")throw Error(S(527,kw,"19.2.0"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=Jy(t),e=e!==null?C3(e):null,e=e===null?null:e.stateNode,e};var x8={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zo.isDisabled&&zo.supportsFiber)try{js=zo.inject(x8),Ut=zo}catch{}}fu.createRoot=function(e,t){if(!A3(e))throw Error(S(299));var n=!1,i="",a=Vm,l=qm,s=Fm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(l=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Sw(e,1,!1,null,null,n,i,null,a,l,s,zw),e[fl]=t.current,C2(e),new I2(t)},fu.hydrateRoot=function(e,t,n){if(!A3(e))throw Error(S(299));var i=!1,a="",l=Vm,s=qm,r=Fm,o=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(l=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(o=n.formState)),t=Sw(e,1,!0,t,n??null,i,a,o,l,s,r,zw),t.context=Ew(null),n=t.current,i=Yt(),i=Gf(i),a=Mi(i),a.callback=null,Ci(n,a,i),n=i,t.current.lanes=n,Cs(t,n),Un(t),e[fl]=t.current,C2(e),new Oo(t)},fu.version="19.2.0";function Lw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Lw)}catch(e){console.error(e)}}Lw(),S3.exports=fu;var S8=S3.exports;const E8=e=>u.jsx("span",{className:"iw-text-2xl",children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...e,children:[u.jsx("path",{d:"M0 0C9.01627 8.39148 22.9837 8.39148 32 0C23.6085 9.01627 23.6085 22.9837 32 32C22.9837 23.6085 9.01627 23.6085 0 32C8.39148 22.9837 8.39148 9.01627 0 0Z",fill:"url(#paint0_linear_6039_13039)"}),u.jsx("defs",{children:u.jsxs("linearGradient",{id:"paint0_linear_6039_13039",x1:"16",y1:"-3.5",x2:"41.5",y2:"29",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:"0.210966",stopColor:"#1E06CB"}),u.jsx("stop",{offset:"0.740385",stopColor:"#DB38EF"})]})})]})}),_8=()=>u.jsx(Zo,{config:{api:{baseUrl:"http://localhost:8000/api",authToken:""},interview:{proctoring:{enabled:!1,gazeAnalysisEnabled:!1,showControls:!1,showEngagementBar:!1,showLandmarks:!1}}},children:u.jsx("div",{className:"interview-widget-container",children:u.jsx(Uo,{title:"Frontend Developer",brandName:"Previa",interviewId:"ea3cb06a-c168-4ad3-8084-4165a79473d3",className:"iw-rounded-none iw-shadow-none",onInterviewEnd:()=>{console.log("🎉🎉 Interview ended 🎉🎉"),window.location.reload(),sessionStorage.clear()},onInterviewDisqualify:()=>{console.log("❌ Interview disqualified ❌")}})})}),T8=document.getElementById("root");S8.createRoot(T8).render(u.jsx(_8,{}));const A8=(e,t,n)=>Math.max(t,Math.min(n,e)),Uw=e=>{const t=Math.max(0,Math.floor(e)),n=Math.floor(t/60).toString().padStart(2,"0"),i=(t%60).toString().padStart(2,"0");return`${n}:${i}`},ko=({total:e,remaining:t,size:n=64,strokeWidth:i=6,className:a="",showLabel:l=!0})=>{const s=Math.max(1,e||1),r=A8(t/s,0,1),{radius:o,circumference:c,dashOffset:f,center:h}=y.useMemo(()=>{const v=(n-i)/2,x=2*Math.PI*v,E=x*(1-r),g=Math.round(i)%2===1,w=n/2+(g?.5:0);return{radius:v,circumference:x,dashOffset:E,center:w}},[n,i,r]),d=y.useMemo(()=>r<=.25?"iw-stroke-red-500":r<=.5?"iw-stroke-yellow-500":"iw-stroke-green-500",[r]),m=r<=.25?"iw-animate-pulse":"";return u.jsxs("div",{className:`iw-relative iw-inline-flex iw-items-center iw-justify-center iw-rounded-full iw-bg-white ${a}`,style:{width:n,height:n},"aria-label":`Time remaining ${Uw(t)}`,role:"timer","aria-live":"polite",children:[u.jsx("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,preserveAspectRatio:"xMidYMid meet",children:u.jsxs("g",{transform:`rotate(-90 ${h} ${h})`,children:[u.jsx("circle",{cx:h,cy:h,r:o,className:"iw-stroke-gray-200",strokeWidth:i,fill:"none",shapeRendering:"geometricPrecision",vectorEffect:"non-scaling-stroke"}),u.jsx("circle",{cx:h,cy:h,r:o,className:`${d} ${m}`,strokeWidth:i,strokeLinecap:"round",fill:"none",strokeDasharray:c,strokeDashoffset:f,shapeRendering:"geometricPrecision",vectorEffect:"non-scaling-stroke",style:{transition:"stroke-dashoffset 0.3s ease, stroke 0.2s ease"}})]})}),l?u.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0",children:u.jsx("span",{className:`iw-text-[11px] iw-font-semibold iw-tabular-nums ${r<=.25?"iw-text-red-600":r<=.5?"iw-text-yellow-600":"iw-text-green-600"}`,children:Uw(t)})}):u.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0",children:u.jsx(w6,{})})]})},N8=({timerState:e,answeringTime:t})=>{const n=(e==null?void 0:e.currentPhaseTimeRemaining)||0,i=t||p3.answeringDuration;return u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[u.jsx(ko,{total:i,remaining:n,size:50,strokeWidth:4,showLabel:!1,className:"iw-shadow-sm iw-border iw-border-gray-100"}),u.jsxs("div",{className:"iw-flex iw-flex-col",children:[u.jsx("span",{className:"iw-text-[#5C6686]",children:"Time left to answer"}),u.jsxs("span",{className:"iw-text-xl iw-font-bold iw-text-[#062260]",children:[Io(n)," mins"]})]})]})},j8=({question:e,isLoading:t=!1,phase:n,brandName:i,timerState:a,answeringTime:l})=>u.jsx("div",{className:"iw-rounded-xl iw-mb-4 message-animation iw-text-gray-800 iw-py-1",children:u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-4",children:[u.jsx("div",{className:`iw-flex iw-flex-col iw-items-center iw-justify-center iw-relative iw-h-16 iw-w-16 iw-shrink-0 iw-shadow iw-rounded-full iw-border-[#E8EEFE] iw-border-4 ${n===K.READING_QUESTION?"iw-animate-speaking":""}`,children:u.jsx("div",{className:"iw-bg-transparent iw-flex iw-items-center iw-justify-center iw-rounded-full iw-size-full",style:{backgroundImage:"linear-gradient(#B5D0FD, #FFFFFF)"},children:u.jsx(E8,{className:"iw-size-8"})})}),u.jsx(M8,{phase:n,question:e,isLoading:t,brandName:i,timerState:a,answeringTime:l})]})}),M8=({phase:e,question:t,isLoading:n,brandName:i,timerState:a,answeringTime:l})=>{const s=i||"We",r=i?"is":"are";if(n||e===K.FETCHING_QUESTION||e===K.IDLE)return u.jsxs("div",{className:"iw-animate-pulse iw-w-full iw-space-y-3 iw-mr-10",children:[u.jsx("div",{className:"iw-h-5 iw-bg-gray-200 iw-rounded iw-w-full"}),u.jsx("div",{className:"iw-h-5 iw-bg-gray-200 iw-rounded iw-w-3/4"})]});const o=()=>u.jsxs("span",{className:"iw-animate-dot-wave iw-ml-1",children:[u.jsx("span",{children:"."}),u.jsx("span",{children:"."}),u.jsx("span",{children:"."})]});switch(e){case K.ANSWERING:return u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between iw-w-full",children:[u.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:["Listening",u.jsx(o,{})]}),u.jsx(N8,{timerState:a,answeringTime:l})]});case K.TRANSCRIBING:return u.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:[s," ",r," analyzing your answer",u.jsx(o,{})]});case(K.EDITING||K.SUBMITTING):return u.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:[s," ",r," waiting for your answer..."]});default:return u.jsx("p",{className:"iw-text-lg iw-leading-7",children:t==null?void 0:t.question})}},C8=({label:e,error:t,fullWidth:n=!1,className:i="",id:a,...l})=>{const s=a||`textarea-${Math.random().toString(36).substring(2,9)}`,r="iw-block iw-rounded-md iw-border iw-border-gray-300 iw-shadow-sm iw-px-4 iw-py-2 iw-text-sm iw-transition-all",o=t?"iw-border-red-500 iw-focus:border-red-500 iw-focus:ring-red-500":"",c=n?"iw-w-full":"",f=i.includes("iw-h-full")||n?"iw-h-full":"";return u.jsxs("div",{className:`iw-h-full iw-flex iw-flex-col ${n?"iw-w-full":""}`,children:[e&&u.jsx("label",{htmlFor:s,className:"iw-block iw-text-sm iw-font-medium iw-text-gray-700 iw-mb-1",children:e}),u.jsx("textarea",{id:s,className:`${r} ${o} ${c} ${f} ${i}`,"aria-invalid":t?"true":"false",...l}),t&&u.jsx("p",{className:"iw-mt-1 iw-text-sm iw-text-red-600",children:t})]})},D8=({answerText:e,onAnswerChange:t,timerState:n,editingTime:i})=>u.jsxs("div",{className:"iw-w-full iw-bg-white iw-rounded-xl iw-border iw-border-[#84bbf5] iw-overflow-hidden iw-rounded-tr-none",children:[u.jsx("div",{className:"iw-p-2 iw-pb-0",children:u.jsx(C8,{value:e,onChange:t,placeholder:"Type your answer here...",className:"iw-w-full iw-h-64 iw-resize-none iw-bg-transparent iw-border-none iw-text-[#062260] iw-text-base iw-leading-relaxed focus-visible:iw-outline-0 iw-p-0",disabled:n.phase===K.SUBMITTING})}),u.jsxs("div",{className:"iw-bg-[#F1F5FE] iw-px-2 iw-py-2 iw-flex iw-items-center iw-justify-between iw-border-t iw-border-[#E8EEFE]",children:[u.jsx("span",{className:"iw-text-[#062260] iw-text-sm iw-font-medium iw-line-clamp-1",children:"Time left to edit answer"}),u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[u.jsx(ko,{total:i,remaining:n.currentPhaseTimeRemaining,size:32,strokeWidth:3,showLabel:!1}),u.jsx("span",{className:"iw-text-[#062260] iw-text-sm iw-font-bold",children:`${Io(n.currentPhaseTimeRemaining)} mins`})]})]})]}),Bw=({children:e})=>u.jsx("div",{className:"iw-flex iw-flex-col iw-items-start iw-mt-3 iw-gap-1",children:e}),O8=({children:e})=>u.jsx("div",{className:"iw-flex iw-flex-col iw-items-end iw-mt-3 iw-gap-1",children:e}),z8=({questionNumber:e})=>u.jsxs("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#E6F3FF",border:"1px solid #BDE0FD"},children:[" Q",e]}),Rw=({label:e})=>u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2 iw-text-sm iw-text-gray-500 iw-bg-[#F1F5FE] iw-px-4 iw-py-1.5 iw-rounded-full iw-my-2 iw-font-semibold",children:[e&&u.jsx("span",{className:"iw-font-medium",children:e}),u.jsxs("span",{className:"iw-animate-dot-wave iw-text-2xl",children:[u.jsx("span",{children:"."}),u.jsx("span",{children:"."}),u.jsx("span",{children:"."})]})]}),k8=({phase:e,questionNumber:t})=>{switch(e){case K.FETCHING_QUESTION:return u.jsxs(Bw,{children:[u.jsx(z8,{questionNumber:t+1}),u.jsx(Rw,{})]});case K.ANSWERING:return u.jsx(O8,{children:u.jsx(Rw,{label:"You"})});case K.TRANSCRIBING:return u.jsx(Bw,{children:u.jsxs("div",{className:"iw-flex iw-items-center iw-px-1 iw-py-1.5 iw-rounded-lg iw-mb-2 iw-text-sm iw-bg-[#F2E8FE]",children:[u.jsx("img",{src:"../../../../src/assets/transcribing.gif",alt:"Transcribing",className:"iw-h-8 iw-w-12"}),u.jsx("span",{className:"iw-text-sm iw-text-[#062260]",children:"Analyzing answer…"})]})});default:return null}},L8=({item:e,index:t,isCurrentQuestion:n=!1,isEditable:i=!1,answerText:a="",onAnswerChange:l,timerState:s,editingTime:r})=>{const o=i&&s&&r!==void 0,c=o||e.answer;return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-start",children:[u.jsxs("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#E6F3FF",border:"1px solid #BDE0FD"},children:["Q",t+1]}),u.jsx("div",{className:"iw-w-full iw-p-4 iw-rounded-xl iw-text-[#062260] iw-text-base iw-leading-relaxed iw-rounded-tl-none",style:{backgroundColor:"#F1F5FE",border:n?"2px solid #84bbf5":"1px solid transparent"},children:e.question})]}),c&&u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-end iw-mt-4",children:[u.jsx("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#F2E8FE",border:"1px solid #E9D5FF"},children:"You"}),o?u.jsx(D8,{answerText:a||"",onAnswerChange:l,timerState:s,editingTime:r}):u.jsx("div",{className:"iw-w-full iw-p-4 iw-rounded-xl iw-text-[#062260] iw-text-base iw-leading-relaxed iw-rounded-tr-none",style:{backgroundColor:"#F7F1FE"},children:e.answer})]}),n&&u.jsx(k8,{phase:s==null?void 0:s.phase,questionNumber:t+1})]})},U8=()=>u.jsx("div",{className:"iw-space-y-6 iw-animate-pulse",children:[1,2,3].map(e=>u.jsxs("div",{className:`iw-flex iw-flex-col ${e%2===0?"iw-items-end":"iw-items-start"} iw-gap-2`,children:[u.jsx("div",{className:"iw-h-8 iw-w-16 iw-bg-gray-200 iw-rounded-full"}),u.jsx("div",{className:"iw-h-24 iw-w-full iw-bg-gray-100 iw-rounded-xl"})]},e))}),B8=({transcript:e,isLoading:t,className:n="",bottomRef:i,isEditing:a,answerText:l,onAnswerChange:s,timerState:r,editingTime:o})=>u.jsxs("div",{className:`iw-h-full iw-flex iw-flex-col iw-bg-white iw-scroll-smooth iw-p-6 iw-pr-2 iw-min-w-32 iw-border iw-rounded-tr-2xl iw-rounded-br-2xl iw-border-[#E8EEFE] ${n}`,children:[u.jsxs("div",{className:"iw-mb-6",children:[u.jsx("h2",{className:"iw-text-lg iw-font-semibold iw-mb-4",style:{color:"#062260"},children:"Interview transcript"}),u.jsx("div",{className:"iw-h-px iw-w-full iw-border-t iw-border-dashed iw-border-gray-300"})]}),u.jsxs("div",{className:"iw-flex-1 iw-overflow-y-auto iw-pr-2 iw-space-y-6 iw-scrollbar-thin iw-max-w-xl iw-pb-5",children:[t?u.jsx(U8,{}):e==null?void 0:e.map((c,f)=>u.jsx(L8,{item:c,index:f,isCurrentQuestion:f===(e==null?void 0:e.length)-1,isEditable:!!(f===(e==null?void 0:e.length)-1&&a),answerText:l||"",onAnswerChange:s||(()=>{}),timerState:r,editingTime:o},c.qna_id)),u.jsx("div",{ref:i})]})]}),R8=({interviewId:e,className:t="",currentQuestion:n,lastSubmittedAnswer:i,isEditing:a,answerText:l,onAnswerChange:s,timerState:r,editingTime:o})=>{const c=b3(),[f,h]=y.useState([]),[d,m]=y.useState(!0),v=y.useRef(null);return y.useEffect(()=>{var x;(x=v.current)==null||x.scrollIntoView({behavior:"smooth"})},[f,l,r==null?void 0:r.phase]),y.useEffect(()=>{(async()=>{var E;try{const g=await c.getInterviewTranscription(e);h(((E=g==null?void 0:g.data)==null?void 0:E.question_answers)||[])}catch(g){console.error("Failed to fetch transcript:",g)}finally{m(!1)}})()},[e,c]),y.useEffect(()=>{n&&h(x=>{if(x.some(w=>w.qna_id===n.qna_id))return x;const g={qna_id:n.qna_id,question:n.question,answer:null,question_generated_at:new Date().toISOString(),answer_submitted_at:null};return[...x,g]})},[n]),y.useEffect(()=>{i!=null&&i.answer?h(x=>x.map(E=>E.qna_id===i.qnaId?{...E,answer:i.answer,answer_submitted_at:new Date().toISOString()}:E)):l&&h(x=>x.map(E=>E.qna_id===(i==null?void 0:i.qnaId)?{...E,answer:l,answer_submitted_at:new Date().toISOString()}:E))},[i,l]),u.jsx(B8,{transcript:f,isLoading:d||(f==null?void 0:f.length)===0,className:t,bottomRef:v,isEditing:a,answerText:l,onAnswerChange:s,timerState:r,editingTime:o})},G8=({onClick:e,text:t="Submit response"})=>(y.useEffect(()=>{if(typeof window>"u")return;const n=i=>{const a=i.metaKey||i.ctrlKey,l=i.key===" ",s=i.target;s.tagName==="INPUT"||s.isContentEditable||a&&l&&(i.preventDefault(),e())};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e]),u.jsx("div",{className:"iw-fixed iw-bottom-10 iw-left-1/4 iw-transform iw--translate-x-1/2 iw-z-50",children:u.jsxs("button",{onClick:e,className:"iw-flex iw-items-center iw-gap-3 iw-bg-[#4C6CFF] hover:iw-bg-[#4c6dffd5] iw-text-white iw-px-5 iw-py-3 iw-rounded-lg iw-shadow-lg iw-transition-all iw-duration-200 iw-group",children:[u.jsx("span",{className:"iw-font-semibold iw-text-sm",children:t}),u.jsx("span",{className:"iw-bg-white/90 iw-text-[#062260] iw-px-2 iw-py-1 iw-rounded iw-text-xs iw-font-mono iw-font-bold group-hover:iw-bg-white iw-transition-colors",children:"Press Ctrl / ⌘ + Space"})]})})),Gw=({brandName:e,currentQuestion:t,state:n,phase:i,className:a="",interviewId:l="",interview_duration:s=Tr,videoFeedRef:r,lastSubmittedAnswer:o,onNextPhase:c,answerText:f,onAnswerChange:h,editingTime:d,answeringTime:m})=>u.jsxs("div",{className:`iw-px-4 iw-py-3 ${a} iw-h-[calc(100vh_-_120px)] iw-max-h-[calc(100vh_-_120px)] iw-flex iw-gap-0 iw-relative`,children:[u.jsxs("div",{className:"iw-flex iw-flex-col iw-flex-1 iw-p-5 iw-bg-white/50 iw-border iw-border-[#E8EEFE] iw-rounded-s-3xl iw-overflow-hidden",children:[u.jsx("div",{className:"iw-flex iw-items-start iw-justify-between iw-gap-3 iw-mb-4",children:u.jsx("div",{className:"iw-flex-1",children:u.jsx(j8,{question:t,isLoading:i===K.FETCHING_QUESTION||i===K.IDLE,phase:i,brandName:e,timerState:n,answeringTime:m})})}),u.jsx("div",{className:"iw-flex-1 iw-min-h-0 iw-rounded-[16px] iw-overflow-hidden iw-relative",children:u.jsx(w3,{ref:r,interviewId:l,interview_duration:s,isAnswering:i===K.ANSWERING})})]}),u.jsx("div",{className:"iw-interview-transcription iw-w-1/4 iw-min-w-32 iw-h-full",children:u.jsx(R8,{interviewId:l,currentQuestion:t,lastSubmittedAnswer:o,isEditing:i===K.EDITING,answerText:f,onAnswerChange:h,timerState:n,editingTime:d})}),c&&(i===K.ANSWERING||i===K.EDITING)&&u.jsx(G8,{onClick:c,text:i===K.ANSWERING?"Submit Response":"Submit Final Response"})]}),H8=({confirmExitInterview:e,isOpen:t,onClose:n})=>u.jsx(Sf,{isOpen:t,onClose:n,title:"Exit Interview",closeOnOverlayClick:!1,children:u.jsxs("div",{className:"iw-space-y-5",children:[u.jsxs("div",{className:"iw-flex iw-items-start iw-gap-3 iw-rounded-xl iw-p-2",children:[u.jsx("div",{className:"iw-flex iw-h-10 iw-w-10 iw-flex-none iw-items-center iw-justify-center iw-rounded-full iw-bg-rose-100 iw-text-rose-600",children:"!"}),u.jsxs("div",{className:"iw-space-y-2",children:[u.jsx("p",{className:"iw-text-sm iw-font-semibold iw-text-rose-600",children:"Leaving now will end your interview !"}),u.jsx("p",{className:"iw-text-sm iw-text-slate-500",children:"Are you sure you want to exit? All progress will be lost and you will not be able to resume."})]})]}),u.jsxs("div",{className:"iw-flex iw-flex-col-reverse iw-gap-2 sm:iw-flex-row sm:iw-items-center sm:iw-justify-end iw-pb-1",children:[u.jsx("button",{className:"iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-border iw-border-slate-200 iw-bg-white iw-px-4 iw-py-2 iw-text-sm iw-font-medium iw-text-slate-600 iw-shadow-sm iw-transition hover:iw-bg-slate-50",onClick:n,children:"Stay in interview"}),u.jsx("button",{className:"iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-px-4 iw-py-2 iw-text-sm iw-font-semibold iw-text-white iw-transition hover:iw-brightness-110",style:{background:"linear-gradient(to right, rgba(244, 63, 94, 0.8), rgba(225, 29, 72, 0.8))",boxShadow:"0 12px 30px -16px rgba(244, 63, 94, 0.65)"},onClick:e,children:"Confirm exit"})]})]})}),Hw=({title:e,brandName:t,brandLogo:n,onExit:i,totalDuration:a=30,elapsedTime:l=0})=>{const{baseColor:s}=$l(),[r,o]=y.useState(!1),c=Math.min(l/(a*60)*100,100),f=()=>u.jsxs("div",{className:"iw-px-4 iw-pb-2 iw-flex iw-items-center iw-gap-3",children:[u.jsx("div",{className:"iw-flex-1 iw-h-4 iw-bg-[#F2F4F7] iw-rounded-full iw-overflow-hidden iw-border iw-border-blue-100 iw-relative",children:u.jsx("div",{className:"iw-h-full iw-bg-[#0EB00E] iw-rounded-full iw-transition-all iw-duration-1000 iw-ease-linear",style:{width:`${c}%`}})}),u.jsxs("div",{className:"iw-text-sm iw-font-medium iw-whitespace-nowrap",children:[u.jsx("span",{className:"iw-text-[#062260]",children:Io(l)}),u.jsxs("span",{className:"iw-text-[#667085]",children:["/",a," Min"]})]})]});return u.jsxs("header",{className:"iw-w-full iw-text-gray-900 iw-shadow-sm",children:[u.jsxs("div",{className:"iw-mx-auto iw-flex iw-items-center iw-justify-between iw-p-4 iw-pt-1 iw-mb-2 iw-border-b iw-border-[#B3B9CB] iw-border-dashed",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-space-x-2",children:[n||u.jsx("div",{className:"iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold",style:{backgroundColor:s},children:l1(t)}),u.jsx("p",{className:"iw-text-xl iw-font-semibold",children:t})]}),u.jsx("h1",{className:"iw-text-2xl iw-font-semibold iw-text-gradient-silver",children:e}),u.jsx("button",{className:"iw-text-sm iw-text-[#E94315] iw-min-w-10 iw-rounded-md hover:iw-bg-orange-100 iw-p-2",onClick:()=>o(!0),children:u.jsxs("span",{className:"iw-flex iw-items-center iw-gap-1 iw-text-[18px] iw-font-semibold iw-whitespace-nowrap",children:[u.jsx(r1,{className:"iw-text-[#E94315] iw-size-5"}),"Leave interview"]})})]}),u.jsx(f,{}),u.jsx("div",{className:"iw-h-px iw-bg-gray-200"}),u.jsx(H8,{isOpen:r,confirmExitInterview:()=>{i(),o(!1)},onClose:()=>o(!1)})]})},V8=({className:e="",width:t,height:n=56,barWidth:i=3,gap:a=2,fftSize:l=1024,smoothingTimeConstant:s=.8,mediaStream:r,startOnMount:o=!0})=>{const{baseColor:c}=$l(),f=y.useRef(null),h=y.useRef(null),d=y.useRef(null),m=y.useRef(null),v=y.useRef(null),x=y.useRef(null),E=y.useRef(!1),[g,w]=y.useState(null);y.useEffect(()=>{if(t||!h.current)return;const b=h.current,A=()=>{const _=f.current;if(!_)return;const M=b.clientWidth,T=n;_.width=Math.max(1,Math.floor(M*window.devicePixelRatio||1)),_.height=Math.max(1,Math.floor(T*window.devicePixelRatio||1))},N=new ResizeObserver(A);return N.observe(b),A(),()=>N.disconnect()},[t,n]),y.useEffect(()=>{if(!t)return;const b=f.current;b&&(b.width=Math.max(1,Math.floor(t*(window.devicePixelRatio||1))),b.height=Math.max(1,Math.floor(n*(window.devicePixelRatio||1))))},[t,n]),y.useEffect(()=>{let b=!1;return(async()=>{try{const N=new(window.AudioContext||window.webkitAudioContext);d.current=N;let _=r;if(!_){if(!o)return;_=await navigator.mediaDevices.getUserMedia({audio:!0,video:!1}),E.current=!0}if(b)return;const M=N.createAnalyser();M.fftSize=l,M.smoothingTimeConstant=s,m.current=M;const T=N.createMediaStreamSource(_);v.current=T,T.connect(M),p()}catch(N){w((N==null?void 0:N.message)||"Failed to initialize microphone")}})(),()=>{var N,_,M,T;b=!0,x.current&&cancelAnimationFrame(x.current);try{(N=v.current)==null||N.disconnect()}catch{}try{(_=m.current)==null||_.disconnect()}catch{}E.current&&((T=((M=v.current)==null?void 0:M.mediaStream)||void 0)==null||T.getTracks().forEach(D=>D.stop())),d.current&&d.current.state!=="closed"&&d.current.close()}},[r,l,s,o]);const p=()=>{const b=f.current,A=m.current;if(!b||!A)return;const N=b.getContext("2d");if(!N)return;const _=window.devicePixelRatio||1,M=b.width,T=b.height,D=A.frequencyBinCount,Ee=new Uint8Array(D),Re=()=>{x.current=requestAnimationFrame(Re),A.getByteTimeDomainData(Ee),N.clearRect(0,0,M,T),N.fillStyle="rgba(0,0,0,0)",N.fillRect(0,0,M,T);const rt=Math.max(1,Math.floor(i*_)),cn=Math.max(1,Math.floor(a*_)),xt=rt+cn,j=Math.max(8,Math.floor((M+cn)/xt)),G=Math.floor(Ee.length/j);for(let R=0;R<j;R++){const $=Math.min(Ee.length-1,R*G),se=Ee[$]/128-1,ut=Math.abs(se),bn=Math.pow(ut,.6),fn=Math.max(T*.06,bn*(T*.9)),Xt=R*xt,ot=(T-fn)/2,ct=140-Math.min(140,140*ut),dn=85,Ce=48+Math.floor(12*(1-ut));N.fillStyle=`${c}`,N.shadowColor=`hsla(${ct}, ${dn}%, ${Ce}%, ${.25*ut})`,N.shadowBlur=8*ut;const Xi=Math.min(rt/2,fn/2);q8(N,Xt,ot,rt,fn,Xi),N.fill()}};Re()};return u.jsxs("div",{ref:h,className:`iw-relative iw-w-full iw-overflow-hidden iw-rounded-md iw-bg-gray-50 ${e}`,style:{height:n},children:[u.jsx("canvas",{ref:f,className:"iw-w-full iw-h-full"}),g&&u.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center",children:u.jsx("span",{className:"iw-text-xs iw-text-red-600 iw-bg-red-50 iw-border iw-border-red-200 iw-px-2 iw-py-1 iw-rounded",children:g})})]})};function q8(e,t,n,i,a,l){const s=Math.min(l,i/2,a/2);e.beginPath(),e.moveTo(t+s,n),e.lineTo(t+i-s,n),e.quadraticCurveTo(t+i,n,t+i,n+s),e.lineTo(t+i,n+a-s),e.quadraticCurveTo(t+i,n+a,t+i-s,n+a),e.lineTo(t+s,n+a),e.quadraticCurveTo(t,n+a,t,n+a-s),e.lineTo(t,n+s),e.quadraticCurveTo(t,n,t+s,n),e.closePath()}const F8=({state:e,answeringTime:t,nextPhase:n,sttError:i})=>u.jsxs("div",{className:"iw-flex iw-flex-col iw-justify-between iw-h-full ",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between",children:[u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"You may start speaking now. We're listening...."}),u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-2",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-1",children:[u.jsx(s1,{className:"iw-size-4 iw-text-orange-600"}),u.jsx("p",{className:"iw-text-gray-700 iw-text-sm",children:"Time to talk: "})]}),u.jsx(ko,{total:t,remaining:e.currentPhaseTimeRemaining,size:50,strokeWidth:4})]})]}),u.jsx("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:"Done talking? Click the button to review your answer."})]}),u.jsxs("div",{children:[u.jsx(V8,{}),i&&u.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Recording error: ",i.message]})]}),u.jsx("div",{className:"iw-w-full iw-grid iw-grid-cols-1",children:u.jsx(Ss,{onClick:()=>{n()},children:"Transcribe My Answer"})})]});function Y8(){const[e,t]=y.useState(!0),n=y.useMemo(()=>[0,1,2].map(i=>({id:i})),[]);return y.useEffect(()=>{const i=setInterval(()=>{t(a=>!a)},1500);return()=>clearInterval(i)},[]),u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-h-full",children:[u.jsx("div",{className:"iw-relative iw-w-80 iw-h-48 ","aria-hidden":!0,children:n.map((i,a)=>{const l=a*50,s=e?l:l+12,r=e?1:.08,o=a*140;return u.jsx("div",{role:"presentation",className:"iw-absolute iw-w-full iw-rounded-lg iw-p-4 iw-shadow-md iw-bg-gradient-to-b iw-from-gray-50 iw-to-gray-100 iw-overflow-hidden",style:{top:0,transform:`translateY(${s}px)`,opacity:r,transition:`transform 600ms cubic-bezier(.2,.9,.3,1) ${o}ms, opacity 400ms ease ${o}ms`},children:u.jsxs("div",{className:"iw-flex iw-gap-3 iw-items-center",children:[u.jsx("div",{className:"iw-w-10 iw-h-10 iw-bg-gray-300 iw-rounded iw-flex-shrink-0"}),u.jsxs("div",{className:"iw-flex-1 iw-space-y-2",children:[u.jsx("div",{className:"iw-h-2 iw-bg-gray-300 iw-rounded iw-w-24"}),u.jsx("div",{className:"iw-h-2 iw-bg-gray-300 iw-rounded iw-w-32"})]})]})},i.id)})}),u.jsx("div",{className:"iw-text-center",children:u.jsx("p",{className:"iw-text-gray-500 iw-font-medium",children:"Preparing your question..."})})]})}const X8=({size:e="192px",className:t,colors:n,animationDuration:i=20})=>{const l={...{bg:"oklch(95% 0.02 264.695)",c1:"oklch(75% 0.15 350)",c2:"oklch(80% 0.12 200)",c3:"oklch(78% 0.14 280)"},...n},s=parseInt(e.replace("px",""),10),r=s<50?Math.max(s*.008,1):Math.max(s*.015,4),o=s<50?Math.max(s*.004,1.2):Math.max(s*.008,1.5),c=s<50?Math.max(s*.004,.05):Math.max(s*.008,.1),f=s<50?Math.max(s*.004,.5):Math.max(s*.008,2),h=s<30?"0%":s<50?"5%":s<100?"15%":"25%",d=s<30?1.1:s<50?Math.max(o*1.2,1.3):o;return u.jsx("div",{className:`siri-orb ${t}`,style:{width:e,height:e,"--bg":l.bg,"--c1":l.c1,"--c2":l.c2,"--c3":l.c3,"--animation-duration":`${i}s`,"--blur-amount":`${r}px`,"--contrast-amount":d,"--dot-size":`${c}px`,"--shadow-spread":`${f}px`,"--mask-radius":h},children:u.jsx("style",{children:`
92
+ `+Df+e+O3}var Of=!1;function zf(e,t){if(!e||Of)return"";Of=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(g){var d=g}Reflect.construct(e,[],h)}else{try{h.call()}catch(g){d=g}e.call(h.prototype)}}else{try{throw Error()}catch(g){d=g}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(g){if(g&&d&&typeof g.stack=="string")return[g.stack,d.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=a.DetermineComponentFrameRoot(),r=l[0],s=l[1];if(r&&s){var c=r.split(`
93
+ `),u=s.split(`
94
+ `);for(i=a=0;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(a===c.length||i===u.length)for(a=c.length-1,i=u.length-1;1<=a&&0<=i&&c[a]!==u[i];)i--;for(;1<=a&&0<=i;a--,i--)if(c[a]!==u[i]){if(a!==1||i!==1)do if(a--,i--,0>i||c[a]!==u[i]){var f=`
95
+ `+c[a].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=a&&0<=i);break}}}finally{Of=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ci(n):""}function Jy(e,t){switch(e.tag){case 26:case 27:case 5:return ci(e.type);case 16:return ci("Lazy");case 13:return e.child!==t&&t!==null?ci("Suspense Fallback"):ci("Suspense");case 19:return ci("SuspenseList");case 0:case 15:return zf(e.type,!1);case 11:return zf(e.type.render,!1);case 1:return zf(e.type,!0);case 31:return ci("Activity");default:return""}}function z3(e){try{var t="",n=null;do t+=Jy(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
96
+ Error generating stack: `+a.message+`
97
+ `+a.stack}}var kf=Object.prototype.hasOwnProperty,Lf=Fe.unstable_scheduleCallback,Uf=Fe.unstable_cancelCallback,Wy=Fe.unstable_shouldYield,Ry=Fe.unstable_requestPaint,Ut=Fe.unstable_now,Py=Fe.unstable_getCurrentPriorityLevel,k3=Fe.unstable_ImmediatePriority,L3=Fe.unstable_UserBlockingPriority,wo=Fe.unstable_NormalPriority,$y=Fe.unstable_LowPriority,U3=Fe.unstable_IdlePriority,ep=Fe.log,tp=Fe.unstable_setDisableYieldValue,Nr=null,Bt=null;function Sa(e){if(typeof ep=="function"&&tp(e),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(Nr,e)}catch{}}var Gt=Math.clz32?Math.clz32:ip,np=Math.log,ap=Math.LN2;function ip(e){return e>>>=0,e===0?32:31-(np(e)/ap|0)|0}var mo=256,yo=262144,po=4194304;function ui(e){var t=e&42;if(t!==0)return t;switch(e&-e){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function vo(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,l=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var s=a&134217727;return s!==0?(a=s&~l,a!==0?i=ui(a):(r&=s,r!==0?i=ui(r):n||(n=s&~e,n!==0&&(i=ui(n))))):(s=a&~l,s!==0?i=ui(s):r!==0?i=ui(r):n||(n=a&~e,n!==0&&(i=ui(n)))),i===0?0:t!==0&&t!==i&&!(t&l)&&(l=i&-i,n=t&-t,l>=n||l===32&&(n&4194048)!==0)?t:i}function Mr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function lp(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function B3(){var e=po;return po<<=1,!(po&62914560)&&(po=4194304),e}function Bf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Cr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rp(e,t,n,a,i,l){var r=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=r&~n;0<n;){var f=31-Gt(n),h=1<<f;s[f]=0,c[f]=-1;var d=u[f];if(d!==null)for(u[f]=null,f=0;f<d.length;f++){var g=d[f];g!==null&&(g.lane&=-536870913)}n&=~h}a!==0&&G3(e,a,0),l!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=l&~(r&~t))}function G3(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Gt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function H3(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Gt(n),i=1<<a;i&t|e[a]&t&&(e[a]|=t),n&=~i}}function j3(e,t){var n=t&-t;return n=n&42?1:Gf(n),n&(e.suspendedLanes|t)?0:n}function Gf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Hf(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function V3(){var e=R.p;return e!==0?e:(e=window.event,e===void 0?32:Am(e.type))}function q3(e,t){var n=R.p;try{return R.p=e,t()}finally{R.p=n}}var Ea=Math.random().toString(36).slice(2),$e="__reactFiber$"+Ea,gt="__reactProps$"+Ea,ul="__reactContainer$"+Ea,jf="__reactEvents$"+Ea,sp="__reactListeners$"+Ea,op="__reactHandles$"+Ea,F3="__reactResources$"+Ea,Dr="__reactMarker$"+Ea;function Vf(e){delete e[$e],delete e[gt],delete e[jf],delete e[sp],delete e[op]}function fl(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ul]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=cm(e);e!==null;){if(n=e[$e])return n;e=cm(e)}return t}e=n,n=e.parentNode}return null}function dl(e){if(e=e[$e]||e[ul]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Or(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(E(33))}function hl(e){var t=e[F3];return t||(t=e[F3]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Je(e){e[Dr]=!0}var Y3=new Set,X3={};function fi(e,t){gl(e,t),gl(e+"Capture",t)}function gl(e,t){for(X3[e]=t,e=0;e<t.length;e++)Y3.add(t[e])}var cp=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Q3={},K3={};function up(e){return kf.call(K3,e)?!0:kf.call(Q3,e)?!1:cp.test(e)?K3[e]=!0:(Q3[e]=!0,!1)}function bo(e,t,n){if(up(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function So(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Xn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function $t(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Z3(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fp(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,l=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(r){n=""+r,l.call(this,r)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qf(e){if(!e._valueTracker){var t=Z3(e)?"checked":"value";e._valueTracker=fp(e,t,""+e[t])}}function I3(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Z3(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Eo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var dp=/[\n"\\]/g;function en(e){return e.replace(dp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ff(e,t,n,a,i,l,r,s){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+$t(t)):e.value!==""+$t(t)&&(e.value=""+$t(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?Yf(e,r,$t(t)):n!=null?Yf(e,r,$t(n)):a!=null&&e.removeAttribute("value"),i==null&&l!=null&&(e.defaultChecked=!!l),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+$t(s):e.removeAttribute("name")}function J3(e,t,n,a,i,l,r,s){if(l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.type=l),t!=null||n!=null){if(!(l!=="submit"&&l!=="reset"||t!=null)){qf(e);return}n=n!=null?""+$t(n):"",t=t!=null?""+$t(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}a=a??i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=s?e.checked:!!a,e.defaultChecked=!!a,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),qf(e)}function Yf(e,t,n){t==="number"&&Eo(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wl(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&a&&(e[n].defaultSelected=!0)}else{for(n=""+$t(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function W3(e,t,n){if(t!=null&&(t=""+$t(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+$t(n):""}function R3(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(E(92));if(Ar(a)){if(1<a.length)throw Error(E(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=$t(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),qf(e)}function ml(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hp=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function P3(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||hp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function $3(e,t,n){if(t!=null&&typeof t!="object")throw Error(E(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var i in t)a=t[i],t.hasOwnProperty(i)&&n[i]!==a&&P3(e,i,a)}else for(var l in t)t.hasOwnProperty(l)&&P3(e,l,t[l])}function Xf(e){if(e.indexOf("-")===-1)return!1;switch(e){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 gp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),wp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function _o(e){return wp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Qn(){}var Qf=null;function Kf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yl=null,pl=null;function e4(e){var t=dl(e);if(t&&(e=t.stateNode)){var n=e[gt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ff(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+en(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=a[gt]||null;if(!i)throw Error(E(90));Ff(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&I3(a)}break e;case"textarea":W3(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&wl(e,!!n.multiple,t,!1)}}}var Zf=!1;function t4(e,t,n){if(Zf)return e(t,n);Zf=!0;try{var a=e(t);return a}finally{if(Zf=!1,(yl!==null||pl!==null)&&(uc(),yl&&(t=yl,e=pl,pl=yl=null,e4(t),e)))for(t=0;t<e.length;t++)e4(e[t])}}function zr(e,t){var n=e.stateNode;if(n===null)return null;var a=n[gt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(E(231,t,typeof n));return n}var Kn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),If=!1;if(Kn)try{var kr={};Object.defineProperty(kr,"passive",{get:function(){If=!0}}),window.addEventListener("test",kr,kr),window.removeEventListener("test",kr,kr)}catch{If=!1}var _a=null,Jf=null,xo=null;function n4(){if(xo)return xo;var e,t=Jf,n=t.length,a,i="value"in _a?_a.value:_a.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var r=n-e;for(a=1;a<=r&&t[n-a]===i[l-a];a++);return xo=i.slice(e,1<a?1-a:void 0)}function Ao(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function To(){return!0}function a4(){return!1}function wt(e){function t(n,a,i,l,r){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=l,this.target=r,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(l):l[s]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?To:a4,this.isPropagationStopped=a4,this}return ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=To)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=To)},persist:function(){},isPersistent:To}),t}var di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},No=wt(di),Lr=ce({},di,{view:0,detail:0}),mp=wt(Lr),Wf,Rf,Ur,Mo=ce({},Lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$f,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ur&&(Ur&&e.type==="mousemove"?(Wf=e.screenX-Ur.screenX,Rf=e.screenY-Ur.screenY):Rf=Wf=0,Ur=e),Wf)},movementY:function(e){return"movementY"in e?e.movementY:Rf}}),i4=wt(Mo),yp=ce({},Mo,{dataTransfer:0}),pp=wt(yp),vp=ce({},Lr,{relatedTarget:0}),Pf=wt(vp),bp=ce({},di,{animationName:0,elapsedTime:0,pseudoElement:0}),Sp=wt(bp),Ep=ce({},di,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_p=wt(Ep),xp=ce({},di,{data:0}),l4=wt(xp),Ap={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tp={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"},Np={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Np[e])?!!t[e]:!1}function $f(){return Mp}var Cp=ce({},Lr,{key:function(e){if(e.key){var t=Ap[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Tp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$f,charCode:function(e){return e.type==="keypress"?Ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Dp=wt(Cp),Op=ce({},Mo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),r4=wt(Op),zp=ce({},Lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$f}),kp=wt(zp),Lp=ce({},di,{propertyName:0,elapsedTime:0,pseudoElement:0}),Up=wt(Lp),Bp=ce({},Mo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Gp=wt(Bp),Hp=ce({},di,{newState:0,oldState:0}),jp=wt(Hp),Vp=[9,13,27,32],ed=Kn&&"CompositionEvent"in window,Br=null;Kn&&"documentMode"in document&&(Br=document.documentMode);var qp=Kn&&"TextEvent"in window&&!Br,s4=Kn&&(!ed||Br&&8<Br&&11>=Br),o4=" ",c4=!1;function u4(e,t){switch(e){case"keyup":return Vp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f4(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vl=!1;function Fp(e,t){switch(e){case"compositionend":return f4(t);case"keypress":return t.which!==32?null:(c4=!0,o4);case"textInput":return e=t.data,e===o4&&c4?null:e;default:return null}}function Yp(e,t){if(vl)return e==="compositionend"||!ed&&u4(e,t)?(e=n4(),xo=Jf=_a=null,vl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return s4&&t.locale!=="ko"?null:t.data;default:return null}}var Xp={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 d4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Xp[e.type]:t==="textarea"}function h4(e,t,n,a){yl?pl?pl.push(a):pl=[a]:yl=a,t=yc(t,"onChange"),0<t.length&&(n=new No("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Gr=null,Hr=null;function Qp(e){Jw(e,0)}function Co(e){var t=Or(e);if(I3(t))return e}function g4(e,t){if(e==="change")return t}var w4=!1;if(Kn){var td;if(Kn){var nd="oninput"in document;if(!nd){var m4=document.createElement("div");m4.setAttribute("oninput","return;"),nd=typeof m4.oninput=="function"}td=nd}else td=!1;w4=td&&(!document.documentMode||9<document.documentMode)}function y4(){Gr&&(Gr.detachEvent("onpropertychange",p4),Hr=Gr=null)}function p4(e){if(e.propertyName==="value"&&Co(Hr)){var t=[];h4(t,Hr,e,Kf(e)),t4(Qp,t)}}function Kp(e,t,n){e==="focusin"?(y4(),Gr=t,Hr=n,Gr.attachEvent("onpropertychange",p4)):e==="focusout"&&y4()}function Zp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Co(Hr)}function Ip(e,t){if(e==="click")return Co(t)}function Jp(e,t){if(e==="input"||e==="change")return Co(t)}function Wp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ht=typeof Object.is=="function"?Object.is:Wp;function jr(e,t){if(Ht(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var i=n[a];if(!kf.call(t,i)||!Ht(e[i],t[i]))return!1}return!0}function v4(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function b4(e,t){var n=v4(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=v4(n)}}function S4(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?S4(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function E4(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Eo(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Eo(e.document)}return t}function ad(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Rp=Kn&&"documentMode"in document&&11>=document.documentMode,bl=null,id=null,Vr=null,ld=!1;function _4(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ld||bl==null||bl!==Eo(a)||(a=bl,"selectionStart"in a&&ad(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Vr&&jr(Vr,a)||(Vr=a,a=yc(id,"onSelect"),0<a.length&&(t=new No("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=bl)))}function hi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sl={animationend:hi("Animation","AnimationEnd"),animationiteration:hi("Animation","AnimationIteration"),animationstart:hi("Animation","AnimationStart"),transitionrun:hi("Transition","TransitionRun"),transitionstart:hi("Transition","TransitionStart"),transitioncancel:hi("Transition","TransitionCancel"),transitionend:hi("Transition","TransitionEnd")},rd={},x4={};Kn&&(x4=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function gi(e){if(rd[e])return rd[e];if(!Sl[e])return e;var t=Sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in x4)return rd[e]=t[n];return e}var A4=gi("animationend"),T4=gi("animationiteration"),N4=gi("animationstart"),Pp=gi("transitionrun"),$p=gi("transitionstart"),ev=gi("transitioncancel"),M4=gi("transitionend"),C4=new Map,sd="abort auxClick beforeToggle 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(" ");sd.push("scrollEnd");function yn(e,t){C4.set(e,t),fi(t,[e])}var Do=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},tn=[],El=0,od=0;function Oo(){for(var e=El,t=od=El=0;t<e;){var n=tn[t];tn[t++]=null;var a=tn[t];tn[t++]=null;var i=tn[t];tn[t++]=null;var l=tn[t];if(tn[t++]=null,a!==null&&i!==null){var r=a.pending;r===null?i.next=i:(i.next=r.next,r.next=i),a.pending=i}l!==0&&D4(n,i,l)}}function zo(e,t,n,a){tn[El++]=e,tn[El++]=t,tn[El++]=n,tn[El++]=a,od|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cd(e,t,n,a){return zo(e,t,n,a),ko(e)}function wi(e,t){return zo(e,null,null,t),ko(e)}function D4(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var i=!1,l=e.return;l!==null;)l.childLanes|=n,a=l.alternate,a!==null&&(a.childLanes|=n),l.tag===22&&(e=l.stateNode,e===null||e._visibility&1||(i=!0)),e=l,l=l.return;return e.tag===3?(l=e.stateNode,i&&t!==null&&(i=31-Gt(n),e=l.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=n|536870912),l):null}function ko(e){if(50<os)throw os=0,p2=null,Error(E(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _l={};function tv(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,n,a){return new tv(e,t,n,a)}function ud(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,t){var n=e.alternate;return n===null?(n=jt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function O4(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Lo(e,t,n,a,i,l){var r=0;if(a=e,typeof e=="function")ud(e)&&(r=1);else if(typeof e=="string")r=r8(e,n,zn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Tf:return e=jt(31,n,t,i),e.elementType=Tf,e.lanes=l,e;case sl:return mi(n.children,i,l,t);case M3:r=8,i|=24;break;case Sf:return e=jt(12,n,t,i|2),e.elementType=Sf,e.lanes=l,e;case _f:return e=jt(13,n,t,i),e.elementType=_f,e.lanes=l,e;case xf:return e=jt(19,n,t,i),e.elementType=xf,e.lanes=l,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yn:r=10;break e;case C3:r=9;break e;case Ef:r=11;break e;case Af:r=14;break e;case va:r=16,a=null;break e}r=29,n=Error(E(130,e===null?"null":typeof e,"")),a=null}return t=jt(r,n,t,i),t.elementType=e,t.type=a,t.lanes=l,t}function mi(e,t,n,a){return e=jt(7,e,a,t),e.lanes=n,e}function fd(e,t,n){return e=jt(6,e,null,t),e.lanes=n,e}function z4(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function dd(e,t,n){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var k4=new WeakMap;function nn(e,t){if(typeof e=="object"&&e!==null){var n=k4.get(e);return n!==void 0?n:(t={value:e,source:t,stack:z3(t)},k4.set(e,t),t)}return{value:e,source:t,stack:z3(t)}}var xl=[],Al=0,Uo=null,qr=0,an=[],ln=0,xa=null,kn=1,Ln="";function In(e,t){xl[Al++]=qr,xl[Al++]=Uo,Uo=e,qr=t}function L4(e,t,n){an[ln++]=kn,an[ln++]=Ln,an[ln++]=xa,xa=e;var a=kn;e=Ln;var i=32-Gt(a)-1;a&=~(1<<i),n+=1;var l=32-Gt(t)+i;if(30<l){var r=i-i%5;l=(a&(1<<r)-1).toString(32),a>>=r,i-=r,kn=1<<32-Gt(t)+i|n<<i|a,Ln=l+e}else kn=1<<l|n<<i|a,Ln=e}function hd(e){e.return!==null&&(In(e,1),L4(e,1,0))}function gd(e){for(;e===Uo;)Uo=xl[--Al],xl[Al]=null,qr=xl[--Al],xl[Al]=null;for(;e===xa;)xa=an[--ln],an[ln]=null,Ln=an[--ln],an[ln]=null,kn=an[--ln],an[ln]=null}function U4(e,t){an[ln++]=kn,an[ln++]=Ln,an[ln++]=xa,kn=t.id,Ln=t.overflow,xa=e}var et=null,ue=null,Q=!1,Aa=null,rn=!1,wd=Error(E(519));function Ta(e){var t=Error(E(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fr(nn(t,e)),wd}function B4(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[$e]=e,t[gt]=a,n){case"dialog":Y("cancel",t),Y("close",t);break;case"iframe":case"object":case"embed":Y("load",t);break;case"video":case"audio":for(n=0;n<us.length;n++)Y(us[n],t);break;case"source":Y("error",t);break;case"img":case"image":case"link":Y("error",t),Y("load",t);break;case"details":Y("toggle",t);break;case"input":Y("invalid",t),J3(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Y("invalid",t);break;case"textarea":Y("invalid",t),R3(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||$w(t.textContent,n)?(a.popover!=null&&(Y("beforetoggle",t),Y("toggle",t)),a.onScroll!=null&&Y("scroll",t),a.onScrollEnd!=null&&Y("scrollend",t),a.onClick!=null&&(t.onclick=Qn),t=!0):t=!1,t||Ta(e,!0)}function G4(e){for(et=e.return;et;)switch(et.tag){case 5:case 31:case 13:rn=!1;return;case 27:case 3:rn=!0;return;default:et=et.return}}function Tl(e){if(e!==et)return!1;if(!Q)return G4(e),Q=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||k2(e.type,e.memoizedProps)),n=!n),n&&ue&&Ta(e),G4(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));ue=om(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));ue=om(e)}else t===27?(t=ue,Va(e.type)?(e=H2,H2=null,ue=e):ue=t):ue=et?on(e.stateNode.nextSibling):null;return!0}function yi(){ue=et=null,Q=!1}function md(){var e=Aa;return e!==null&&(vt===null?vt=e:vt.push.apply(vt,e),Aa=null),e}function Fr(e){Aa===null?Aa=[e]:Aa.push(e)}var yd=On(null),pi=null,Jn=null;function Na(e,t,n){oe(yd,t._currentValue),t._currentValue=n}function Wn(e){e._currentValue=yd.current,Ie(yd)}function pd(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function vd(e,t,n,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var l=i.dependencies;if(l!==null){var r=i.child;l=l.firstContext;e:for(;l!==null;){var s=l;l=i;for(var c=0;c<t.length;c++)if(s.context===t[c]){l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),pd(l.return,n,e),a||(r=null);break e}l=s.next}}else if(i.tag===18){if(r=i.return,r===null)throw Error(E(341));r.lanes|=n,l=r.alternate,l!==null&&(l.lanes|=n),pd(r,n,e),r=null}else r=i.child;if(r!==null)r.return=i;else for(r=i;r!==null;){if(r===e){r=null;break}if(i=r.sibling,i!==null){i.return=r.return,r=i;break}r=r.return}i=r}}function Nl(e,t,n,a){e=null;for(var i=t,l=!1;i!==null;){if(!l){if(i.flags&524288)l=!0;else if(i.flags&262144)break}if(i.tag===10){var r=i.alternate;if(r===null)throw Error(E(387));if(r=r.memoizedProps,r!==null){var s=i.type;Ht(i.pendingProps.value,r.value)||(e!==null?e.push(s):e=[s])}}else if(i===fo.current){if(r=i.alternate,r===null)throw Error(E(387));r.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(ws):e=[ws])}i=i.return}e!==null&&vd(t,e,n,a),t.flags|=262144}function Bo(e){for(e=e.firstContext;e!==null;){if(!Ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function vi(e){pi=e,Jn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function tt(e){return H4(pi,e)}function Go(e,t){return pi===null&&vi(e),H4(e,t)}function H4(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Jn===null){if(e===null)throw Error(E(308));Jn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jn=Jn.next=t;return n}var nv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},av=Fe.unstable_scheduleCallback,iv=Fe.unstable_NormalPriority,Le={$$typeof:Yn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function bd(){return{controller:new nv,data:new Map,refCount:0}}function Yr(e){e.refCount--,e.refCount===0&&av(iv,function(){e.controller.abort()})}var Xr=null,Sd=0,Ml=0,Cl=null;function lv(e,t){if(Xr===null){var n=Xr=[];Sd=0,Ml=x2(),Cl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Sd++,t.then(j4,j4),t}function j4(){if(--Sd===0&&Xr!==null){Cl!==null&&(Cl.status="fulfilled");var e=Xr;Xr=null,Ml=0,Cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function rv(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(a.status="rejected",a.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),a}var V4=G.S;G.S=function(e,t){_w=Ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&lv(e,t),V4!==null&&V4(e,t)};var bi=On(null);function Ed(){var e=bi.current;return e!==null?e:le.pooledCache}function Ho(e,t){t===null?oe(bi,bi.current):oe(bi,t.pool)}function q4(){var e=Ed();return e===null?null:{parent:Le._currentValue,pool:e}}var Dl=Error(E(460)),_d=Error(E(474)),jo=Error(E(542)),Vo={then:function(){}};function F4(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Y4(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Qn,Qn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Q4(e),e;default:if(typeof t.status=="string")t.then(Qn,Qn);else{if(e=le,e!==null&&100<e.shellSuspendCounter)throw Error(E(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Q4(e),e}throw Ei=t,Dl}}function Si(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ei=n,Dl):n}}var Ei=null;function X4(){if(Ei===null)throw Error(E(459));var e=Ei;return Ei=null,e}function Q4(e){if(e===Dl||e===jo)throw Error(E(483))}var Ol=null,Qr=0;function qo(e){var t=Qr;return Qr+=1,Ol===null&&(Ol=[]),Y4(Ol,e,t)}function Kr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fo(e,t){throw t.$$typeof===Ky?Error(E(525)):(e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function K4(e){function t(w,m){if(e){var p=w.deletions;p===null?(w.deletions=[m],w.flags|=16):p.push(m)}}function n(w,m){if(!e)return null;for(;m!==null;)t(w,m),m=m.sibling;return null}function a(w){for(var m=new Map;w!==null;)w.key!==null?m.set(w.key,w):m.set(w.index,w),w=w.sibling;return m}function i(w,m){return w=Zn(w,m),w.index=0,w.sibling=null,w}function l(w,m,p){return w.index=p,e?(p=w.alternate,p!==null?(p=p.index,p<m?(w.flags|=67108866,m):p):(w.flags|=67108866,m)):(w.flags|=1048576,m)}function r(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function s(w,m,p,b){return m===null||m.tag!==6?(m=fd(p,w.mode,b),m.return=w,m):(m=i(m,p),m.return=w,m)}function c(w,m,p,b){var T=p.type;return T===sl?f(w,m,p.props.children,b,p.key):m!==null&&(m.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===va&&Si(T)===m.type)?(m=i(m,p.props),Kr(m,p),m.return=w,m):(m=Lo(p.type,p.key,p.props,null,w.mode,b),Kr(m,p),m.return=w,m)}function u(w,m,p,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==p.containerInfo||m.stateNode.implementation!==p.implementation?(m=dd(p,w.mode,b),m.return=w,m):(m=i(m,p.children||[]),m.return=w,m)}function f(w,m,p,b,T){return m===null||m.tag!==7?(m=mi(p,w.mode,b,T),m.return=w,m):(m=i(m,p),m.return=w,m)}function h(w,m,p){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=fd(""+m,w.mode,p),m.return=w,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case uo:return p=Lo(m.type,m.key,m.props,null,w.mode,p),Kr(p,m),p.return=w,p;case _r:return m=dd(m,w.mode,p),m.return=w,m;case va:return m=Si(m),h(w,m,p)}if(Ar(m)||xr(m))return m=mi(m,w.mode,p,null),m.return=w,m;if(typeof m.then=="function")return h(w,qo(m),p);if(m.$$typeof===Yn)return h(w,Go(w,m),p);Fo(w,m)}return null}function d(w,m,p,b){var T=m!==null?m.key:null;if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return T!==null?null:s(w,m,""+p,b);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case uo:return p.key===T?c(w,m,p,b):null;case _r:return p.key===T?u(w,m,p,b):null;case va:return p=Si(p),d(w,m,p,b)}if(Ar(p)||xr(p))return T!==null?null:f(w,m,p,b,null);if(typeof p.then=="function")return d(w,m,qo(p),b);if(p.$$typeof===Yn)return d(w,m,Go(w,p),b);Fo(w,p)}return null}function g(w,m,p,b,T){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return w=w.get(p)||null,s(m,w,""+b,T);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case uo:return w=w.get(b.key===null?p:b.key)||null,c(m,w,b,T);case _r:return w=w.get(b.key===null?p:b.key)||null,u(m,w,b,T);case va:return b=Si(b),g(w,m,p,b,T)}if(Ar(b)||xr(b))return w=w.get(p)||null,f(m,w,b,T,null);if(typeof b.then=="function")return g(w,m,p,qo(b),T);if(b.$$typeof===Yn)return g(w,m,p,Go(m,b),T);Fo(m,b)}return null}function v(w,m,p,b){for(var T=null,N=null,x=m,C=m=0,A=null;x!==null&&C<p.length;C++){x.index>C?(A=x,x=null):A=x.sibling;var O=d(w,x,p[C],b);if(O===null){x===null&&(x=A);break}e&&x&&O.alternate===null&&t(w,x),m=l(O,m,C),N===null?T=O:N.sibling=O,N=O,x=A}if(C===p.length)return n(w,x),Q&&In(w,C),T;if(x===null){for(;C<p.length;C++)x=h(w,p[C],b),x!==null&&(m=l(x,m,C),N===null?T=x:N.sibling=x,N=x);return Q&&In(w,C),T}for(x=a(x);C<p.length;C++)A=g(x,w,C,p[C],b),A!==null&&(e&&A.alternate!==null&&x.delete(A.key===null?C:A.key),m=l(A,m,C),N===null?T=A:N.sibling=A,N=A);return e&&x.forEach(function(_e){return t(w,_e)}),Q&&In(w,C),T}function S(w,m,p,b){if(p==null)throw Error(E(151));for(var T=null,N=null,x=m,C=m=0,A=null,O=p.next();x!==null&&!O.done;C++,O=p.next()){x.index>C?(A=x,x=null):A=x.sibling;var _e=d(w,x,O.value,b);if(_e===null){x===null&&(x=A);break}e&&x&&_e.alternate===null&&t(w,x),m=l(_e,m,C),N===null?T=_e:N.sibling=_e,N=_e,x=A}if(O.done)return n(w,x),Q&&In(w,C),T;if(x===null){for(;!O.done;C++,O=p.next())O=h(w,O.value,b),O!==null&&(m=l(O,m,C),N===null?T=O:N.sibling=O,N=O);return Q&&In(w,C),T}for(x=a(x);!O.done;C++,O=p.next())O=g(x,w,C,O.value,b),O!==null&&(e&&O.alternate!==null&&x.delete(O.key===null?C:O.key),m=l(O,m,C),N===null?T=O:N.sibling=O,N=O);return e&&x.forEach(function(He){return t(w,He)}),Q&&In(w,C),T}function _(w,m,p,b){if(typeof p=="object"&&p!==null&&p.type===sl&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case uo:e:{for(var T=p.key;m!==null;){if(m.key===T){if(T=p.type,T===sl){if(m.tag===7){n(w,m.sibling),b=i(m,p.props.children),b.return=w,w=b;break e}}else if(m.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===va&&Si(T)===m.type){n(w,m.sibling),b=i(m,p.props),Kr(b,p),b.return=w,w=b;break e}n(w,m);break}else t(w,m);m=m.sibling}p.type===sl?(b=mi(p.props.children,w.mode,b,p.key),b.return=w,w=b):(b=Lo(p.type,p.key,p.props,null,w.mode,b),Kr(b,p),b.return=w,w=b)}return r(w);case _r:e:{for(T=p.key;m!==null;){if(m.key===T)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){n(w,m.sibling),b=i(m,p.children||[]),b.return=w,w=b;break e}else{n(w,m);break}else t(w,m);m=m.sibling}b=dd(p,w.mode,b),b.return=w,w=b}return r(w);case va:return p=Si(p),_(w,m,p,b)}if(Ar(p))return v(w,m,p,b);if(xr(p)){if(T=xr(p),typeof T!="function")throw Error(E(150));return p=T.call(p),S(w,m,p,b)}if(typeof p.then=="function")return _(w,m,qo(p),b);if(p.$$typeof===Yn)return _(w,m,Go(w,p),b);Fo(w,p)}return typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint"?(p=""+p,m!==null&&m.tag===6?(n(w,m.sibling),b=i(m,p),b.return=w,w=b):(n(w,m),b=fd(p,w.mode,b),b.return=w,w=b),r(w)):n(w,m)}return function(w,m,p,b){try{Qr=0;var T=_(w,m,p,b);return Ol=null,T}catch(x){if(x===Dl||x===jo)throw x;var N=jt(29,x,null,w.mode);return N.lanes=b,N.return=w,N}finally{}}}var _i=K4(!0),Z4=K4(!1),Ma=!1;function xd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ad(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ca(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Da(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,P&2){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=ko(e),D4(e,null,n),t}return zo(e,a,t,n),ko(e)}function Zr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,H3(e,n)}}function Td(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var r={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};l===null?i=l=r:l=l.next=r,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Nd=!1;function Ir(){if(Nd){var e=Cl;if(e!==null)throw e}}function Jr(e,t,n,a){Nd=!1;var i=e.updateQueue;Ma=!1;var l=i.firstBaseUpdate,r=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,u=c.next;c.next=null,r===null?l=u:r.next=u,r=c;var f=e.alternate;f!==null&&(f=f.updateQueue,s=f.lastBaseUpdate,s!==r&&(s===null?f.firstBaseUpdate=u:s.next=u,f.lastBaseUpdate=c))}if(l!==null){var h=i.baseState;r=0,f=u=c=null,s=l;do{var d=s.lane&-536870913,g=d!==s.lane;if(g?(X&d)===d:(a&d)===d){d!==0&&d===Ml&&(Nd=!0),f!==null&&(f=f.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var v=e,S=s;d=t;var _=n;switch(S.tag){case 1:if(v=S.payload,typeof v=="function"){h=v.call(_,h,d);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=S.payload,d=typeof v=="function"?v.call(_,h,d):v,d==null)break e;h=ce({},h,d);break e;case 2:Ma=!0}}d=s.callback,d!==null&&(e.flags|=64,g&&(e.flags|=8192),g=i.callbacks,g===null?i.callbacks=[d]:g.push(d))}else g={lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},f===null?(u=f=g,c=h):f=f.next=g,r|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;g=s,s=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);f===null&&(c=h),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=f,l===null&&(i.shared.lanes=0),Ua|=r,e.lanes=r,e.memoizedState=h}}function I4(e,t){if(typeof e!="function")throw Error(E(191,e));e.call(t)}function J4(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)I4(n[e],t)}var zl=On(null),Yo=On(0);function W4(e,t){e=la,oe(Yo,e),oe(zl,t),la=e|t.baseLanes}function Md(){oe(Yo,la),oe(zl,zl.current)}function Cd(){la=Yo.current,Ie(zl),Ie(Yo)}var Vt=On(null),sn=null;function Oa(e){var t=e.alternate;oe(Me,Me.current&1),oe(Vt,e),sn===null&&(t===null||zl.current!==null||t.memoizedState!==null)&&(sn=e)}function Dd(e){oe(Me,Me.current),oe(Vt,e),sn===null&&(sn=e)}function R4(e){e.tag===22?(oe(Me,Me.current),oe(Vt,e),sn===null&&(sn=e)):za()}function za(){oe(Me,Me.current),oe(Vt,Vt.current)}function qt(e){Ie(Vt),sn===e&&(sn=null),Ie(Me)}var Me=On(0);function Xo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||B2(n)||G2(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rn=0,V=null,ae=null,Ue=null,Qo=!1,kl=!1,xi=!1,Ko=0,Wr=0,Ll=null,sv=0;function Se(){throw Error(E(321))}function Od(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ht(e[n],t[n]))return!1;return!0}function zd(e,t,n,a,i,l){return Rn=l,V=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Lg:Zd,xi=!1,l=n(a,i),xi=!1,kl&&(l=$4(t,n,a,i)),P4(e),l}function P4(e){G.H=$r;var t=ae!==null&&ae.next!==null;if(Rn=0,Ue=ae=V=null,Qo=!1,Wr=0,Ll=null,t)throw Error(E(300));e===null||Be||(e=e.dependencies,e!==null&&Bo(e)&&(Be=!0))}function $4(e,t,n,a){V=e;var i=0;do{if(kl&&(Ll=null),Wr=0,kl=!1,25<=i)throw Error(E(301));if(i+=1,Ue=ae=null,e.updateQueue!=null){var l=e.updateQueue;l.lastEffect=null,l.events=null,l.stores=null,l.memoCache!=null&&(l.memoCache.index=0)}G.H=Ug,l=t(n,a)}while(kl);return l}function ov(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?Rr(t):t,e=e.useState()[0],(ae!==null?ae.memoizedState:null)!==e&&(V.flags|=1024),t}function kd(){var e=Ko!==0;return Ko=0,e}function Ld(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ud(e){if(Qo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qo=!1}Rn=0,Ue=ae=V=null,kl=!1,Wr=Ko=0,Ll=null}function rt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?V.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function Ce(){if(ae===null){var e=V.alternate;e=e!==null?e.memoizedState:null}else e=ae.next;var t=Ue===null?V.memoizedState:Ue.next;if(t!==null)Ue=t,ae=e;else{if(e===null)throw V.alternate===null?Error(E(467)):Error(E(310));ae=e,e={memoizedState:ae.memoizedState,baseState:ae.baseState,baseQueue:ae.baseQueue,queue:ae.queue,next:null},Ue===null?V.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function Zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rr(e){var t=Wr;return Wr+=1,Ll===null&&(Ll=[]),e=Y4(Ll,e,t),t=V,(Ue===null?t.memoizedState:Ue.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Lg:Zd),e}function Io(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Rr(e);if(e.$$typeof===Yn)return tt(e)}throw Error(E(438,String(e)))}function Bd(e){var t=null,n=V.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=V.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Zo(),V.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=Zy;return t.index++,n}function Pn(e,t){return typeof t=="function"?t(e):t}function Jo(e){var t=Ce();return Gd(t,ae,e)}function Gd(e,t,n){var a=e.queue;if(a===null)throw Error(E(311));a.lastRenderedReducer=n;var i=e.baseQueue,l=a.pending;if(l!==null){if(i!==null){var r=i.next;i.next=l.next,l.next=r}t.baseQueue=i=l,a.pending=null}if(l=e.baseState,i===null)e.memoizedState=l;else{t=i.next;var s=r=null,c=null,u=t,f=!1;do{var h=u.lane&-536870913;if(h!==u.lane?(X&h)===h:(Rn&h)===h){var d=u.revertLane;if(d===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===Ml&&(f=!0);else if((Rn&d)===d){u=u.next,d===Ml&&(f=!0);continue}else h={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(s=c=h,r=l):c=c.next=h,V.lanes|=d,Ua|=d;h=u.action,xi&&n(l,h),l=u.hasEagerState?u.eagerState:n(l,h)}else d={lane:h,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(s=c=d,r=l):c=c.next=d,V.lanes|=h,Ua|=h;u=u.next}while(u!==null&&u!==t);if(c===null?r=l:c.next=s,!Ht(l,e.memoizedState)&&(Be=!0,f&&(n=Cl,n!==null)))throw n;e.memoizedState=l,e.baseState=r,e.baseQueue=c,a.lastRenderedState=l}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Hd(e){var t=Ce(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,l=t.memoizedState;if(i!==null){n.pending=null;var r=i=i.next;do l=e(l,r.action),r=r.next;while(r!==i);Ht(l,t.memoizedState)||(Be=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,a]}function eg(e,t,n){var a=V,i=Ce(),l=Q;if(l){if(n===void 0)throw Error(E(407));n=n()}else n=t();var r=!Ht((ae||i).memoizedState,n);if(r&&(i.memoizedState=n,Be=!0),i=i.queue,qd(ag.bind(null,a,i,e),[e]),i.getSnapshot!==t||r||Ue!==null&&Ue.memoizedState.tag&1){if(a.flags|=2048,Ul(9,{destroy:void 0},ng.bind(null,a,i,n,t),null),le===null)throw Error(E(349));l||Rn&127||tg(a,t,n)}return n}function tg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=V.updateQueue,t===null?(t=Zo(),V.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ng(e,t,n,a){t.value=n,t.getSnapshot=a,ig(t)&&lg(e)}function ag(e,t,n){return n(function(){ig(t)&&lg(e)})}function ig(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ht(e,n)}catch{return!0}}function lg(e){var t=wi(e,2);t!==null&&bt(t,e,2)}function jd(e){var t=rt();if(typeof e=="function"){var n=e;if(e=n(),xi){Sa(!0);try{n()}finally{Sa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:e},t}function rg(e,t,n,a){return e.baseState=n,Gd(e,ae,typeof a=="function"?a:Pn)}function cv(e,t,n,a,i){if(Po(e))throw Error(E(485));if(e=t.action,e!==null){var l={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){l.listeners.push(r)}};G.T!==null?n(!0):l.isTransition=!1,a(l),n=t.pending,n===null?(l.next=t.pending=l,sg(t,l)):(l.next=n.next,t.pending=n.next=l)}}function sg(e,t){var n=t.action,a=t.payload,i=e.state;if(t.isTransition){var l=G.T,r={};G.T=r;try{var s=n(i,a),c=G.S;c!==null&&c(r,s),og(e,t,s)}catch(u){Vd(e,t,u)}finally{l!==null&&r.types!==null&&(l.types=r.types),G.T=l}}else try{l=n(i,a),og(e,t,l)}catch(u){Vd(e,t,u)}}function og(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){cg(e,t,a)},function(a){return Vd(e,t,a)}):cg(e,t,n)}function cg(e,t,n){t.status="fulfilled",t.value=n,ug(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,sg(e,n)))}function Vd(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,ug(t),t=t.next;while(t!==a)}e.action=null}function ug(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function fg(e,t){return t}function dg(e,t){if(Q){var n=le.formState;if(n!==null){e:{var a=V;if(Q){if(ue){t:{for(var i=ue,l=rn;i.nodeType!==8;){if(!l){i=null;break t}if(i=on(i.nextSibling),i===null){i=null;break t}}l=i.data,i=l==="F!"||l==="F"?i:null}if(i){ue=on(i.nextSibling),a=i.data==="F!";break e}}Ta(a)}a=!1}a&&(t=n[0])}}return n=rt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fg,lastRenderedState:t},n.queue=a,n=Og.bind(null,V,a),a.dispatch=n,a=jd(!1),l=Kd.bind(null,V,!1,a.queue),a=rt(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=cv.bind(null,V,i,l,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function hg(e){var t=Ce();return gg(t,ae,e)}function gg(e,t,n){if(t=Gd(e,t,fg)[0],e=Jo(Pn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Rr(t)}catch(r){throw r===Dl?jo:r}else a=t;t=Ce();var i=t.queue,l=i.dispatch;return n!==t.memoizedState&&(V.flags|=2048,Ul(9,{destroy:void 0},uv.bind(null,i,n),null)),[a,l,e]}function uv(e,t){e.action=t}function wg(e){var t=Ce(),n=ae;if(n!==null)return gg(t,n,e);Ce(),t=t.memoizedState,n=Ce();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ul(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=V.updateQueue,t===null&&(t=Zo(),V.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function mg(){return Ce().memoizedState}function Wo(e,t,n,a){var i=rt();V.flags|=e,i.memoizedState=Ul(1|t,{destroy:void 0},n,a===void 0?null:a)}function Ro(e,t,n,a){var i=Ce();a=a===void 0?null:a;var l=i.memoizedState.inst;ae!==null&&a!==null&&Od(a,ae.memoizedState.deps)?i.memoizedState=Ul(t,l,n,a):(V.flags|=e,i.memoizedState=Ul(1|t,l,n,a))}function yg(e,t){Wo(8390656,8,e,t)}function qd(e,t){Ro(2048,8,e,t)}function fv(e){V.flags|=4;var t=V.updateQueue;if(t===null)t=Zo(),V.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function pg(e){var t=Ce().memoizedState;return fv({ref:t,nextImpl:e}),function(){if(P&2)throw Error(E(440));return t.impl.apply(void 0,arguments)}}function vg(e,t){return Ro(4,2,e,t)}function bg(e,t){return Ro(4,4,e,t)}function Sg(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Eg(e,t,n){n=n!=null?n.concat([e]):null,Ro(4,4,Sg.bind(null,t,e),n)}function Fd(){}function _g(e,t){var n=Ce();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Od(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function xg(e,t){var n=Ce();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Od(t,a[1]))return a[0];if(a=e(),xi){Sa(!0);try{e()}finally{Sa(!1)}}return n.memoizedState=[a,t],a}function Yd(e,t,n){return n===void 0||Rn&1073741824&&!(X&261930)?e.memoizedState=t:(e.memoizedState=n,e=Aw(),V.lanes|=e,Ua|=e,n)}function Ag(e,t,n,a){return Ht(n,t)?n:zl.current!==null?(e=Yd(e,n,a),Ht(e,t)||(Be=!0),e):!(Rn&42)||Rn&1073741824&&!(X&261930)?(Be=!0,e.memoizedState=n):(e=Aw(),V.lanes|=e,Ua|=e,t)}function Tg(e,t,n,a,i){var l=R.p;R.p=l!==0&&8>l?l:8;var r=G.T,s={};G.T=s,Kd(e,!1,t,n);try{var c=i(),u=G.S;if(u!==null&&u(s,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=rv(c,a);Pr(e,t,f,Xt(e))}else Pr(e,t,a,Xt(e))}catch(h){Pr(e,t,{then:function(){},status:"rejected",reason:h},Xt())}finally{R.p=l,r!==null&&s.types!==null&&(r.types=s.types),G.T=r}}function dv(){}function Xd(e,t,n,a){if(e.tag!==5)throw Error(E(476));var i=Ng(e).queue;Tg(e,i,t,oi,n===null?dv:function(){return Mg(e),n(a)})}function Ng(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oi,baseState:oi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:oi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Mg(e){var t=Ng(e);t.next===null&&(t=e.alternate.memoizedState),Pr(e,t.next.queue,{},Xt())}function Qd(){return tt(ws)}function Cg(){return Ce().memoizedState}function Dg(){return Ce().memoizedState}function hv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Xt();e=Ca(n);var a=Da(t,e,n);a!==null&&(bt(a,t,n),Zr(a,t,n)),t={cache:bd()},e.payload=t;return}t=t.return}}function gv(e,t,n){var a=Xt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Po(e)?zg(t,n):(n=cd(e,t,n,a),n!==null&&(bt(n,e,a),kg(n,t,a)))}function Og(e,t,n){var a=Xt();Pr(e,t,n,a)}function Pr(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Po(e))zg(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var r=t.lastRenderedState,s=l(r,n);if(i.hasEagerState=!0,i.eagerState=s,Ht(s,r))return zo(e,t,i,0),le===null&&Oo(),!1}catch{}finally{}if(n=cd(e,t,i,a),n!==null)return bt(n,e,a),kg(n,t,a),!0}return!1}function Kd(e,t,n,a){if(a={lane:2,revertLane:x2(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Po(e)){if(t)throw Error(E(479))}else t=cd(e,n,a,2),t!==null&&bt(t,e,2)}function Po(e){var t=e.alternate;return e===V||t!==null&&t===V}function zg(e,t){kl=Qo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kg(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,H3(e,n)}}var $r={readContext:tt,use:Io,useCallback:Se,useContext:Se,useEffect:Se,useImperativeHandle:Se,useLayoutEffect:Se,useInsertionEffect:Se,useMemo:Se,useReducer:Se,useRef:Se,useState:Se,useDebugValue:Se,useDeferredValue:Se,useTransition:Se,useSyncExternalStore:Se,useId:Se,useHostTransitionStatus:Se,useFormState:Se,useActionState:Se,useOptimistic:Se,useMemoCache:Se,useCacheRefresh:Se};$r.useEffectEvent=Se;var Lg={readContext:tt,use:Io,useCallback:function(e,t){return rt().memoizedState=[e,t===void 0?null:t],e},useContext:tt,useEffect:yg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Wo(4194308,4,Sg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wo(4194308,4,e,t)},useInsertionEffect:function(e,t){Wo(4,2,e,t)},useMemo:function(e,t){var n=rt();t=t===void 0?null:t;var a=e();if(xi){Sa(!0);try{e()}finally{Sa(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=rt();if(n!==void 0){var i=n(t);if(xi){Sa(!0);try{n(t)}finally{Sa(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=gv.bind(null,V,e),[a.memoizedState,e]},useRef:function(e){var t=rt();return e={current:e},t.memoizedState=e},useState:function(e){e=jd(e);var t=e.queue,n=Og.bind(null,V,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Fd,useDeferredValue:function(e,t){var n=rt();return Yd(n,e,t)},useTransition:function(){var e=jd(!1);return e=Tg.bind(null,V,e.queue,!0,!1),rt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=V,i=rt();if(Q){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),le===null)throw Error(E(349));X&127||tg(a,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,yg(ag.bind(null,a,l,e),[e]),a.flags|=2048,Ul(9,{destroy:void 0},ng.bind(null,a,l,n,t),null),n},useId:function(){var e=rt(),t=le.identifierPrefix;if(Q){var n=Ln,a=kn;n=(a&~(1<<32-Gt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ko++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=sv++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qd,useFormState:dg,useActionState:dg,useOptimistic:function(e){var t=rt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Kd.bind(null,V,!0,n),n.dispatch=t,[e,t]},useMemoCache:Bd,useCacheRefresh:function(){return rt().memoizedState=hv.bind(null,V)},useEffectEvent:function(e){var t=rt(),n={impl:e};return t.memoizedState=n,function(){if(P&2)throw Error(E(440));return n.impl.apply(void 0,arguments)}}},Zd={readContext:tt,use:Io,useCallback:_g,useContext:tt,useEffect:qd,useImperativeHandle:Eg,useInsertionEffect:vg,useLayoutEffect:bg,useMemo:xg,useReducer:Jo,useRef:mg,useState:function(){return Jo(Pn)},useDebugValue:Fd,useDeferredValue:function(e,t){var n=Ce();return Ag(n,ae.memoizedState,e,t)},useTransition:function(){var e=Jo(Pn)[0],t=Ce().memoizedState;return[typeof e=="boolean"?e:Rr(e),t]},useSyncExternalStore:eg,useId:Cg,useHostTransitionStatus:Qd,useFormState:hg,useActionState:hg,useOptimistic:function(e,t){var n=Ce();return rg(n,ae,e,t)},useMemoCache:Bd,useCacheRefresh:Dg};Zd.useEffectEvent=pg;var Ug={readContext:tt,use:Io,useCallback:_g,useContext:tt,useEffect:qd,useImperativeHandle:Eg,useInsertionEffect:vg,useLayoutEffect:bg,useMemo:xg,useReducer:Hd,useRef:mg,useState:function(){return Hd(Pn)},useDebugValue:Fd,useDeferredValue:function(e,t){var n=Ce();return ae===null?Yd(n,e,t):Ag(n,ae.memoizedState,e,t)},useTransition:function(){var e=Hd(Pn)[0],t=Ce().memoizedState;return[typeof e=="boolean"?e:Rr(e),t]},useSyncExternalStore:eg,useId:Cg,useHostTransitionStatus:Qd,useFormState:wg,useActionState:wg,useOptimistic:function(e,t){var n=Ce();return ae!==null?rg(n,ae,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Bd,useCacheRefresh:Dg};Ug.useEffectEvent=pg;function Id(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Jd={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Xt(),i=Ca(a);i.payload=t,n!=null&&(i.callback=n),t=Da(e,i,a),t!==null&&(bt(t,e,a),Zr(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Xt(),i=Ca(a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Da(e,i,a),t!==null&&(bt(t,e,a),Zr(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xt(),a=Ca(n);a.tag=2,t!=null&&(a.callback=t),t=Da(e,a,n),t!==null&&(bt(t,e,n),Zr(t,e,n))}};function Bg(e,t,n,a,i,l,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,l,r):t.prototype&&t.prototype.isPureReactComponent?!jr(n,a)||!jr(i,l):!0}function Gg(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Jd.enqueueReplaceState(t,t.state,null)}function Ai(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=ce({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Hg(e){Do(e)}function jg(e){console.error(e)}function Vg(e){Do(e)}function $o(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function qg(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function Wd(e,t,n){return n=Ca(n),n.tag=3,n.payload={element:null},n.callback=function(){$o(e,t)},n}function Fg(e){return e=Ca(e),e.tag=3,e}function Yg(e,t,n,a){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var l=a.value;e.payload=function(){return i(l)},e.callback=function(){qg(t,n,a)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){qg(t,n,a),typeof i!="function"&&(Ba===null?Ba=new Set([this]):Ba.add(this));var s=a.stack;this.componentDidCatch(a.value,{componentStack:s!==null?s:""})})}function wv(e,t,n,a,i){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Nl(t,n,i,!0),n=Vt.current,n!==null){switch(n.tag){case 31:case 13:return sn===null?fc():n.alternate===null&&Ee===0&&(Ee=3),n.flags&=-257,n.flags|=65536,n.lanes=i,a===Vo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),S2(e,a,i)),!1;case 22:return n.flags|=65536,a===Vo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),S2(e,a,i)),!1}throw Error(E(435,n.tag))}return S2(e,a,i),fc(),!1}if(Q)return t=Vt.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==wd&&(e=Error(E(422),{cause:a}),Fr(nn(e,n)))):(a!==wd&&(t=Error(E(423),{cause:a}),Fr(nn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=nn(a,n),i=Wd(e.stateNode,a,i),Td(e,i),Ee!==4&&(Ee=2)),!1;var l=Error(E(520),{cause:a});if(l=nn(l,n),ss===null?ss=[l]:ss.push(l),Ee!==4&&(Ee=2),t===null)return!0;a=nn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Wd(n.stateNode,a,e),Td(n,e),!1;case 1:if(t=n.type,l=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(Ba===null||!Ba.has(l))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Fg(i),Yg(i,e,n,a),Td(n,i),!1}n=n.return}while(n!==null);return!1}var Rd=Error(E(461)),Be=!1;function nt(e,t,n,a){t.child=e===null?Z4(t,null,n,a):_i(t,e.child,n,a)}function Xg(e,t,n,a,i){n=n.render;var l=t.ref;if("ref"in a){var r={};for(var s in a)s!=="ref"&&(r[s]=a[s])}else r=a;return vi(t),a=zd(e,t,n,r,l,i),s=kd(),e!==null&&!Be?(Ld(e,t,i),$n(e,t,i)):(Q&&s&&hd(t),t.flags|=1,nt(e,t,a,i),t.child)}function Qg(e,t,n,a,i){if(e===null){var l=n.type;return typeof l=="function"&&!ud(l)&&l.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=l,Kg(e,t,l,a,i)):(e=Lo(n.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(l=e.child,!l2(e,i)){var r=l.memoizedProps;if(n=n.compare,n=n!==null?n:jr,n(r,a)&&e.ref===t.ref)return $n(e,t,i)}return t.flags|=1,e=Zn(l,a),e.ref=t.ref,e.return=t,t.child=e}function Kg(e,t,n,a,i){if(e!==null){var l=e.memoizedProps;if(jr(l,a)&&e.ref===t.ref)if(Be=!1,t.pendingProps=a=l,l2(e,i))e.flags&131072&&(Be=!0);else return t.lanes=e.lanes,$n(e,t,i)}return Pd(e,t,n,a,i)}function Zg(e,t,n,a){var i=a.children,l=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if(t.flags&128){if(l=l!==null?l.baseLanes|n:n,e!==null){for(a=t.child=e.child,i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~l}else a=0,t.child=null;return Ig(e,t,l,n,a)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ho(t,l!==null?l.cachePool:null),l!==null?W4(t,l):Md(),R4(t);else return a=t.lanes=536870912,Ig(e,t,l!==null?l.baseLanes|n:n,n,a)}else l!==null?(Ho(t,l.cachePool),W4(t,l),za(),t.memoizedState=null):(e!==null&&Ho(t,null),Md(),za());return nt(e,t,i,n),t.child}function es(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ig(e,t,n,a,i){var l=Ed();return l=l===null?null:{parent:Le._currentValue,pool:l},t.memoizedState={baseLanes:n,cachePool:l},e!==null&&Ho(t,null),Md(),R4(t),e!==null&&Nl(e,t,a,!0),t.childLanes=i,null}function ec(e,t){return t=nc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jg(e,t,n){return _i(t,e.child,null,n),e=ec(t,t.pendingProps),e.flags|=2,qt(t),t.memoizedState=null,e}function mv(e,t,n){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Q){if(a.mode==="hidden")return e=ec(t,a),t.lanes=536870912,es(null,e);if(Dd(t),(e=ue)?(e=sm(e,rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:kn,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},n=z4(e),n.return=t,t.child=n,et=t,ue=null)):e=null,e===null)throw Ta(t);return t.lanes=536870912,null}return ec(t,a)}var l=e.memoizedState;if(l!==null){var r=l.dehydrated;if(Dd(t),i)if(t.flags&256)t.flags&=-257,t=Jg(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(E(558));else if(Be||Nl(e,t,n,!1),i=(n&e.childLanes)!==0,Be||i){if(a=le,a!==null&&(r=j3(a,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,wi(e,r),bt(a,e,r),Rd;fc(),t=Jg(e,t,n)}else e=l.treeContext,ue=on(r.nextSibling),et=t,Q=!0,Aa=null,rn=!1,e!==null&&U4(t,e),t=ec(t,a),t.flags|=4096;return t}return e=Zn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function tc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(E(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Pd(e,t,n,a,i){return vi(t),n=zd(e,t,n,a,void 0,i),a=kd(),e!==null&&!Be?(Ld(e,t,i),$n(e,t,i)):(Q&&a&&hd(t),t.flags|=1,nt(e,t,n,i),t.child)}function Wg(e,t,n,a,i,l){return vi(t),t.updateQueue=null,n=$4(t,a,n,i),P4(e),a=kd(),e!==null&&!Be?(Ld(e,t,l),$n(e,t,l)):(Q&&a&&hd(t),t.flags|=1,nt(e,t,n,l),t.child)}function Rg(e,t,n,a,i){if(vi(t),t.stateNode===null){var l=_l,r=n.contextType;typeof r=="object"&&r!==null&&(l=tt(r)),l=new n(a,l),t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Jd,t.stateNode=l,l._reactInternals=t,l=t.stateNode,l.props=a,l.state=t.memoizedState,l.refs={},xd(t),r=n.contextType,l.context=typeof r=="object"&&r!==null?tt(r):_l,l.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(Id(t,n,r,a),l.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof l.getSnapshotBeforeUpdate=="function"||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(r=l.state,typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount(),r!==l.state&&Jd.enqueueReplaceState(l,l.state,null),Jr(t,a,l,i),Ir(),l.state=t.memoizedState),typeof l.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){l=t.stateNode;var s=t.memoizedProps,c=Ai(n,s);l.props=c;var u=l.context,f=n.contextType;r=_l,typeof f=="object"&&f!==null&&(r=tt(f));var h=n.getDerivedStateFromProps;f=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s||u!==r)&&Gg(t,l,a,r),Ma=!1;var d=t.memoizedState;l.state=d,Jr(t,a,l,i),Ir(),u=t.memoizedState,s||d!==u||Ma?(typeof h=="function"&&(Id(t,n,h,a),u=t.memoizedState),(c=Ma||Bg(t,n,c,a,d,u,r))?(f||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=u),l.props=a,l.state=u,l.context=r,a=c):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{l=t.stateNode,Ad(e,t),r=t.memoizedProps,f=Ai(n,r),l.props=f,h=t.pendingProps,d=l.context,u=n.contextType,c=_l,typeof u=="object"&&u!==null&&(c=tt(u)),s=n.getDerivedStateFromProps,(u=typeof s=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(r!==h||d!==c)&&Gg(t,l,a,c),Ma=!1,d=t.memoizedState,l.state=d,Jr(t,a,l,i),Ir();var g=t.memoizedState;r!==h||d!==g||Ma||e!==null&&e.dependencies!==null&&Bo(e.dependencies)?(typeof s=="function"&&(Id(t,n,s,a),g=t.memoizedState),(f=Ma||Bg(t,n,f,a,d,g,c)||e!==null&&e.dependencies!==null&&Bo(e.dependencies))?(u||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(a,g,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(a,g,c)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=g),l.props=a,l.state=g,l.context=c,a=f):(typeof l.componentDidUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),a=!1)}return l=a,tc(e,t),a=(t.flags&128)!==0,l||a?(l=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:l.render(),t.flags|=1,e!==null&&a?(t.child=_i(t,e.child,null,i),t.child=_i(t,null,n,i)):nt(e,t,n,i),t.memoizedState=l.state,e=t.child):e=$n(e,t,i),e}function Pg(e,t,n,a){return yi(),t.flags|=256,nt(e,t,n,a),t.child}var $d={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function e2(e){return{baseLanes:e,cachePool:q4()}}function t2(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Yt),e}function $g(e,t,n){var a=t.pendingProps,i=!1,l=(t.flags&128)!==0,r;if((r=l)||(r=e!==null&&e.memoizedState===null?!1:(Me.current&2)!==0),r&&(i=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Q){if(i?Oa(t):za(),(e=ue)?(e=sm(e,rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:kn,overflow:Ln}:null,retryLane:536870912,hydrationErrors:null},n=z4(e),n.return=t,t.child=n,et=t,ue=null)):e=null,e===null)throw Ta(t);return G2(e)?t.lanes=32:t.lanes=536870912,null}var s=a.children;return a=a.fallback,i?(za(),i=t.mode,s=nc({mode:"hidden",children:s},i),a=mi(a,i,n,null),s.return=t,a.return=t,s.sibling=a,t.child=s,a=t.child,a.memoizedState=e2(n),a.childLanes=t2(e,r,n),t.memoizedState=$d,es(null,a)):(Oa(t),n2(t,s))}var c=e.memoizedState;if(c!==null&&(s=c.dehydrated,s!==null)){if(l)t.flags&256?(Oa(t),t.flags&=-257,t=a2(e,t,n)):t.memoizedState!==null?(za(),t.child=e.child,t.flags|=128,t=null):(za(),s=a.fallback,i=t.mode,a=nc({mode:"visible",children:a.children},i),s=mi(s,i,n,null),s.flags|=2,a.return=t,s.return=t,a.sibling=s,t.child=a,_i(t,e.child,null,n),a=t.child,a.memoizedState=e2(n),a.childLanes=t2(e,r,n),t.memoizedState=$d,t=es(null,a));else if(Oa(t),G2(s)){if(r=s.nextSibling&&s.nextSibling.dataset,r)var u=r.dgst;r=u,a=Error(E(419)),a.stack="",a.digest=r,Fr({value:a,source:null,stack:null}),t=a2(e,t,n)}else if(Be||Nl(e,t,n,!1),r=(n&e.childLanes)!==0,Be||r){if(r=le,r!==null&&(a=j3(r,n),a!==0&&a!==c.retryLane))throw c.retryLane=a,wi(e,a),bt(r,e,a),Rd;B2(s)||fc(),t=a2(e,t,n)}else B2(s)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,ue=on(s.nextSibling),et=t,Q=!0,Aa=null,rn=!1,e!==null&&U4(t,e),t=n2(t,a.children),t.flags|=4096);return t}return i?(za(),s=a.fallback,i=t.mode,c=e.child,u=c.sibling,a=Zn(c,{mode:"hidden",children:a.children}),a.subtreeFlags=c.subtreeFlags&65011712,u!==null?s=Zn(u,s):(s=mi(s,i,n,null),s.flags|=2),s.return=t,a.return=t,a.sibling=s,t.child=a,es(null,a),a=t.child,s=e.child.memoizedState,s===null?s=e2(n):(i=s.cachePool,i!==null?(c=Le._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=q4(),s={baseLanes:s.baseLanes|n,cachePool:i}),a.memoizedState=s,a.childLanes=t2(e,r,n),t.memoizedState=$d,es(e.child,a)):(Oa(t),n=e.child,e=n.sibling,n=Zn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function n2(e,t){return t=nc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function nc(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function a2(e,t,n){return _i(t,e.child,null,n),e=n2(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ew(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),pd(e.return,t,n)}function i2(e,t,n,a,i,l){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i,treeForkCount:l}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=a,r.tail=n,r.tailMode=i,r.treeForkCount=l)}function tw(e,t,n){var a=t.pendingProps,i=a.revealOrder,l=a.tail;a=a.children;var r=Me.current,s=(r&2)!==0;if(s?(r=r&1|2,t.flags|=128):r&=1,oe(Me,r),nt(e,t,a,n),a=Q?qr:0,!s&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ew(e,n,t);else if(e.tag===19)ew(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Xo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),i2(t,!1,i,n,l,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Xo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}i2(t,!0,n,null,l,a);break;case"together":i2(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function $n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ua|=t.lanes,!(n&t.childLanes))if(e!==null){if(Nl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=Zn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function l2(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Bo(e)))}function yv(e,t,n){switch(t.tag){case 3:ho(t,t.stateNode.containerInfo),Na(t,Le,e.memoizedState.cache),yi();break;case 27:case 5:Cf(t);break;case 4:ho(t,t.stateNode.containerInfo);break;case 10:Na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Dd(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Oa(t),t.flags|=128,null):n&t.child.childLanes?$g(e,t,n):(Oa(t),e=$n(e,t,n),e!==null?e.sibling:null);Oa(t);break;case 19:var i=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Nl(e,t,n,!1),a=(n&t.childLanes)!==0),i){if(a)return tw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(Me,Me.current),a)break;return null;case 22:return t.lanes=0,Zg(e,t,n,t.pendingProps);case 24:Na(t,Le,e.memoizedState.cache)}return $n(e,t,n)}function nw(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Be=!0;else{if(!l2(e,n)&&!(t.flags&128))return Be=!1,yv(e,t,n);Be=!!(e.flags&131072)}else Be=!1,Q&&t.flags&1048576&&L4(t,qr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Si(t.elementType),t.type=e,typeof e=="function")ud(e)?(a=Ai(e,a),t.tag=1,t=Rg(null,t,e,a,n)):(t.tag=0,t=Pd(null,t,e,a,n));else{if(e!=null){var i=e.$$typeof;if(i===Ef){t.tag=11,t=Xg(null,t,e,a,n);break e}else if(i===Af){t.tag=14,t=Qg(null,t,e,a,n);break e}}throw t=Nf(e)||e,Error(E(306,t,""))}}return t;case 0:return Pd(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=Ai(a,t.pendingProps),Rg(e,t,a,i,n);case 3:e:{if(ho(t,t.stateNode.containerInfo),e===null)throw Error(E(387));a=t.pendingProps;var l=t.memoizedState;i=l.element,Ad(e,t),Jr(t,a,null,n);var r=t.memoizedState;if(a=r.cache,Na(t,Le,a),a!==l.cache&&vd(t,[Le],n,!0),Ir(),a=r.element,l.isDehydrated)if(l={element:a,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){t=Pg(e,t,a,n);break e}else if(a!==i){i=nn(Error(E(424)),t),Fr(i),t=Pg(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ue=on(e.firstChild),et=t,Q=!0,Aa=null,rn=!0,n=Z4(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(yi(),a===i){t=$n(e,t,n);break e}nt(e,t,a,n)}t=t.child}return t;case 26:return tc(e,t),e===null?(n=hm(t.type,null,t.pendingProps,null))?t.memoizedState=n:Q||(n=t.type,e=t.pendingProps,a=pc(ba.current).createElement(n),a[$e]=t,a[gt]=e,at(a,n,e),Je(a),t.stateNode=a):t.memoizedState=hm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Cf(t),e===null&&Q&&(a=t.stateNode=um(t.type,t.pendingProps,ba.current),et=t,rn=!0,i=ue,Va(t.type)?(H2=i,ue=on(a.firstChild)):ue=i),nt(e,t,t.pendingProps.children,n),tc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Q&&((i=a=ue)&&(a=Zv(a,t.type,t.pendingProps,rn),a!==null?(t.stateNode=a,et=t,ue=on(a.firstChild),rn=!1,i=!0):i=!1),i||Ta(t)),Cf(t),i=t.type,l=t.pendingProps,r=e!==null?e.memoizedProps:null,a=l.children,k2(i,l)?a=null:r!==null&&k2(i,r)&&(t.flags|=32),t.memoizedState!==null&&(i=zd(e,t,ov,null,null,n),ws._currentValue=i),tc(e,t),nt(e,t,a,n),t.child;case 6:return e===null&&Q&&((e=n=ue)&&(n=Iv(n,t.pendingProps,rn),n!==null?(t.stateNode=n,et=t,ue=null,e=!0):e=!1),e||Ta(t)),null;case 13:return $g(e,t,n);case 4:return ho(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=_i(t,null,a,n):nt(e,t,a,n),t.child;case 11:return Xg(e,t,t.type,t.pendingProps,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Na(t,t.type,a.value),nt(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,vi(t),i=tt(i),a=a(i),t.flags|=1,nt(e,t,a,n),t.child;case 14:return Qg(e,t,t.type,t.pendingProps,n);case 15:return Kg(e,t,t.type,t.pendingProps,n);case 19:return tw(e,t,n);case 31:return mv(e,t,n);case 22:return Zg(e,t,n,t.pendingProps);case 24:return vi(t),a=tt(Le),e===null?(i=Ed(),i===null&&(i=le,l=bd(),i.pooledCache=l,l.refCount++,l!==null&&(i.pooledCacheLanes|=n),i=l),t.memoizedState={parent:a,cache:i},xd(t),Na(t,Le,i)):(e.lanes&n&&(Ad(e,t),Jr(t,null,null,n),Ir()),i=e.memoizedState,l=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Na(t,Le,a)):(a=l.cache,Na(t,Le,a),a!==i.cache&&vd(t,[Le],n,!0))),nt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(E(156,t.tag))}function ea(e){e.flags|=4}function r2(e,t,n,a,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Cw())e.flags|=8192;else throw Ei=Vo,_d}else e.flags&=-16777217}function aw(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!pm(t))if(Cw())e.flags|=8192;else throw Ei=Vo,_d}function ac(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?B3():536870912,e.lanes|=t,jl|=t)}function ts(e,t){if(!Q)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function pv(e,t,n){var a=t.pendingProps;switch(gd(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fe(t),null;case 1:return fe(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wn(Le),cl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?ea(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,md())),fe(t),null;case 26:var i=t.type,l=t.memoizedState;return e===null?(ea(t),l!==null?(fe(t),aw(t,l)):(fe(t),r2(t,i,null,a,n))):l?l!==e.memoizedState?(ea(t),fe(t),aw(t,l)):(fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ea(t),fe(t),r2(t,i,e,a,n)),null;case 27:if(go(t),n=ba.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ea(t);else{if(!a){if(t.stateNode===null)throw Error(E(166));return fe(t),null}e=zn.current,Tl(t)?B4(t):(e=um(i,a,n),t.stateNode=e,ea(t))}return fe(t),null;case 5:if(go(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ea(t);else{if(!a){if(t.stateNode===null)throw Error(E(166));return fe(t),null}if(l=zn.current,Tl(t))B4(t);else{var r=pc(ba.current);switch(l){case 1:l=r.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:l=r.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":l=r.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":l=r.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":l=r.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild);break;case"select":l=typeof a.is=="string"?r.createElement("select",{is:a.is}):r.createElement("select"),a.multiple?l.multiple=!0:a.size&&(l.size=a.size);break;default:l=typeof a.is=="string"?r.createElement(i,{is:a.is}):r.createElement(i)}}l[$e]=t,l[gt]=a;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)l.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=l;e:switch(at(l,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ea(t)}}return fe(t),r2(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ea(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(E(166));if(e=ba.current,Tl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=et,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[$e]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||$w(e.nodeValue,n)),e||Ta(t,!0)}else e=pc(e).createTextNode(a),e[$e]=t,t.stateNode=e}return fe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Tl(t),n!==null){if(e===null){if(!a)throw Error(E(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(557));e[$e]=t}else yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fe(t),e=!1}else n=md(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(qt(t),t):(qt(t),null);if(t.flags&128)throw Error(E(558))}return fe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Tl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(E(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(E(317));i[$e]=t}else yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fe(t),i=!1}else i=md(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(qt(t),t):(qt(t),null)}return qt(t),t.flags&128?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),l=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),l!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ac(t,t.updateQueue),fe(t),null);case 4:return cl(),e===null&&M2(t.stateNode.containerInfo),fe(t),null;case 10:return Wn(t.type),fe(t),null;case 19:if(Ie(Me),a=t.memoizedState,a===null)return fe(t),null;if(i=(t.flags&128)!==0,l=a.rendering,l===null)if(i)ts(a,!1);else{if(Ee!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=Xo(e),l!==null){for(t.flags|=128,ts(a,!1),e=l.updateQueue,t.updateQueue=e,ac(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)O4(n,e),n=n.sibling;return oe(Me,Me.current&1|2),Q&&In(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Ut()>oc&&(t.flags|=128,i=!0,ts(a,!1),t.lanes=4194304)}else{if(!i)if(e=Xo(l),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ac(t,e),ts(a,!0),a.tail===null&&a.tailMode==="hidden"&&!l.alternate&&!Q)return fe(t),null}else 2*Ut()-a.renderingStartTime>oc&&n!==536870912&&(t.flags|=128,i=!0,ts(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(e=a.last,e!==null?e.sibling=l:t.child=l,a.last=l)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Ut(),e.sibling=null,n=Me.current,oe(Me,i?n&1|2:n&1),Q&&In(t,a.treeForkCount),e):(fe(t),null);case 22:case 23:return qt(t),Cd(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(fe(t),t.subtreeFlags&6&&(t.flags|=8192)):fe(t),n=t.updateQueue,n!==null&&ac(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&Ie(bi),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wn(Le),fe(t),null;case 25:return null;case 30:return null}throw Error(E(156,t.tag))}function vv(e,t){switch(gd(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(Le),cl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return go(t),null;case 31:if(t.memoizedState!==null){if(qt(t),t.alternate===null)throw Error(E(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ie(Me),null;case 4:return cl(),null;case 10:return Wn(t.type),null;case 22:case 23:return qt(t),Cd(),e!==null&&Ie(bi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wn(Le),null;case 25:return null;default:return null}}function iw(e,t){switch(gd(t),t.tag){case 3:Wn(Le),cl();break;case 26:case 27:case 5:go(t);break;case 4:cl();break;case 31:t.memoizedState!==null&&qt(t);break;case 13:qt(t);break;case 19:Ie(Me);break;case 10:Wn(t.type);break;case 22:case 23:qt(t),Cd(),e!==null&&Ie(bi);break;case 24:Wn(Le)}}function ns(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var l=n.create,r=n.inst;a=l(),r.destroy=a}n=n.next}while(n!==i)}}catch(s){te(t,t.return,s)}}function ka(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var l=i.next;a=l;do{if((a.tag&e)===e){var r=a.inst,s=r.destroy;if(s!==void 0){r.destroy=void 0,i=t;var c=n,u=s;try{u()}catch(f){te(i,c,f)}}}a=a.next}while(a!==l)}}catch(f){te(t,t.return,f)}}function lw(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{J4(t,n)}catch(a){te(e,e.return,a)}}}function rw(e,t,n){n.props=Ai(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){te(e,t,a)}}function as(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(i){te(e,t,i)}}function Un(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){te(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){te(e,t,i)}else n.current=null}function sw(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){te(e,e.return,i)}}function s2(e,t,n){try{var a=e.stateNode;qv(a,e.type,n,t),a[gt]=t}catch(i){te(e,e.return,i)}}function ow(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Va(e.type)||e.tag===4}function o2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ow(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Va(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function c2(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qn));else if(a!==4&&(a===27&&Va(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(c2(e,t,n),e=e.sibling;e!==null;)c2(e,t,n),e=e.sibling}function ic(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Va(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ic(e,t,n),e=e.sibling;e!==null;)ic(e,t,n),e=e.sibling}function cw(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);at(t,a,n),t[$e]=e,t[gt]=n}catch(l){te(e,e.return,l)}}var ta=!1,Ge=!1,u2=!1,uw=typeof WeakSet=="function"?WeakSet:Set,We=null;function bv(e,t){if(e=e.containerInfo,O2=Ac,e=E4(e),ad(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,l=a.focusNode;a=a.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var r=0,s=-1,c=-1,u=0,f=0,h=e,d=null;t:for(;;){for(var g;h!==n||i!==0&&h.nodeType!==3||(s=r+i),h!==l||a!==0&&h.nodeType!==3||(c=r+a),h.nodeType===3&&(r+=h.nodeValue.length),(g=h.firstChild)!==null;)d=h,h=g;for(;;){if(h===e)break t;if(d===n&&++u===i&&(s=r),d===l&&++f===a&&(c=r),(g=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=g}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(z2={focusedElem:e,selectionRange:n},Ac=!1,We=t;We!==null;)if(t=We,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,We=e;else for(;We!==null;){switch(t=We,l=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&l!==null){e=void 0,n=t,i=l.memoizedProps,l=l.memoizedState,a=n.stateNode;try{var v=Ai(n.type,i);e=a.getSnapshotBeforeUpdate(v,l),a.__reactInternalSnapshotBeforeUpdate=e}catch(S){te(n,n.return,S)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)U2(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":U2(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(E(163))}if(e=t.sibling,e!==null){e.return=t.return,We=e;break}We=t.return}}function fw(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:aa(e,n),a&4&&ns(5,n);break;case 1:if(aa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){te(n,n.return,r)}else{var i=Ai(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){te(n,n.return,r)}}a&64&&lw(n),a&512&&as(n,n.return);break;case 3:if(aa(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{J4(e,t)}catch(r){te(n,n.return,r)}}break;case 27:t===null&&a&4&&cw(n);case 26:case 5:aa(e,n),t===null&&a&4&&sw(n),a&512&&as(n,n.return);break;case 12:aa(e,n);break;case 31:aa(e,n),a&4&&gw(e,n);break;case 13:aa(e,n),a&4&&ww(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Cv.bind(null,n),Jv(e,n))));break;case 22:if(a=n.memoizedState!==null||ta,!a){t=t!==null&&t.memoizedState!==null||Ge,i=ta;var l=Ge;ta=a,(Ge=t)&&!l?ia(e,n,(n.subtreeFlags&8772)!==0):aa(e,n),ta=i,Ge=l}break;case 30:break;default:aa(e,n)}}function dw(e){var t=e.alternate;t!==null&&(e.alternate=null,dw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Vf(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var we=null,mt=!1;function na(e,t,n){for(n=n.child;n!==null;)hw(e,t,n),n=n.sibling}function hw(e,t,n){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(Nr,n)}catch{}switch(n.tag){case 26:Ge||Un(n,t),na(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ge||Un(n,t);var a=we,i=mt;Va(n.type)&&(we=n.stateNode,mt=!1),na(e,t,n),ds(n.stateNode),we=a,mt=i;break;case 5:Ge||Un(n,t);case 6:if(a=we,i=mt,we=null,na(e,t,n),we=a,mt=i,we!==null)if(mt)try{(we.nodeType===9?we.body:we.nodeName==="HTML"?we.ownerDocument.body:we).removeChild(n.stateNode)}catch(l){te(n,t,l)}else try{we.removeChild(n.stateNode)}catch(l){te(n,t,l)}break;case 18:we!==null&&(mt?(e=we,lm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Zl(e)):lm(we,n.stateNode));break;case 4:a=we,i=mt,we=n.stateNode.containerInfo,mt=!0,na(e,t,n),we=a,mt=i;break;case 0:case 11:case 14:case 15:ka(2,n,t),Ge||ka(4,n,t),na(e,t,n);break;case 1:Ge||(Un(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&rw(n,t,a)),na(e,t,n);break;case 21:na(e,t,n);break;case 22:Ge=(a=Ge)||n.memoizedState!==null,na(e,t,n),Ge=a;break;default:na(e,t,n)}}function gw(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zl(e)}catch(n){te(t,t.return,n)}}}function ww(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zl(e)}catch(n){te(t,t.return,n)}}function Sv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new uw),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new uw),t;default:throw Error(E(435,e.tag))}}function lc(e,t){var n=Sv(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var i=Dv.bind(null,e,a);a.then(i,i)}})}function yt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var i=n[a],l=e,r=t,s=r;e:for(;s!==null;){switch(s.tag){case 27:if(Va(s.type)){we=s.stateNode,mt=!1;break e}break;case 5:we=s.stateNode,mt=!1;break e;case 3:case 4:we=s.stateNode.containerInfo,mt=!0;break e}s=s.return}if(we===null)throw Error(E(160));hw(l,r,i),we=null,mt=!1,l=i.alternate,l!==null&&(l.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)mw(t,e),t=t.sibling}var pn=null;function mw(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yt(t,e),pt(e),a&4&&(ka(3,e,e.return),ns(3,e),ka(5,e,e.return));break;case 1:yt(t,e),pt(e),a&512&&(Ge||n===null||Un(n,n.return)),a&64&&ta&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var i=pn;if(yt(t,e),pt(e),a&512&&(Ge||n===null||Un(n,n.return)),a&4){var l=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(a){case"title":l=i.getElementsByTagName("title")[0],(!l||l[Dr]||l[$e]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=i.createElement(a),i.head.insertBefore(l,i.querySelector("head > title"))),at(l,a,n),l[$e]=e,Je(l),a=l;break e;case"link":var r=mm("link","href",i).get(a+(n.href||""));if(r){for(var s=0;s<r.length;s++)if(l=r[s],l.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(s,1);break t}}l=i.createElement(a),at(l,a,n),i.head.appendChild(l);break;case"meta":if(r=mm("meta","content",i).get(a+(n.content||""))){for(s=0;s<r.length;s++)if(l=r[s],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(s,1);break t}}l=i.createElement(a),at(l,a,n),i.head.appendChild(l);break;default:throw Error(E(468,a))}l[$e]=e,Je(l),a=l}e.stateNode=a}else ym(i,e.type,e.stateNode);else e.stateNode=wm(i,a,e.memoizedProps);else l!==a?(l===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):l.count--,a===null?ym(i,e.type,e.stateNode):wm(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&s2(e,e.memoizedProps,n.memoizedProps)}break;case 27:yt(t,e),pt(e),a&512&&(Ge||n===null||Un(n,n.return)),n!==null&&a&4&&s2(e,e.memoizedProps,n.memoizedProps);break;case 5:if(yt(t,e),pt(e),a&512&&(Ge||n===null||Un(n,n.return)),e.flags&32){i=e.stateNode;try{ml(i,"")}catch(v){te(e,e.return,v)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,s2(e,i,n!==null?n.memoizedProps:i)),a&1024&&(u2=!0);break;case 6:if(yt(t,e),pt(e),a&4){if(e.stateNode===null)throw Error(E(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(v){te(e,e.return,v)}}break;case 3:if(Sc=null,i=pn,pn=vc(t.containerInfo),yt(t,e),pn=i,pt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Zl(t.containerInfo)}catch(v){te(e,e.return,v)}u2&&(u2=!1,yw(e));break;case 4:a=pn,pn=vc(e.stateNode.containerInfo),yt(t,e),pt(e),pn=a;break;case 12:yt(t,e),pt(e);break;case 31:yt(t,e),pt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,lc(e,a)));break;case 13:yt(t,e),pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(sc=Ut()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,lc(e,a)));break;case 22:i=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=ta,f=Ge;if(ta=u||i,Ge=f||c,yt(t,e),Ge=f,ta=u,pt(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||c||ta||Ge||Ti(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(l=c.stateNode,i)r=l.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{s=c.stateNode;var h=c.memoizedProps.style,d=h!=null&&h.hasOwnProperty("display")?h.display:null;s.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(v){te(c,c.return,v)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=i?"":c.memoizedProps}catch(v){te(c,c.return,v)}}}else if(t.tag===18){if(n===null){c=t;try{var g=c.stateNode;i?rm(g,!0):rm(c.stateNode,!1)}catch(v){te(c,c.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,lc(e,n))));break;case 19:yt(t,e),pt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,lc(e,a)));break;case 30:break;case 21:break;default:yt(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(ow(a)){n=a;break}a=a.return}if(n==null)throw Error(E(160));switch(n.tag){case 27:var i=n.stateNode,l=o2(e);ic(e,l,i);break;case 5:var r=n.stateNode;n.flags&32&&(ml(r,""),n.flags&=-33);var s=o2(e);ic(e,s,r);break;case 3:case 4:var c=n.stateNode.containerInfo,u=o2(e);c2(e,u,c);break;default:throw Error(E(161))}}catch(f){te(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yw(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yw(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function aa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fw(e,t.alternate,t),t=t.sibling}function Ti(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ka(4,t,t.return),Ti(t);break;case 1:Un(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&rw(t,t.return,n),Ti(t);break;case 27:ds(t.stateNode);case 26:case 5:Un(t,t.return),Ti(t);break;case 22:t.memoizedState===null&&Ti(t);break;case 30:Ti(t);break;default:Ti(t)}e=e.sibling}}function ia(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,l=t,r=l.flags;switch(l.tag){case 0:case 11:case 15:ia(i,l,n),ns(4,l);break;case 1:if(ia(i,l,n),a=l,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){te(a,a.return,u)}if(a=l,i=a.updateQueue,i!==null){var s=a.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)I4(c[i],s)}catch(u){te(a,a.return,u)}}n&&r&64&&lw(l),as(l,l.return);break;case 27:cw(l);case 26:case 5:ia(i,l,n),n&&a===null&&r&4&&sw(l),as(l,l.return);break;case 12:ia(i,l,n);break;case 31:ia(i,l,n),n&&r&4&&gw(i,l);break;case 13:ia(i,l,n),n&&r&4&&ww(i,l);break;case 22:l.memoizedState===null&&ia(i,l,n),as(l,l.return);break;case 30:break;default:ia(i,l,n)}t=t.sibling}}function f2(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Yr(n))}function d2(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yr(e))}function vn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pw(e,t,n,a),t=t.sibling}function pw(e,t,n,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:vn(e,t,n,a),i&2048&&ns(9,t);break;case 1:vn(e,t,n,a);break;case 3:vn(e,t,n,a),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yr(e)));break;case 12:if(i&2048){vn(e,t,n,a),e=t.stateNode;try{var l=t.memoizedProps,r=l.id,s=l.onPostCommit;typeof s=="function"&&s(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){te(t,t.return,c)}}else vn(e,t,n,a);break;case 31:vn(e,t,n,a);break;case 13:vn(e,t,n,a);break;case 23:break;case 22:l=t.stateNode,r=t.alternate,t.memoizedState!==null?l._visibility&2?vn(e,t,n,a):is(e,t):l._visibility&2?vn(e,t,n,a):(l._visibility|=2,Bl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),i&2048&&f2(r,t);break;case 24:vn(e,t,n,a),i&2048&&d2(t.alternate,t);break;default:vn(e,t,n,a)}}function Bl(e,t,n,a,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var l=e,r=t,s=n,c=a,u=r.flags;switch(r.tag){case 0:case 11:case 15:Bl(l,r,s,c,i),ns(8,r);break;case 23:break;case 22:var f=r.stateNode;r.memoizedState!==null?f._visibility&2?Bl(l,r,s,c,i):is(l,r):(f._visibility|=2,Bl(l,r,s,c,i)),i&&u&2048&&f2(r.alternate,r);break;case 24:Bl(l,r,s,c,i),i&&u&2048&&d2(r.alternate,r);break;default:Bl(l,r,s,c,i)}t=t.sibling}}function is(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,i=a.flags;switch(a.tag){case 22:is(n,a),i&2048&&f2(a.alternate,a);break;case 24:is(n,a),i&2048&&d2(a.alternate,a);break;default:is(n,a)}t=t.sibling}}var ls=8192;function Gl(e,t,n){if(e.subtreeFlags&ls)for(e=e.child;e!==null;)vw(e,t,n),e=e.sibling}function vw(e,t,n){switch(e.tag){case 26:Gl(e,t,n),e.flags&ls&&e.memoizedState!==null&&s8(n,pn,e.memoizedState,e.memoizedProps);break;case 5:Gl(e,t,n);break;case 3:case 4:var a=pn;pn=vc(e.stateNode.containerInfo),Gl(e,t,n),pn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=ls,ls=16777216,Gl(e,t,n),ls=a):Gl(e,t,n));break;default:Gl(e,t,n)}}function bw(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function rs(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];We=a,Ew(a,e)}bw(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Sw(e),e=e.sibling}function Sw(e){switch(e.tag){case 0:case 11:case 15:rs(e),e.flags&2048&&ka(9,e,e.return);break;case 3:rs(e);break;case 12:rs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,rc(e)):rs(e);break;default:rs(e)}}function rc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];We=a,Ew(a,e)}bw(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ka(8,t,t.return),rc(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,rc(t));break;default:rc(t)}e=e.sibling}}function Ew(e,t){for(;We!==null;){var n=We;switch(n.tag){case 0:case 11:case 15:ka(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Yr(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,We=a;else e:for(n=e;We!==null;){a=We;var i=a.sibling,l=a.return;if(dw(a),a===n){We=null;break e}if(i!==null){i.return=l,We=i;break e}We=l}}}var Ev={getCacheForType:function(e){var t=tt(Le),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return tt(Le).controller.signal}},_v=typeof WeakMap=="function"?WeakMap:Map,P=0,le=null,F=null,X=0,ee=0,Ft=null,La=!1,Hl=!1,h2=!1,la=0,Ee=0,Ua=0,Ni=0,g2=0,Yt=0,jl=0,ss=null,vt=null,w2=!1,sc=0,_w=0,oc=1/0,cc=null,Ba=null,Ye=0,Ga=null,Vl=null,ra=0,m2=0,y2=null,xw=null,os=0,p2=null;function Xt(){return P&2&&X!==0?X&-X:G.T!==null?x2():V3()}function Aw(){if(Yt===0)if(!(X&536870912)||Q){var e=yo;yo<<=1,!(yo&3932160)&&(yo=262144),Yt=e}else Yt=536870912;return e=Vt.current,e!==null&&(e.flags|=32),Yt}function bt(e,t,n){(e===le&&(ee===2||ee===9)||e.cancelPendingCommit!==null)&&(ql(e,0),Ha(e,X,Yt,!1)),Cr(e,n),(!(P&2)||e!==le)&&(e===le&&(!(P&2)&&(Ni|=n),Ee===4&&Ha(e,X,Yt,!1)),Bn(e))}function Tw(e,t,n){if(P&6)throw Error(E(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Mr(e,t),i=a?Tv(e,t):b2(e,t,!0),l=a;do{if(i===0){Hl&&!a&&Ha(e,t,0,!1);break}else{if(n=e.current.alternate,l&&!xv(n)){i=b2(e,t,!1),l=!1;continue}if(i===2){if(l=t,e.errorRecoveryDisabledLanes&l)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var s=e;i=ss;var c=s.current.memoizedState.isDehydrated;if(c&&(ql(s,r).flags|=256),r=b2(s,r,!1),r!==2){if(h2&&!c){s.errorRecoveryDisabledLanes|=l,Ni|=l,i=4;break e}l=vt,vt=i,l!==null&&(vt===null?vt=l:vt.push.apply(vt,l))}i=r}if(l=!1,i!==2)continue}}if(i===1){ql(e,0),Ha(e,t,0,!0);break}e:{switch(a=e,l=i,l){case 0:case 1:throw Error(E(345));case 4:if((t&4194048)!==t)break;case 6:Ha(a,t,Yt,!La);break e;case 2:vt=null;break;case 3:case 5:break;default:throw Error(E(329))}if((t&62914560)===t&&(i=sc+300-Ut(),10<i)){if(Ha(a,t,Yt,!La),vo(a,0,!0)!==0)break e;ra=t,a.timeoutHandle=am(Nw.bind(null,a,n,vt,cc,w2,t,Yt,Ni,jl,La,l,"Throttled",-0,0),i);break e}Nw(a,n,vt,cc,w2,t,Yt,Ni,jl,La,l,null,-0,0)}}break}while(!0);Bn(e)}function Nw(e,t,n,a,i,l,r,s,c,u,f,h,d,g){if(e.timeoutHandle=-1,h=t.subtreeFlags,h&8192||(h&16785408)===16785408){h={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qn},vw(t,l,h);var v=(l&62914560)===l?sc-Ut():(l&4194048)===l?_w-Ut():0;if(v=o8(h,v),v!==null){ra=l,e.cancelPendingCommit=v(Uw.bind(null,e,t,l,n,a,i,r,s,c,f,h,null,d,g)),Ha(e,l,r,!u);return}}Uw(e,t,l,n,a,i,r,s,c)}function xv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var i=n[a],l=i.getSnapshot;i=i.value;try{if(!Ht(l(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ha(e,t,n,a){t&=~g2,t&=~Ni,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var l=31-Gt(i),r=1<<l;a[l]=-1,i&=~r}n!==0&&G3(e,n,t)}function uc(){return P&6?!0:(cs(0),!1)}function v2(){if(F!==null){if(ee===0)var e=F.return;else e=F,Jn=pi=null,Ud(e),Ol=null,Qr=0,e=F;for(;e!==null;)iw(e.alternate,e),e=e.return;F=null}}function ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xv(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ra=0,v2(),le=e,F=n=Zn(e.current,null),X=t,ee=0,Ft=null,La=!1,Hl=Mr(e,t),h2=!1,jl=Yt=g2=Ni=Ua=Ee=0,vt=ss=null,w2=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-Gt(a),l=1<<i;t|=e[i],a&=~l}return la=t,Oo(),n}function Mw(e,t){V=null,G.H=$r,t===Dl||t===jo?(t=X4(),ee=3):t===_d?(t=X4(),ee=4):ee=t===Rd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ft=t,F===null&&(Ee=1,$o(e,nn(t,e.current)))}function Cw(){var e=Vt.current;return e===null?!0:(X&4194048)===X?sn===null:(X&62914560)===X||X&536870912?e===sn:!1}function Dw(){var e=G.H;return G.H=$r,e===null?$r:e}function Ow(){var e=G.A;return G.A=Ev,e}function fc(){Ee=4,La||(X&4194048)!==X&&Vt.current!==null||(Hl=!0),!(Ua&134217727)&&!(Ni&134217727)||le===null||Ha(le,X,Yt,!1)}function b2(e,t,n){var a=P;P|=2;var i=Dw(),l=Ow();(le!==e||X!==t)&&(cc=null,ql(e,t)),t=!1;var r=Ee;e:do try{if(ee!==0&&F!==null){var s=F,c=Ft;switch(ee){case 8:v2(),r=6;break e;case 3:case 2:case 9:case 6:Vt.current===null&&(t=!0);var u=ee;if(ee=0,Ft=null,Fl(e,s,c,u),n&&Hl){r=0;break e}break;default:u=ee,ee=0,Ft=null,Fl(e,s,c,u)}}Av(),r=Ee;break}catch(f){Mw(e,f)}while(!0);return t&&e.shellSuspendCounter++,Jn=pi=null,P=a,G.H=i,G.A=l,F===null&&(le=null,X=0,Oo()),r}function Av(){for(;F!==null;)zw(F)}function Tv(e,t){var n=P;P|=2;var a=Dw(),i=Ow();le!==e||X!==t?(cc=null,oc=Ut()+500,ql(e,t)):Hl=Mr(e,t);e:do try{if(ee!==0&&F!==null){t=F;var l=Ft;t:switch(ee){case 1:ee=0,Ft=null,Fl(e,t,l,1);break;case 2:case 9:if(F4(l)){ee=0,Ft=null,kw(t);break}t=function(){ee!==2&&ee!==9||le!==e||(ee=7),Bn(e)},l.then(t,t);break e;case 3:ee=7;break e;case 4:ee=5;break e;case 7:F4(l)?(ee=0,Ft=null,kw(t)):(ee=0,Ft=null,Fl(e,t,l,7));break;case 5:var r=null;switch(F.tag){case 26:r=F.memoizedState;case 5:case 27:var s=F;if(r?pm(r):s.stateNode.complete){ee=0,Ft=null;var c=s.sibling;if(c!==null)F=c;else{var u=s.return;u!==null?(F=u,dc(u)):F=null}break t}}ee=0,Ft=null,Fl(e,t,l,5);break;case 6:ee=0,Ft=null,Fl(e,t,l,6);break;case 8:v2(),Ee=6;break e;default:throw Error(E(462))}}Nv();break}catch(f){Mw(e,f)}while(!0);return Jn=pi=null,G.H=a,G.A=i,P=n,F!==null?0:(le=null,X=0,Oo(),Ee)}function Nv(){for(;F!==null&&!Wy();)zw(F)}function zw(e){var t=nw(e.alternate,e,la);e.memoizedProps=e.pendingProps,t===null?dc(e):F=t}function kw(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wg(n,t,t.pendingProps,t.type,void 0,X);break;case 11:t=Wg(n,t,t.pendingProps,t.type.render,t.ref,X);break;case 5:Ud(t);default:iw(n,t),t=F=O4(t,la),t=nw(n,t,la)}e.memoizedProps=e.pendingProps,t===null?dc(e):F=t}function Fl(e,t,n,a){Jn=pi=null,Ud(t),Ol=null,Qr=0;var i=t.return;try{if(wv(e,i,t,n,X)){Ee=1,$o(e,nn(n,e.current)),F=null;return}}catch(l){if(i!==null)throw F=i,l;Ee=1,$o(e,nn(n,e.current)),F=null;return}t.flags&32768?(Q||a===1?e=!0:Hl||X&536870912?e=!1:(La=e=!0,(a===2||a===9||a===3||a===6)&&(a=Vt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Lw(t,e)):dc(t)}function dc(e){var t=e;do{if(t.flags&32768){Lw(t,La);return}e=t.return;var n=pv(t.alternate,t,la);if(n!==null){F=n;return}if(t=t.sibling,t!==null){F=t;return}F=t=e}while(t!==null);Ee===0&&(Ee=5)}function Lw(e,t){do{var n=vv(e.alternate,e);if(n!==null){n.flags&=32767,F=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){F=e;return}F=e=n}while(e!==null);Ee=6,F=null}function Uw(e,t,n,a,i,l,r,s,c){e.cancelPendingCommit=null;do hc();while(Ye!==0);if(P&6)throw Error(E(327));if(t!==null){if(t===e.current)throw Error(E(177));if(l=t.lanes|t.childLanes,l|=od,rp(e,n,l,r,s,c),e===le&&(F=le=null,X=0),Vl=t,Ga=e,ra=n,m2=l,y2=i,xw=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Ov(wo,function(){return Vw(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=G.T,G.T=null,i=R.p,R.p=2,r=P,P|=4;try{bv(e,t,n)}finally{P=r,R.p=i,G.T=a}}Ye=1,Bw(),Gw(),Hw()}}function Bw(){if(Ye===1){Ye=0;var e=Ga,t=Vl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=G.T,G.T=null;var a=R.p;R.p=2;var i=P;P|=4;try{mw(t,e);var l=z2,r=E4(e.containerInfo),s=l.focusedElem,c=l.selectionRange;if(r!==s&&s&&s.ownerDocument&&S4(s.ownerDocument.documentElement,s)){if(c!==null&&ad(s)){var u=c.start,f=c.end;if(f===void 0&&(f=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(f,s.value.length);else{var h=s.ownerDocument||document,d=h&&h.defaultView||window;if(d.getSelection){var g=d.getSelection(),v=s.textContent.length,S=Math.min(c.start,v),_=c.end===void 0?S:Math.min(c.end,v);!g.extend&&S>_&&(r=_,_=S,S=r);var w=b4(s,S),m=b4(s,_);if(w&&m&&(g.rangeCount!==1||g.anchorNode!==w.node||g.anchorOffset!==w.offset||g.focusNode!==m.node||g.focusOffset!==m.offset)){var p=h.createRange();p.setStart(w.node,w.offset),g.removeAllRanges(),S>_?(g.addRange(p),g.extend(m.node,m.offset)):(p.setEnd(m.node,m.offset),g.addRange(p))}}}}for(h=[],g=s;g=g.parentNode;)g.nodeType===1&&h.push({element:g,left:g.scrollLeft,top:g.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<h.length;s++){var b=h[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Ac=!!O2,z2=O2=null}finally{P=i,R.p=a,G.T=n}}e.current=t,Ye=2}}function Gw(){if(Ye===2){Ye=0;var e=Ga,t=Vl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=G.T,G.T=null;var a=R.p;R.p=2;var i=P;P|=4;try{fw(e,t.alternate,t)}finally{P=i,R.p=a,G.T=n}}Ye=3}}function Hw(){if(Ye===4||Ye===3){Ye=0,Ry();var e=Ga,t=Vl,n=ra,a=xw;t.subtreeFlags&10256||t.flags&10256?Ye=5:(Ye=0,Vl=Ga=null,jw(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ba=null),Hf(n),t=t.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(Nr,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=G.T,i=R.p,R.p=2,G.T=null;try{for(var l=e.onRecoverableError,r=0;r<a.length;r++){var s=a[r];l(s.value,{componentStack:s.stack})}}finally{G.T=t,R.p=i}}ra&3&&hc(),Bn(e),i=e.pendingLanes,n&261930&&i&42?e===p2?os++:(os=0,p2=e):os=0,cs(0)}}function jw(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Yr(t)))}function hc(){return Bw(),Gw(),Hw(),Vw()}function Vw(){if(Ye!==5)return!1;var e=Ga,t=m2;m2=0;var n=Hf(ra),a=G.T,i=R.p;try{R.p=32>n?32:n,G.T=null,n=y2,y2=null;var l=Ga,r=ra;if(Ye=0,Vl=Ga=null,ra=0,P&6)throw Error(E(331));var s=P;if(P|=4,Sw(l.current),pw(l,l.current,r,n),P=s,cs(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(Nr,l)}catch{}return!0}finally{R.p=i,G.T=a,jw(e,t)}}function qw(e,t,n){t=nn(n,t),t=Wd(e.stateNode,t,2),e=Da(e,t,2),e!==null&&(Cr(e,2),Bn(e))}function te(e,t,n){if(e.tag===3)qw(e,e,n);else for(;t!==null;){if(t.tag===3){qw(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ba===null||!Ba.has(a))){e=nn(n,e),n=Fg(2),a=Da(t,n,2),a!==null&&(Yg(n,a,t,e),Cr(a,2),Bn(a));break}}t=t.return}}function S2(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new _v;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(h2=!0,i.add(n),e=Mv.bind(null,e,t,n),t.then(e,e))}function Mv(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,le===e&&(X&n)===n&&(Ee===4||Ee===3&&(X&62914560)===X&&300>Ut()-sc?!(P&2)&&ql(e,0):g2|=n,jl===X&&(jl=0)),Bn(e)}function Fw(e,t){t===0&&(t=B3()),e=wi(e,t),e!==null&&(Cr(e,t),Bn(e))}function Cv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fw(e,n)}function Dv(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(E(314))}a!==null&&a.delete(t),Fw(e,n)}function Ov(e,t){return Lf(e,t)}var gc=null,Yl=null,E2=!1,wc=!1,_2=!1,ja=0;function Bn(e){e!==Yl&&e.next===null&&(Yl===null?gc=Yl=e:Yl=Yl.next=e),wc=!0,E2||(E2=!0,kv())}function cs(e,t){if(!_2&&wc){_2=!0;do for(var n=!1,a=gc;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var l=0;else{var r=a.suspendedLanes,s=a.pingedLanes;l=(1<<31-Gt(42|e)+1)-1,l&=i&~(r&~s),l=l&201326741?l&201326741|1:l?l|2:0}l!==0&&(n=!0,Kw(a,l))}else l=X,l=vo(a,a===le?l:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(l&3)||Mr(a,l)||(n=!0,Kw(a,l));a=a.next}while(n);_2=!1}}function zv(){Yw()}function Yw(){wc=E2=!1;var e=0;ja!==0&&Yv()&&(e=ja);for(var t=Ut(),n=null,a=gc;a!==null;){var i=a.next,l=Xw(a,t);l===0?(a.next=null,n===null?gc=i:n.next=i,i===null&&(Yl=n)):(n=a,(e!==0||l&3)&&(wc=!0)),a=i}Ye!==0&&Ye!==5||cs(e),ja!==0&&(ja=0)}function Xw(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes&-62914561;0<l;){var r=31-Gt(l),s=1<<r,c=i[r];c===-1?(!(s&n)||s&a)&&(i[r]=lp(s,t)):c<=t&&(e.expiredLanes|=s),l&=~s}if(t=le,n=X,n=vo(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(ee===2||ee===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Uf(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Mr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Uf(a),Hf(n)){case 2:case 8:n=L3;break;case 32:n=wo;break;case 268435456:n=U3;break;default:n=wo}return a=Qw.bind(null,e),n=Lf(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Uf(a),e.callbackPriority=2,e.callbackNode=null,2}function Qw(e,t){if(Ye!==0&&Ye!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(hc()&&e.callbackNode!==n)return null;var a=X;return a=vo(e,e===le?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Tw(e,a,t),Xw(e,Ut()),e.callbackNode!=null&&e.callbackNode===n?Qw.bind(null,e):null)}function Kw(e,t){if(hc())return null;Tw(e,t,!0)}function kv(){Qv(function(){P&6?Lf(k3,zv):Yw()})}function x2(){if(ja===0){var e=Ml;e===0&&(e=mo,mo<<=1,!(mo&261888)&&(mo=256)),ja=e}return ja}function Zw(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_o(""+e)}function Iw(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Lv(e,t,n,a,i){if(t==="submit"&&n&&n.stateNode===i){var l=Zw((i[gt]||null).action),r=a.submitter;r&&(t=(t=r[gt]||null)?Zw(t.formAction):r.getAttribute("formAction"),t!==null&&(l=t,r=null));var s=new No("action","action",null,a,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ja!==0){var c=r?Iw(i,r):new FormData(i);Xd(n,{pending:!0,data:c,method:i.method,action:l},null,c)}}else typeof l=="function"&&(s.preventDefault(),c=r?Iw(i,r):new FormData(i),Xd(n,{pending:!0,data:c,method:i.method,action:l},l,c))},currentTarget:i}]})}}for(var A2=0;A2<sd.length;A2++){var T2=sd[A2],Uv=T2.toLowerCase(),Bv=T2[0].toUpperCase()+T2.slice(1);yn(Uv,"on"+Bv)}yn(A4,"onAnimationEnd"),yn(T4,"onAnimationIteration"),yn(N4,"onAnimationStart"),yn("dblclick","onDoubleClick"),yn("focusin","onFocus"),yn("focusout","onBlur"),yn(Pp,"onTransitionRun"),yn($p,"onTransitionStart"),yn(ev,"onTransitionCancel"),yn(M4,"onTransitionEnd"),gl("onMouseEnter",["mouseout","mouseover"]),gl("onMouseLeave",["mouseout","mouseover"]),gl("onPointerEnter",["pointerout","pointerover"]),gl("onPointerLeave",["pointerout","pointerover"]),fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fi("onBeforeInput",["compositionend","keypress","textInput","paste"]),fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="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(" "),Gv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(us));function Jw(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],i=a.event;a=a.listeners;e:{var l=void 0;if(t)for(var r=a.length-1;0<=r;r--){var s=a[r],c=s.instance,u=s.currentTarget;if(s=s.listener,c!==l&&i.isPropagationStopped())break e;l=s,i.currentTarget=u;try{l(i)}catch(f){Do(f)}i.currentTarget=null,l=c}else for(r=0;r<a.length;r++){if(s=a[r],c=s.instance,u=s.currentTarget,s=s.listener,c!==l&&i.isPropagationStopped())break e;l=s,i.currentTarget=u;try{l(i)}catch(f){Do(f)}i.currentTarget=null,l=c}}}}function Y(e,t){var n=t[jf];n===void 0&&(n=t[jf]=new Set);var a=e+"__bubble";n.has(a)||(Ww(t,e,2,!1),n.add(a))}function N2(e,t,n){var a=0;t&&(a|=4),Ww(n,e,a,t)}var mc="_reactListening"+Math.random().toString(36).slice(2);function M2(e){if(!e[mc]){e[mc]=!0,Y3.forEach(function(n){n!=="selectionchange"&&(Gv.has(n)||N2(n,!1,e),N2(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mc]||(t[mc]=!0,N2("selectionchange",!1,t))}}function Ww(e,t,n,a){switch(Am(t)){case 2:var i=f8;break;case 8:i=d8;break;default:i=Y2}n=i.bind(null,t,n,e),i=void 0,!If||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function C2(e,t,n,a,i){var l=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var r=a.tag;if(r===3||r===4){var s=a.stateNode.containerInfo;if(s===i)break;if(r===4)for(r=a.return;r!==null;){var c=r.tag;if((c===3||c===4)&&r.stateNode.containerInfo===i)return;r=r.return}for(;s!==null;){if(r=fl(s),r===null)return;if(c=r.tag,c===5||c===6||c===26||c===27){a=l=r;continue e}s=s.parentNode}}a=a.return}t4(function(){var u=l,f=Kf(n),h=[];e:{var d=C4.get(e);if(d!==void 0){var g=No,v=e;switch(e){case"keypress":if(Ao(n)===0)break e;case"keydown":case"keyup":g=Dp;break;case"focusin":v="focus",g=Pf;break;case"focusout":v="blur",g=Pf;break;case"beforeblur":case"afterblur":g=Pf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=i4;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=pp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=kp;break;case A4:case T4:case N4:g=Sp;break;case M4:g=Up;break;case"scroll":case"scrollend":g=mp;break;case"wheel":g=Gp;break;case"copy":case"cut":case"paste":g=_p;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=r4;break;case"toggle":case"beforetoggle":g=jp}var S=(t&4)!==0,_=!S&&(e==="scroll"||e==="scrollend"),w=S?d!==null?d+"Capture":null:d;S=[];for(var m=u,p;m!==null;){var b=m;if(p=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||p===null||w===null||(b=zr(m,w),b!=null&&S.push(fs(m,b,p))),_)break;m=m.return}0<S.length&&(d=new g(d,v,null,n,f),h.push({event:d,listeners:S}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",d&&n!==Qf&&(v=n.relatedTarget||n.fromElement)&&(fl(v)||v[ul]))break e;if((g||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,g?(v=n.relatedTarget||n.toElement,g=u,v=v?fl(v):null,v!==null&&(_=Er(v),S=v.tag,v!==_||S!==5&&S!==27&&S!==6)&&(v=null)):(g=null,v=u),g!==v)){if(S=i4,b="onMouseLeave",w="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(S=r4,b="onPointerLeave",w="onPointerEnter",m="pointer"),_=g==null?d:Or(g),p=v==null?d:Or(v),d=new S(b,m+"leave",g,n,f),d.target=_,d.relatedTarget=p,b=null,fl(f)===u&&(S=new S(w,m+"enter",v,n,f),S.target=p,S.relatedTarget=_,b=S),_=b,g&&v)t:{for(S=Hv,w=g,m=v,p=0,b=w;b;b=S(b))p++;b=0;for(var T=m;T;T=S(T))b++;for(;0<p-b;)w=S(w),p--;for(;0<b-p;)m=S(m),b--;for(;p--;){if(w===m||m!==null&&w===m.alternate){S=w;break t}w=S(w),m=S(m)}S=null}else S=null;g!==null&&Rw(h,d,g,S,!1),v!==null&&_!==null&&Rw(h,_,v,S,!0)}}e:{if(d=u?Or(u):window,g=d.nodeName&&d.nodeName.toLowerCase(),g==="select"||g==="input"&&d.type==="file")var N=g4;else if(d4(d))if(w4)N=Jp;else{N=Zp;var x=Kp}else g=d.nodeName,!g||g.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&Xf(u.elementType)&&(N=g4):N=Ip;if(N&&(N=N(e,u))){h4(h,N,n,f);break e}x&&x(e,d,u),e==="focusout"&&u&&d.type==="number"&&u.memoizedProps.value!=null&&Yf(d,"number",d.value)}switch(x=u?Or(u):window,e){case"focusin":(d4(x)||x.contentEditable==="true")&&(bl=x,id=u,Vr=null);break;case"focusout":Vr=id=bl=null;break;case"mousedown":ld=!0;break;case"contextmenu":case"mouseup":case"dragend":ld=!1,_4(h,n,f);break;case"selectionchange":if(Rp)break;case"keydown":case"keyup":_4(h,n,f)}var C;if(ed)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else vl?u4(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(s4&&n.locale!=="ko"&&(vl||A!=="onCompositionStart"?A==="onCompositionEnd"&&vl&&(C=n4()):(_a=f,Jf="value"in _a?_a.value:_a.textContent,vl=!0)),x=yc(u,A),0<x.length&&(A=new l4(A,e,null,n,f),h.push({event:A,listeners:x}),C?A.data=C:(C=f4(n),C!==null&&(A.data=C)))),(C=qp?Fp(e,n):Yp(e,n))&&(A=yc(u,"onBeforeInput"),0<A.length&&(x=new l4("onBeforeInput","beforeinput",null,n,f),h.push({event:x,listeners:A}),x.data=C)),Lv(h,e,u,n,f)}Jw(h,t)})}function fs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function yc(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,l=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||l===null||(i=zr(e,n),i!=null&&a.unshift(fs(e,i,l)),i=zr(e,t),i!=null&&a.push(fs(e,i,l))),e.tag===3)return a;e=e.return}return[]}function Hv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rw(e,t,n,a,i){for(var l=t._reactName,r=[];n!==null&&n!==a;){var s=n,c=s.alternate,u=s.stateNode;if(s=s.tag,c!==null&&c===a)break;s!==5&&s!==26&&s!==27||u===null||(c=u,i?(u=zr(n,l),u!=null&&r.unshift(fs(n,u,c))):i||(u=zr(n,l),u!=null&&r.push(fs(n,u,c)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var jv=/\r\n?/g,Vv=/\u0000|\uFFFD/g;function Pw(e){return(typeof e=="string"?e:""+e).replace(jv,`
98
+ `).replace(Vv,"")}function $w(e,t){return t=Pw(t),Pw(e)===t}function ie(e,t,n,a,i,l){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ml(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ml(e,""+a);break;case"className":So(e,"class",a);break;case"tabIndex":So(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":So(e,n,a);break;case"style":$3(e,a,l);break;case"data":if(t!=="object"){So(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=_o(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof l=="function"&&(n==="formAction"?(t!=="input"&&ie(e,t,"name",i.name,i,null),ie(e,t,"formEncType",i.formEncType,i,null),ie(e,t,"formMethod",i.formMethod,i,null),ie(e,t,"formTarget",i.formTarget,i,null)):(ie(e,t,"encType",i.encType,i,null),ie(e,t,"method",i.method,i,null),ie(e,t,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=_o(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Qn);break;case"onScroll":a!=null&&Y("scroll",e);break;case"onScrollEnd":a!=null&&Y("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(E(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(E(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=_o(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Y("beforetoggle",e),Y("toggle",e),bo(e,"popover",a);break;case"xlinkActuate":Xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Xn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Xn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Xn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Xn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":bo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=gp.get(n)||n,bo(e,n,a))}}function D2(e,t,n,a,i,l){switch(n){case"style":$3(e,a,l);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(E(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(E(60));e.innerHTML=n}}break;case"children":typeof a=="string"?ml(e,a):(typeof a=="number"||typeof a=="bigint")&&ml(e,""+a);break;case"onScroll":a!=null&&Y("scroll",e);break;case"onScrollEnd":a!=null&&Y("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Qn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!X3.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),l=e[gt]||null,l=l!=null?l[n]:null,typeof l=="function"&&e.removeEventListener(t,l,i),typeof a=="function")){typeof l!="function"&&l!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,i);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):bo(e,n,a)}}}function at(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Y("error",e),Y("load",e);var a=!1,i=!1,l;for(l in n)if(n.hasOwnProperty(l)){var r=n[l];if(r!=null)switch(l){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(E(137,t));default:ie(e,t,l,r,n,null)}}i&&ie(e,t,"srcSet",n.srcSet,n,null),a&&ie(e,t,"src",n.src,n,null);return;case"input":Y("invalid",e);var s=l=r=i=null,c=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var f=n[a];if(f!=null)switch(a){case"name":i=f;break;case"type":r=f;break;case"checked":c=f;break;case"defaultChecked":u=f;break;case"value":l=f;break;case"defaultValue":s=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(E(137,t));break;default:ie(e,t,a,f,n,null)}}J3(e,l,s,c,u,r,i,!1);return;case"select":Y("invalid",e),a=r=l=null;for(i in n)if(n.hasOwnProperty(i)&&(s=n[i],s!=null))switch(i){case"value":l=s;break;case"defaultValue":r=s;break;case"multiple":a=s;default:ie(e,t,i,s,n,null)}t=l,n=r,e.multiple=!!a,t!=null?wl(e,!!a,t,!1):n!=null&&wl(e,!!a,n,!0);return;case"textarea":Y("invalid",e),l=i=a=null;for(r in n)if(n.hasOwnProperty(r)&&(s=n[r],s!=null))switch(r){case"value":a=s;break;case"defaultValue":i=s;break;case"children":l=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(E(91));break;default:ie(e,t,r,s,n,null)}R3(e,a,i,l);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ie(e,t,c,a,n,null)}return;case"dialog":Y("beforetoggle",e),Y("toggle",e),Y("cancel",e),Y("close",e);break;case"iframe":case"object":Y("load",e);break;case"video":case"audio":for(a=0;a<us.length;a++)Y(us[a],e);break;case"image":Y("error",e),Y("load",e);break;case"details":Y("toggle",e);break;case"embed":case"source":case"link":Y("error",e),Y("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(a=n[u],a!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(E(137,t));default:ie(e,t,u,a,n,null)}return;default:if(Xf(t)){for(f in n)n.hasOwnProperty(f)&&(a=n[f],a!==void 0&&D2(e,t,f,a,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(a=n[s],a!=null&&ie(e,t,s,a,n,null))}function qv(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,l=null,r=null,s=null,c=null,u=null,f=null;for(g in n){var h=n[g];if(n.hasOwnProperty(g)&&h!=null)switch(g){case"checked":break;case"value":break;case"defaultValue":c=h;default:a.hasOwnProperty(g)||ie(e,t,g,null,a,h)}}for(var d in a){var g=a[d];if(h=n[d],a.hasOwnProperty(d)&&(g!=null||h!=null))switch(d){case"type":l=g;break;case"name":i=g;break;case"checked":u=g;break;case"defaultChecked":f=g;break;case"value":r=g;break;case"defaultValue":s=g;break;case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(E(137,t));break;default:g!==h&&ie(e,t,d,g,a,h)}}Ff(e,r,s,c,u,f,l,i);return;case"select":g=r=s=d=null;for(l in n)if(c=n[l],n.hasOwnProperty(l)&&c!=null)switch(l){case"value":break;case"multiple":g=c;default:a.hasOwnProperty(l)||ie(e,t,l,null,a,c)}for(i in a)if(l=a[i],c=n[i],a.hasOwnProperty(i)&&(l!=null||c!=null))switch(i){case"value":d=l;break;case"defaultValue":s=l;break;case"multiple":r=l;default:l!==c&&ie(e,t,i,l,a,c)}t=s,n=r,a=g,d!=null?wl(e,!!n,d,!1):!!a!=!!n&&(t!=null?wl(e,!!n,t,!0):wl(e,!!n,n?[]:"",!1));return;case"textarea":g=d=null;for(s in n)if(i=n[s],n.hasOwnProperty(s)&&i!=null&&!a.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:ie(e,t,s,null,a,i)}for(r in a)if(i=a[r],l=n[r],a.hasOwnProperty(r)&&(i!=null||l!=null))switch(r){case"value":d=i;break;case"defaultValue":g=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(E(91));break;default:i!==l&&ie(e,t,r,i,a,l)}W3(e,d,g);return;case"option":for(var v in n)if(d=n[v],n.hasOwnProperty(v)&&d!=null&&!a.hasOwnProperty(v))switch(v){case"selected":e.selected=!1;break;default:ie(e,t,v,null,a,d)}for(c in a)if(d=a[c],g=n[c],a.hasOwnProperty(c)&&d!==g&&(d!=null||g!=null))switch(c){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:ie(e,t,c,d,a,g)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var S in n)d=n[S],n.hasOwnProperty(S)&&d!=null&&!a.hasOwnProperty(S)&&ie(e,t,S,null,a,d);for(u in a)if(d=a[u],g=n[u],a.hasOwnProperty(u)&&d!==g&&(d!=null||g!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(E(137,t));break;default:ie(e,t,u,d,a,g)}return;default:if(Xf(t)){for(var _ in n)d=n[_],n.hasOwnProperty(_)&&d!==void 0&&!a.hasOwnProperty(_)&&D2(e,t,_,void 0,a,d);for(f in a)d=a[f],g=n[f],!a.hasOwnProperty(f)||d===g||d===void 0&&g===void 0||D2(e,t,f,d,a,g);return}}for(var w in n)d=n[w],n.hasOwnProperty(w)&&d!=null&&!a.hasOwnProperty(w)&&ie(e,t,w,null,a,d);for(h in a)d=a[h],g=n[h],!a.hasOwnProperty(h)||d===g||d==null&&g==null||ie(e,t,h,d,a,g)}function em(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Fv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var i=n[a],l=i.transferSize,r=i.initiatorType,s=i.duration;if(l&&s&&em(r)){for(r=0,s=i.responseEnd,a+=1;a<n.length;a++){var c=n[a],u=c.startTime;if(u>s)break;var f=c.transferSize,h=c.initiatorType;f&&em(h)&&(c=c.responseEnd,r+=f*(c<s?1:(s-u)/(c-u)))}if(--a,t+=8*(l+r)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var O2=null,z2=null;function pc(e){return e.nodeType===9?e:e.ownerDocument}function tm(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function nm(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function k2(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var L2=null;function Yv(){var e=window.event;return e&&e.type==="popstate"?e===L2?!1:(L2=e,!0):(L2=null,!1)}var am=typeof setTimeout=="function"?setTimeout:void 0,Xv=typeof clearTimeout=="function"?clearTimeout:void 0,im=typeof Promise=="function"?Promise:void 0,Qv=typeof queueMicrotask=="function"?queueMicrotask:typeof im<"u"?function(e){return im.resolve(null).then(e).catch(Kv)}:am;function Kv(e){setTimeout(function(){throw e})}function Va(e){return e==="head"}function lm(e,t){var n=t,a=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(i),Zl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")ds(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ds(n);for(var l=n.firstChild;l;){var r=l.nextSibling,s=l.nodeName;l[Dr]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&l.rel.toLowerCase()==="stylesheet"||n.removeChild(l),l=r}}else n==="body"&&ds(e.ownerDocument.body);n=i}while(n);Zl(t)}function rm(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function U2(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":U2(n),Vf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Zv(e,t,n,a){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Dr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(l=e.getAttribute("rel"),l==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(l!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(l=e.getAttribute("src"),(l!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&l&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var l=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===l)return e}else return e;if(e=on(e.nextSibling),e===null)break}return null}function Iv(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=on(e.nextSibling),e===null))return null;return e}function sm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=on(e.nextSibling),e===null))return null;return e}function B2(e){return e.data==="$?"||e.data==="$~"}function G2(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Jv(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function on(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var H2=null;function om(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return on(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function cm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function um(e,t,n){switch(t=pc(n),e){case"html":if(e=t.documentElement,!e)throw Error(E(452));return e;case"head":if(e=t.head,!e)throw Error(E(453));return e;case"body":if(e=t.body,!e)throw Error(E(454));return e;default:throw Error(E(451))}}function ds(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Vf(e)}var cn=new Map,fm=new Set;function vc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var sa=R.d;R.d={f:Wv,r:Rv,D:Pv,C:$v,L:e8,m:t8,X:a8,S:n8,M:i8};function Wv(){var e=sa.f(),t=uc();return e||t}function Rv(e){var t=dl(e);t!==null&&t.tag===5&&t.type==="form"?Mg(t):sa.r(e)}var Xl=typeof document>"u"?null:document;function dm(e,t,n){var a=Xl;if(a&&typeof t=="string"&&t){var i=en(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),fm.has(i)||(fm.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),at(t,"link",e),Je(t),a.head.appendChild(t)))}}function Pv(e){sa.D(e),dm("dns-prefetch",e,null)}function $v(e,t){sa.C(e,t),dm("preconnect",e,t)}function e8(e,t,n){sa.L(e,t,n);var a=Xl;if(a&&e&&t){var i='link[rel="preload"][as="'+en(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+en(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+en(n.imageSizes)+'"]')):i+='[href="'+en(e)+'"]';var l=i;switch(t){case"style":l=Ql(e);break;case"script":l=Kl(e)}cn.has(l)||(e=ce({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),cn.set(l,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(hs(l))||t==="script"&&a.querySelector(gs(l))||(t=a.createElement("link"),at(t,"link",e),Je(t),a.head.appendChild(t)))}}function t8(e,t){sa.m(e,t);var n=Xl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+en(a)+'"][href="'+en(e)+'"]',l=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":l=Kl(e)}if(!cn.has(l)&&(e=ce({rel:"modulepreload",href:e},t),cn.set(l,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gs(l)))return}a=n.createElement("link"),at(a,"link",e),Je(a),n.head.appendChild(a)}}}function n8(e,t,n){sa.S(e,t,n);var a=Xl;if(a&&e){var i=hl(a).hoistableStyles,l=Ql(e);t=t||"default";var r=i.get(l);if(!r){var s={loading:0,preload:null};if(r=a.querySelector(hs(l)))s.loading=5;else{e=ce({rel:"stylesheet",href:e,"data-precedence":t},n),(n=cn.get(l))&&j2(e,n);var c=r=a.createElement("link");Je(c),at(c,"link",e),c._p=new Promise(function(u,f){c.onload=u,c.onerror=f}),c.addEventListener("load",function(){s.loading|=1}),c.addEventListener("error",function(){s.loading|=2}),s.loading|=4,bc(r,t,a)}r={type:"stylesheet",instance:r,count:1,state:s},i.set(l,r)}}}function a8(e,t){sa.X(e,t);var n=Xl;if(n&&e){var a=hl(n).hoistableScripts,i=Kl(e),l=a.get(i);l||(l=n.querySelector(gs(i)),l||(e=ce({src:e,async:!0},t),(t=cn.get(i))&&V2(e,t),l=n.createElement("script"),Je(l),at(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},a.set(i,l))}}function i8(e,t){sa.M(e,t);var n=Xl;if(n&&e){var a=hl(n).hoistableScripts,i=Kl(e),l=a.get(i);l||(l=n.querySelector(gs(i)),l||(e=ce({src:e,async:!0,type:"module"},t),(t=cn.get(i))&&V2(e,t),l=n.createElement("script"),Je(l),at(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},a.set(i,l))}}function hm(e,t,n,a){var i=(i=ba.current)?vc(i):null;if(!i)throw Error(E(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ql(n.href),n=hl(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ql(n.href);var l=hl(i).hoistableStyles,r=l.get(e);if(r||(i=i.ownerDocument||i,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},l.set(e,r),(l=i.querySelector(hs(e)))&&!l._p&&(r.instance=l,r.state.loading=5),cn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},cn.set(e,n),l||l8(i,e,n,r.state))),t&&a===null)throw Error(E(528,""));return r}if(t&&a!==null)throw Error(E(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Kl(n),n=hl(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(E(444,e))}}function Ql(e){return'href="'+en(e)+'"'}function hs(e){return'link[rel="stylesheet"]['+e+"]"}function gm(e){return ce({},e,{"data-precedence":e.precedence,precedence:null})}function l8(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),at(t,"link",n),Je(t),e.head.appendChild(t))}function Kl(e){return'[src="'+en(e)+'"]'}function gs(e){return"script[async]"+e}function wm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+en(n.href)+'"]');if(a)return t.instance=a,Je(a),a;var i=ce({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Je(a),at(a,"style",i),bc(a,n.precedence,e),t.instance=a;case"stylesheet":i=Ql(n.href);var l=e.querySelector(hs(i));if(l)return t.state.loading|=4,t.instance=l,Je(l),l;a=gm(n),(i=cn.get(i))&&j2(a,i),l=(e.ownerDocument||e).createElement("link"),Je(l);var r=l;return r._p=new Promise(function(s,c){r.onload=s,r.onerror=c}),at(l,"link",a),t.state.loading|=4,bc(l,n.precedence,e),t.instance=l;case"script":return l=Kl(n.src),(i=e.querySelector(gs(l)))?(t.instance=i,Je(i),i):(a=n,(i=cn.get(l))&&(a=ce({},n),V2(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),Je(i),at(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(E(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,bc(a,n.precedence,e));return t.instance}function bc(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,l=i,r=0;r<a.length;r++){var s=a[r];if(s.dataset.precedence===t)l=s;else if(l!==i)break}l?l.parentNode.insertBefore(e,l.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function j2(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function V2(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Sc=null;function mm(e,t,n){if(Sc===null){var a=new Map,i=Sc=new Map;i.set(n,a)}else i=Sc,a=i.get(n),a||(a=new Map,i.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var l=n[i];if(!(l[Dr]||l[$e]||e==="link"&&l.getAttribute("rel")==="stylesheet")&&l.namespaceURI!=="http://www.w3.org/2000/svg"){var r=l.getAttribute(t)||"";r=e+r;var s=a.get(r);s?s.push(l):a.set(r,[l])}}return a}function ym(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function r8(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function pm(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function s8(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var i=Ql(a.href),l=t.querySelector(hs(i));if(l){t=l._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ec.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=l,Je(l);return}l=t.ownerDocument||t,a=gm(a),(i=cn.get(i))&&j2(a,i),l=l.createElement("link"),Je(l);var r=l;r._p=new Promise(function(s,c){r.onload=s,r.onerror=c}),at(l,"link",a),n.instance=l}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Ec.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var q2=0;function o8(e,t){return e.stylesheets&&e.count===0&&xc(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&xc(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},6e4+t);0<e.imgBytes&&q2===0&&(q2=62500*Fv());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xc(e,e.stylesheets),e.unsuspend)){var l=e.unsuspend;e.unsuspend=null,l()}},(e.imgBytes>q2?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function Ec(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var _c=null;function xc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,_c=new Map,t.forEach(c8,e),_c=null,Ec.call(e))}function c8(e,t){if(!(t.state.loading&4)){var n=_c.get(e);if(n)var a=n.get(null);else{n=new Map,_c.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),l=0;l<i.length;l++){var r=i[l];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(n.set(r.dataset.precedence,r),a=r)}a&&n.set(null,a)}i=t.instance,r=i.getAttribute("data-precedence"),l=n.get(r)||a,l===a&&n.set(null,i),n.set(r,i),this.count++,a=Ec.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),l?l.parentNode.insertBefore(i,l.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ws={$$typeof:Yn,Provider:null,Consumer:null,_currentValue:oi,_currentValue2:oi,_threadCount:0};function u8(e,t,n,a,i,l,r,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Bf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bf(0),this.hiddenUpdates=Bf(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=l,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function vm(e,t,n,a,i,l,r,s,c,u,f,h){return e=new u8(e,t,n,r,c,u,f,h,s),t=1,l===!0&&(t|=24),l=jt(3,null,null,t),e.current=l,l.stateNode=e,t=bd(),t.refCount++,e.pooledCache=t,t.refCount++,l.memoizedState={element:a,isDehydrated:n,cache:t},xd(l),e}function bm(e){return e?(e=_l,e):_l}function Sm(e,t,n,a,i,l){i=bm(i),a.context===null?a.context=i:a.pendingContext=i,a=Ca(t),a.payload={element:n},l=l===void 0?null:l,l!==null&&(a.callback=l),n=Da(e,a,t),n!==null&&(bt(n,e,t),Zr(n,e,t))}function Em(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function F2(e,t){Em(e,t),(e=e.alternate)&&Em(e,t)}function _m(e){if(e.tag===13||e.tag===31){var t=wi(e,67108864);t!==null&&bt(t,e,67108864),F2(e,67108864)}}function xm(e){if(e.tag===13||e.tag===31){var t=Xt();t=Gf(t);var n=wi(e,t);n!==null&&bt(n,e,t),F2(e,t)}}var Ac=!0;function f8(e,t,n,a){var i=G.T;G.T=null;var l=R.p;try{R.p=2,Y2(e,t,n,a)}finally{R.p=l,G.T=i}}function d8(e,t,n,a){var i=G.T;G.T=null;var l=R.p;try{R.p=8,Y2(e,t,n,a)}finally{R.p=l,G.T=i}}function Y2(e,t,n,a){if(Ac){var i=X2(a);if(i===null)C2(e,t,a,Tc,n),Tm(e,a);else if(g8(i,e,t,n,a))a.stopPropagation();else if(Tm(e,a),t&4&&-1<h8.indexOf(e)){for(;i!==null;){var l=dl(i);if(l!==null)switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var r=ui(l.pendingLanes);if(r!==0){var s=l;for(s.pendingLanes|=2,s.entangledLanes|=2;r;){var c=1<<31-Gt(r);s.entanglements[1]|=c,r&=~c}Bn(l),!(P&6)&&(oc=Ut()+500,cs(0))}}break;case 31:case 13:s=wi(l,2),s!==null&&bt(s,l,2),uc(),F2(l,2)}if(l=X2(a),l===null&&C2(e,t,a,Tc,n),l===i)break;i=l}i!==null&&a.stopPropagation()}else C2(e,t,a,null,n)}}function X2(e){return e=Kf(e),Q2(e)}var Tc=null;function Q2(e){if(Tc=null,e=fl(e),e!==null){var t=Er(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=x3(t),e!==null)return e;e=null}else if(n===31){if(e=A3(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Tc=e,null}function Am(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Py()){case k3:return 2;case L3:return 8;case wo:case $y:return 32;case U3:return 268435456;default:return 32}default:return 32}}var K2=!1,qa=null,Fa=null,Ya=null,ms=new Map,ys=new Map,Xa=[],h8="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".split(" ");function Tm(e,t){switch(e){case"focusin":case"focusout":qa=null;break;case"dragenter":case"dragleave":Fa=null;break;case"mouseover":case"mouseout":Ya=null;break;case"pointerover":case"pointerout":ms.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ys.delete(t.pointerId)}}function ps(e,t,n,a,i,l){return e===null||e.nativeEvent!==l?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:l,targetContainers:[i]},t!==null&&(t=dl(t),t!==null&&_m(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function g8(e,t,n,a,i){switch(t){case"focusin":return qa=ps(qa,e,t,n,a,i),!0;case"dragenter":return Fa=ps(Fa,e,t,n,a,i),!0;case"mouseover":return Ya=ps(Ya,e,t,n,a,i),!0;case"pointerover":var l=i.pointerId;return ms.set(l,ps(ms.get(l)||null,e,t,n,a,i)),!0;case"gotpointercapture":return l=i.pointerId,ys.set(l,ps(ys.get(l)||null,e,t,n,a,i)),!0}return!1}function Nm(e){var t=fl(e.target);if(t!==null){var n=Er(t);if(n!==null){if(t=n.tag,t===13){if(t=x3(n),t!==null){e.blockedOn=t,q3(e.priority,function(){xm(n)});return}}else if(t===31){if(t=A3(n),t!==null){e.blockedOn=t,q3(e.priority,function(){xm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Nc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=X2(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Qf=a,n.target.dispatchEvent(a),Qf=null}else return t=dl(n),t!==null&&_m(t),e.blockedOn=n,!1;t.shift()}return!0}function Mm(e,t,n){Nc(e)&&n.delete(t)}function w8(){K2=!1,qa!==null&&Nc(qa)&&(qa=null),Fa!==null&&Nc(Fa)&&(Fa=null),Ya!==null&&Nc(Ya)&&(Ya=null),ms.forEach(Mm),ys.forEach(Mm)}function Mc(e,t){e.blockedOn===t&&(e.blockedOn=null,K2||(K2=!0,Fe.unstable_scheduleCallback(Fe.unstable_NormalPriority,w8)))}var Cc=null;function Cm(e){Cc!==e&&(Cc=e,Fe.unstable_scheduleCallback(Fe.unstable_NormalPriority,function(){Cc===e&&(Cc=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],i=e[t+2];if(typeof a!="function"){if(Q2(a||n)===null)continue;break}var l=dl(n);l!==null&&(e.splice(t,3),t-=3,Xd(l,{pending:!0,data:i,method:n.method,action:a},a,i))}}))}function Zl(e){function t(c){return Mc(c,e)}qa!==null&&Mc(qa,e),Fa!==null&&Mc(Fa,e),Ya!==null&&Mc(Ya,e),ms.forEach(t),ys.forEach(t);for(var n=0;n<Xa.length;n++){var a=Xa[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Xa.length&&(n=Xa[0],n.blockedOn===null);)Nm(n),n.blockedOn===null&&Xa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var i=n[a],l=n[a+1],r=i[gt]||null;if(typeof l=="function")r||Cm(n);else if(r){var s=null;if(l&&l.hasAttribute("formAction")){if(i=l,r=l[gt]||null)s=r.formAction;else if(Q2(i)!==null)continue}else s=r.action;typeof s=="function"?n[a+1]=s:(n.splice(a,3),a-=3),Cm(n)}}}function Dm(){function e(l){l.canIntercept&&l.info==="react-transition"&&l.intercept({handler:function(){return new Promise(function(r){return i=r})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var l=navigation.currentEntry;l&&l.url!=null&&navigation.navigate(l.url,{state:l.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Z2(e){this._internalRoot=e}Dc.prototype.render=Z2.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));var n=t.current,a=Xt();Sm(n,a,e,t,null,null)},Dc.prototype.unmount=Z2.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Sm(e.current,2,null,e,null,null),uc(),t[ul]=null}};function Dc(e){this._internalRoot=e}Dc.prototype.unstable_scheduleHydration=function(e){if(e){var t=V3();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xa.length&&t!==0&&t<Xa[n].priority;n++);Xa.splice(n,0,e),n===0&&Nm(e)}};var Om=E3.version;if(Om!=="19.2.0")throw Error(E(527,Om,"19.2.0"));R.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=Qy(t),e=e!==null?N3(e):null,e=e===null?null:e.stateNode,e};var m8={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oc.isDisabled&&Oc.supportsFiber)try{Nr=Oc.inject(m8),Bt=Oc}catch{}}co.createRoot=function(e,t){if(!_3(e))throw Error(E(299));var n=!1,a="",i=Hg,l=jg,r=Vg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(l=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=vm(e,1,!1,null,null,n,a,null,i,l,r,Dm),e[ul]=t.current,M2(e),new Z2(t)},co.hydrateRoot=function(e,t,n){if(!_3(e))throw Error(E(299));var a=!1,i="",l=Hg,r=jg,s=Vg,c=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(l=n.onUncaughtError),n.onCaughtError!==void 0&&(r=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=vm(e,1,!0,t,n??null,a,i,c,l,r,s,Dm),t.context=bm(null),n=t.current,a=Xt(),a=Gf(a),i=Ca(a),i.callback=null,Da(n,i,a),n=a,t.current.lanes=n,Cr(t,n),Bn(t),e[ul]=t.current,M2(e),new Dc(t)},co.version="19.2.0";function zm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(zm)}catch(e){console.error(e)}}zm(),v3.exports=co;var y8=v3.exports;const p8=e=>o.jsx("span",{className:"iw-text-2xl",children:o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",...e,children:[o.jsx("path",{d:"M0 0C9.01627 8.39148 22.9837 8.39148 32 0C23.6085 9.01627 23.6085 22.9837 32 32C22.9837 23.6085 9.01627 23.6085 0 32C8.39148 22.9837 8.39148 9.01627 0 0Z",fill:"url(#paint0_linear_6039_13039)"}),o.jsx("defs",{children:o.jsxs("linearGradient",{id:"paint0_linear_6039_13039",x1:"16",y1:"-3.5",x2:"41.5",y2:"29",gradientUnits:"userSpaceOnUse",children:[o.jsx("stop",{offset:"0.210966",stopColor:"#1E06CB"}),o.jsx("stop",{offset:"0.740385",stopColor:"#DB38EF"})]})})]})}),v8=()=>o.jsx(Qc,{config:{api:{baseUrl:"http://localhost:8000/api",authToken:""},interview:{proctoring:{enabled:!1,gazeAnalysisEnabled:!1,showControls:!1,showEngagementBar:!1,showLandmarks:!1}}},children:o.jsx("div",{className:"interview-widget-container",children:o.jsx(Lc,{title:"Frontend Developer",brandName:"Previa",interviewId:"ea3cb06a-c168-4ad3-8084-4165a79473d3",className:"iw-rounded-none iw-shadow-none",onInterviewEnd:()=>{console.log("🎉🎉 Interview ended 🎉🎉"),window.location.reload(),sessionStorage.clear()},onInterviewDisqualify:()=>{console.log("❌ Interview disqualified ❌")}})})}),b8=document.getElementById("root");y8.createRoot(b8).render(o.jsx(v8,{}));const S8=(e,t,n)=>Math.max(t,Math.min(n,e)),km=e=>{const t=Math.max(0,Math.floor(e)),n=Math.floor(t/60).toString().padStart(2,"0"),a=(t%60).toString().padStart(2,"0");return`${n}:${a}`},zc=({total:e,remaining:t,size:n=64,strokeWidth:a=6,className:i="",showLabel:l=!0})=>{const r=Math.max(1,e||1),s=S8(t/r,0,1),{radius:c,circumference:u,dashOffset:f,center:h}=y.useMemo(()=>{const v=(n-a)/2,S=2*Math.PI*v,_=S*(1-s),w=Math.round(a)%2===1,m=n/2+(w?.5:0);return{radius:v,circumference:S,dashOffset:_,center:m}},[n,a,s]),d=y.useMemo(()=>s<=.25?"iw-stroke-red-500":s<=.5?"iw-stroke-yellow-500":"iw-stroke-green-500",[s]),g=s<=.25?"iw-animate-pulse":"";return o.jsxs("div",{className:`iw-relative iw-inline-flex iw-items-center iw-justify-center iw-rounded-full iw-bg-white ${i}`,style:{width:n,height:n},"aria-label":`Time remaining ${km(t)}`,role:"timer","aria-live":"polite",children:[o.jsx("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,preserveAspectRatio:"xMidYMid meet",children:o.jsxs("g",{transform:`rotate(-90 ${h} ${h})`,children:[o.jsx("circle",{cx:h,cy:h,r:c,className:"iw-stroke-gray-200",strokeWidth:a,fill:"none",shapeRendering:"geometricPrecision",vectorEffect:"non-scaling-stroke"}),o.jsx("circle",{cx:h,cy:h,r:c,className:`${d} ${g}`,strokeWidth:a,strokeLinecap:"round",fill:"none",strokeDasharray:u,strokeDashoffset:f,shapeRendering:"geometricPrecision",vectorEffect:"non-scaling-stroke",style:{transition:"stroke-dashoffset 0.3s ease, stroke 0.2s ease"}})]})}),l?o.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0",children:o.jsx("span",{className:`iw-text-[11px] iw-font-semibold iw-tabular-nums ${s<=.25?"iw-text-red-600":s<=.5?"iw-text-yellow-600":"iw-text-green-600"}`,children:km(t)})}):o.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center iw-rotate-0",children:o.jsx(f6,{})})]})},E8=({timerState:e,answeringTime:t})=>{const n=(e==null?void 0:e.currentPhaseTimeRemaining)||0,a=t||w3.answeringDuration;return o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[o.jsx(zc,{total:a,remaining:n,size:50,strokeWidth:4,showLabel:!1,className:"iw-shadow-sm iw-border iw-border-gray-100"}),o.jsxs("div",{className:"iw-flex iw-flex-col",children:[o.jsx("span",{className:"iw-text-[#5C6686]",children:"Time left to answer"}),o.jsxs("span",{className:"iw-text-xl iw-font-bold iw-text-[#062260]",children:[Zc(n)," mins"]})]})]})},_8=({question:e,isLoading:t=!1,phase:n,brandName:a,timerState:i,answeringTime:l})=>o.jsx("div",{className:"iw-rounded-xl iw-mb-4 message-animation iw-text-gray-800 iw-py-1",children:o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-4",children:[o.jsx("div",{className:`iw-flex iw-flex-col iw-items-center iw-justify-center iw-relative iw-h-16 iw-w-16 iw-shrink-0 iw-shadow iw-rounded-full iw-border-[#E8EEFE] iw-border-4 ${n===I.READING_QUESTION?"iw-animate-speaking":""}`,children:o.jsx("div",{className:"iw-bg-transparent iw-flex iw-items-center iw-justify-center iw-rounded-full iw-size-full",style:{backgroundImage:"linear-gradient(#B5D0FD, #FFFFFF)"},children:o.jsx(p8,{className:"iw-size-8"})})}),o.jsx(x8,{phase:n,question:e,isLoading:t,brandName:a,timerState:i,answeringTime:l})]})}),x8=({phase:e,question:t,isLoading:n,brandName:a,timerState:i,answeringTime:l})=>{const r=a||"We",s=a?"is":"are";if(n||e===I.FETCHING_QUESTION||e===I.IDLE)return o.jsxs("div",{className:"iw-animate-pulse iw-w-full iw-space-y-3 iw-mr-10",children:[o.jsx("div",{className:"iw-h-5 iw-bg-gray-200 iw-rounded iw-w-full"}),o.jsx("div",{className:"iw-h-5 iw-bg-gray-200 iw-rounded iw-w-3/4"})]});const c=()=>o.jsxs("span",{className:"iw-animate-dot-wave iw-ml-1",children:[o.jsx("span",{children:"."}),o.jsx("span",{children:"."}),o.jsx("span",{children:"."})]});switch(e){case I.ANSWERING:return o.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between iw-w-full",children:[o.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:["Listening",o.jsx(c,{})]}),o.jsx(E8,{timerState:i,answeringTime:l})]});case I.TRANSCRIBING:return o.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:[r," ",s," analyzing your answer",o.jsx(c,{})]});case(I.EDITING||I.SUBMITTING):return o.jsxs("p",{className:"iw-text-lg iw-leading-7 iw-font-medium iw-text-gray-600",children:[r," ",s," waiting for your answer..."]});default:return o.jsx("p",{className:"iw-text-lg iw-leading-7",children:t==null?void 0:t.question})}},A8=({label:e,error:t,fullWidth:n=!1,className:a="",id:i,...l})=>{const r=i||`textarea-${Math.random().toString(36).substring(2,9)}`,s="iw-block iw-rounded-md iw-border iw-border-gray-300 iw-shadow-sm iw-px-4 iw-py-2 iw-text-sm iw-transition-all",c=t?"iw-border-red-500 iw-focus:border-red-500 iw-focus:ring-red-500":"",u=n?"iw-w-full":"",f=a.includes("iw-h-full")||n?"iw-h-full":"";return o.jsxs("div",{className:`iw-h-full iw-flex iw-flex-col ${n?"iw-w-full":""}`,children:[e&&o.jsx("label",{htmlFor:r,className:"iw-block iw-text-sm iw-font-medium iw-text-gray-700 iw-mb-1",children:e}),o.jsx("textarea",{id:r,className:`${s} ${c} ${u} ${f} ${a}`,"aria-invalid":t?"true":"false",...l}),t&&o.jsx("p",{className:"iw-mt-1 iw-text-sm iw-text-red-600",children:t})]})},T8=({answerText:e,onAnswerChange:t,timerState:n,editingTime:a})=>o.jsxs("div",{className:"iw-w-full iw-bg-white iw-rounded-xl iw-border iw-border-[#84bbf5] iw-overflow-hidden iw-rounded-tr-none",children:[o.jsx("div",{className:"iw-p-2 iw-pb-0",children:o.jsx(A8,{value:e,onChange:t,placeholder:"Type your answer here...",className:"iw-w-full iw-h-64 iw-resize-none iw-bg-transparent iw-border-none iw-text-[#062260] iw-text-base iw-leading-relaxed focus-visible:iw-outline-0 iw-p-0",disabled:n.phase===I.SUBMITTING})}),o.jsxs("div",{className:"iw-bg-[#F1F5FE] iw-px-2 iw-py-2 iw-flex iw-items-center iw-justify-between iw-border-t iw-border-[#E8EEFE]",children:[o.jsx("span",{className:"iw-text-[#062260] iw-text-sm iw-font-medium iw-line-clamp-1",children:"Time left to edit answer"}),o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[o.jsx(zc,{total:a,remaining:n.currentPhaseTimeRemaining,size:32,strokeWidth:3,showLabel:!1}),o.jsx("span",{className:"iw-text-[#062260] iw-text-sm iw-font-bold",children:`${Zc(n.currentPhaseTimeRemaining)} mins`})]})]})]}),Lm=({children:e})=>o.jsx("div",{className:"iw-flex iw-flex-col iw-items-start iw-mt-3 iw-gap-1",children:e}),N8=({children:e})=>o.jsx("div",{className:"iw-flex iw-flex-col iw-items-end iw-mt-3 iw-gap-1",children:e}),M8=({questionNumber:e})=>o.jsxs("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#E6F3FF",border:"1px solid #BDE0FD"},children:[" Q",e]}),Um=({label:e})=>o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2 iw-text-sm iw-text-gray-500 iw-bg-[#F1F5FE] iw-px-4 iw-py-1.5 iw-rounded-full iw-my-2 iw-font-semibold",children:[e&&o.jsx("span",{className:"iw-font-medium",children:e}),o.jsxs("span",{className:"iw-animate-dot-wave iw-text-2xl",children:[o.jsx("span",{children:"."}),o.jsx("span",{children:"."}),o.jsx("span",{children:"."})]})]}),C8=({phase:e,questionNumber:t})=>{switch(e){case I.FETCHING_QUESTION:return o.jsxs(Lm,{children:[o.jsx(M8,{questionNumber:t+1}),o.jsx(Um,{})]});case I.ANSWERING:return o.jsx(N8,{children:o.jsx(Um,{label:"You"})});case I.TRANSCRIBING:return o.jsx(Lm,{children:o.jsxs("div",{className:"iw-flex iw-items-center iw-px-1 iw-py-1.5 iw-rounded-lg iw-mb-2 iw-text-sm iw-bg-[#F2E8FE]",children:[o.jsx("img",{src:"../../../../src/assets/transcribing.gif",alt:"Transcribing",className:"iw-h-8 iw-w-12"}),o.jsx("span",{className:"iw-text-sm iw-text-[#062260]",children:"Analyzing answer…"})]})});default:return null}},D8=({item:e,index:t,isCurrentQuestion:n=!1,isEditable:a=!1,answerText:i="",onAnswerChange:l,timerState:r,editingTime:s})=>{const c=a&&r&&s!==void 0,u=c||e.answer;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"iw-flex iw-flex-col iw-items-start",children:[o.jsxs("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#E6F3FF",border:"1px solid #BDE0FD"},children:["Q",t+1]}),o.jsx("div",{className:"iw-w-full iw-p-4 iw-rounded-xl iw-text-[#062260] iw-text-base iw-leading-relaxed iw-rounded-tl-none",style:{backgroundColor:"#F1F5FE",border:n?"2px solid #84bbf5":"1px solid transparent"},children:e.question})]}),u&&o.jsxs("div",{className:"iw-flex iw-flex-col iw-items-end iw-mt-4",children:[o.jsx("div",{className:"iw-px-4 iw-py-1.5 iw-rounded-full iw-mb-2 iw-text-sm iw-font-semibold",style:{color:"#062260",backgroundColor:"#F2E8FE",border:"1px solid #E9D5FF"},children:"You"}),c?o.jsx(T8,{answerText:i||"",onAnswerChange:l,timerState:r,editingTime:s}):o.jsx("div",{className:"iw-w-full iw-p-4 iw-rounded-xl iw-text-[#062260] iw-text-base iw-leading-relaxed iw-rounded-tr-none",style:{backgroundColor:"#F7F1FE"},children:e.answer})]}),n&&o.jsx(C8,{phase:r==null?void 0:r.phase,questionNumber:t+1})]})},O8=()=>o.jsx("div",{className:"iw-space-y-6 iw-animate-pulse",children:[1,2,3].map(e=>o.jsxs("div",{className:`iw-flex iw-flex-col ${e%2===0?"iw-items-end":"iw-items-start"} iw-gap-2`,children:[o.jsx("div",{className:"iw-h-8 iw-w-16 iw-bg-gray-200 iw-rounded-full"}),o.jsx("div",{className:"iw-h-24 iw-w-full iw-bg-gray-100 iw-rounded-xl"})]},e))}),z8=({transcript:e,isLoading:t,className:n="",bottomRef:a,isEditing:i,answerText:l,onAnswerChange:r,timerState:s,editingTime:c})=>o.jsxs("div",{className:`iw-h-full iw-flex iw-flex-col iw-bg-white iw-scroll-smooth iw-p-6 iw-pr-2 iw-min-w-32 iw-border iw-rounded-tr-2xl iw-rounded-br-2xl iw-border-[#E8EEFE] ${n}`,children:[o.jsxs("div",{className:"iw-mb-6",children:[o.jsx("h2",{className:"iw-text-lg iw-font-semibold iw-mb-4",style:{color:"#062260"},children:"Interview transcript"}),o.jsx("div",{className:"iw-h-px iw-w-full iw-border-t iw-border-dashed iw-border-gray-300"})]}),o.jsxs("div",{className:"iw-flex-1 iw-overflow-y-auto iw-pr-2 iw-space-y-6 iw-scrollbar-thin iw-max-w-xl iw-pb-5",children:[t?o.jsx(O8,{}):e==null?void 0:e.map((u,f)=>o.jsx(D8,{item:u,index:f,isCurrentQuestion:f===(e==null?void 0:e.length)-1,isEditable:!!(f===(e==null?void 0:e.length)-1&&i),answerText:l||"",onAnswerChange:r||(()=>{}),timerState:s,editingTime:c},u.qna_id)),o.jsx("div",{ref:a})]})]}),k8=({interviewId:e,className:t="",currentQuestion:n,lastSubmittedAnswer:a,isEditing:i,answerText:l,onAnswerChange:r,timerState:s,editingTime:c})=>{const u=y3(),[f,h]=y.useState([]),[d,g]=y.useState(!0),v=y.useRef(null);return y.useEffect(()=>{var S;(S=v.current)==null||S.scrollIntoView({behavior:"smooth"})},[f,l,s==null?void 0:s.phase]),y.useEffect(()=>{(async()=>{var _;try{const w=await u.getInterviewTranscription(e);h(((_=w==null?void 0:w.data)==null?void 0:_.question_answers)||[])}catch(w){console.error("Failed to fetch transcript:",w)}finally{g(!1)}})()},[e,u]),y.useEffect(()=>{n&&h(S=>{if(S.some(m=>m.qna_id===n.qna_id))return S;const w={qna_id:n.qna_id,question:n.question,answer:null,question_generated_at:new Date().toISOString(),answer_submitted_at:null};return[...S,w]})},[n]),y.useEffect(()=>{a!=null&&a.answer?h(S=>S.map(_=>_.qna_id===a.qnaId?{..._,answer:a.answer,answer_submitted_at:new Date().toISOString()}:_)):l&&h(S=>S.map(_=>_.qna_id===(a==null?void 0:a.qnaId)?{..._,answer:l,answer_submitted_at:new Date().toISOString()}:_))},[a,l]),o.jsx(z8,{transcript:f,isLoading:d||(f==null?void 0:f.length)===0,className:t,bottomRef:v,isEditing:i,answerText:l,onAnswerChange:r,timerState:s,editingTime:c})},L8=({onClick:e,text:t="Submit response"})=>(y.useEffect(()=>{if(typeof window>"u")return;const n=a=>{const i=a.metaKey||a.ctrlKey,l=a.key===" ",r=a.target;r.tagName==="INPUT"||r.isContentEditable||i&&l&&(a.preventDefault(),e())};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e]),o.jsx("div",{className:"iw-fixed iw-bottom-10 iw-left-1/4 iw-transform iw--translate-x-1/2 iw-z-50",children:o.jsxs("button",{onClick:e,className:"iw-flex iw-items-center iw-gap-3 iw-bg-[#4C6CFF] hover:iw-bg-[#4c6dffd5] iw-text-white iw-px-5 iw-py-3 iw-rounded-lg iw-shadow-lg iw-transition-all iw-duration-200 iw-group",children:[o.jsx("span",{className:"iw-font-semibold iw-text-sm",children:t}),o.jsx("span",{className:"iw-bg-white/90 iw-text-[#062260] iw-px-2 iw-py-1 iw-rounded iw-text-xs iw-font-mono iw-font-bold group-hover:iw-bg-white iw-transition-colors",children:"Press Ctrl / ⌘ + Space"})]})})),Bm=({brandName:e,currentQuestion:t,state:n,phase:a,className:i="",interviewId:l="",interview_duration:r=_s,videoFeedRef:s,lastSubmittedAnswer:c,onNextPhase:u,answerText:f,onAnswerChange:h,editingTime:d,answeringTime:g})=>o.jsxs("div",{className:`iw-px-4 iw-py-3 ${i} iw-h-[calc(100vh_-_120px)] iw-max-h-[calc(100vh_-_120px)] iw-flex iw-gap-0 iw-relative`,children:[o.jsxs("div",{className:"iw-flex iw-flex-col iw-flex-1 iw-p-5 iw-bg-white/50 iw-border iw-border-[#E8EEFE] iw-rounded-s-3xl iw-overflow-hidden",children:[o.jsx("div",{className:"iw-flex iw-items-start iw-justify-between iw-gap-3 iw-mb-4",children:o.jsx("div",{className:"iw-flex-1",children:o.jsx(_8,{question:t,isLoading:a===I.FETCHING_QUESTION||a===I.IDLE,phase:a,brandName:e,timerState:n,answeringTime:g})})}),o.jsx("div",{className:"iw-flex-1 iw-min-h-0 iw-rounded-[16px] iw-overflow-hidden iw-relative",children:o.jsx(h3,{ref:s,interviewId:l,interview_duration:r,isAnswering:a===I.ANSWERING})})]}),o.jsx("div",{className:"iw-interview-transcription iw-w-1/4 iw-min-w-32 iw-h-full",children:o.jsx(k8,{interviewId:l,currentQuestion:t,lastSubmittedAnswer:c,isEditing:a===I.EDITING,answerText:f,onAnswerChange:h,timerState:n,editingTime:d})}),u&&(a===I.ANSWERING||a===I.EDITING)&&o.jsx(L8,{onClick:u,text:a===I.ANSWERING?"Submit Response":"Submit Final Response"})]}),U8=({confirmExitInterview:e,isOpen:t,onClose:n})=>o.jsx(bf,{isOpen:t,onClose:n,title:"Exit Interview",closeOnOverlayClick:!1,children:o.jsxs("div",{className:"iw-space-y-5",children:[o.jsxs("div",{className:"iw-flex iw-items-start iw-gap-3 iw-rounded-xl iw-p-2",children:[o.jsx("div",{className:"iw-flex iw-h-10 iw-w-10 iw-flex-none iw-items-center iw-justify-center iw-rounded-full iw-bg-rose-100 iw-text-rose-600",children:"!"}),o.jsxs("div",{className:"iw-space-y-2",children:[o.jsx("p",{className:"iw-text-sm iw-font-semibold iw-text-rose-600",children:"Leaving now will end your interview !"}),o.jsx("p",{className:"iw-text-sm iw-text-slate-500",children:"Are you sure you want to exit? All progress will be lost and you will not be able to resume."})]})]}),o.jsxs("div",{className:"iw-flex iw-flex-col-reverse iw-gap-2 sm:iw-flex-row sm:iw-items-center sm:iw-justify-end iw-pb-1",children:[o.jsx("button",{className:"iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-border iw-border-slate-200 iw-bg-white iw-px-4 iw-py-2 iw-text-sm iw-font-medium iw-text-slate-600 iw-shadow-sm iw-transition hover:iw-bg-slate-50",onClick:n,children:"Stay in interview"}),o.jsx("button",{className:"iw-inline-flex iw-items-center iw-justify-center iw-rounded-lg iw-px-4 iw-py-2 iw-text-sm iw-font-semibold iw-text-white iw-transition hover:iw-brightness-110",style:{background:"linear-gradient(to right, rgba(244, 63, 94, 0.8), rgba(225, 29, 72, 0.8))",boxShadow:"0 12px 30px -16px rgba(244, 63, 94, 0.65)"},onClick:e,children:"Confirm exit"})]})]})}),Gm=({title:e,brandName:t,brandLogo:n,onExit:a,totalDuration:i=30,elapsedTime:l=0})=>{const{baseColor:r}=Pl(),[s,c]=y.useState(!1),u=Math.min(l/(i*60)*100,100),f=()=>o.jsxs("div",{className:"iw-px-4 iw-pb-2 iw-flex iw-items-center iw-gap-3",children:[o.jsx("div",{className:"iw-flex-1 iw-h-4 iw-bg-[#F2F4F7] iw-rounded-full iw-overflow-hidden iw-border iw-border-blue-100 iw-relative",children:o.jsx("div",{className:"iw-h-full iw-bg-[#0EB00E] iw-rounded-full iw-transition-all iw-duration-1000 iw-ease-linear",style:{width:`${u}%`}})}),o.jsxs("div",{className:"iw-text-sm iw-font-medium iw-whitespace-nowrap",children:[o.jsx("span",{className:"iw-text-[#062260]",children:Zc(l)}),o.jsxs("span",{className:"iw-text-[#667085]",children:["/",i," Min"]})]})]});return o.jsxs("header",{className:"iw-w-full iw-text-gray-900 iw-shadow-sm",children:[o.jsxs("div",{className:"iw-mx-auto iw-flex iw-items-center iw-justify-between iw-p-4 iw-pt-1 iw-mb-2 iw-border-b iw-border-[#B3B9CB] iw-border-dashed",children:[o.jsxs("div",{className:"iw-flex iw-items-center iw-space-x-2",children:[n||o.jsx("div",{className:"iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold",style:{backgroundColor:r},children:n1(t)}),o.jsx("p",{className:"iw-text-xl iw-font-semibold",children:t})]}),o.jsx("h1",{className:"iw-text-2xl iw-font-semibold iw-text-gradient-silver",children:e}),o.jsx("button",{className:"iw-text-sm iw-text-[#E94315] iw-min-w-10 iw-rounded-md hover:iw-bg-orange-100 iw-p-2",onClick:()=>c(!0),children:o.jsxs("span",{className:"iw-flex iw-items-center iw-gap-1 iw-text-[18px] iw-font-semibold iw-whitespace-nowrap",children:[o.jsx(i1,{className:"iw-text-[#E94315] iw-size-5"}),"Leave interview"]})})]}),o.jsx(f,{}),o.jsx("div",{className:"iw-h-px iw-bg-gray-200"}),o.jsx(U8,{isOpen:s,confirmExitInterview:()=>{a(),c(!1)},onClose:()=>c(!1)})]})},B8=({className:e="",width:t,height:n=56,barWidth:a=3,gap:i=2,fftSize:l=1024,smoothingTimeConstant:r=.8,mediaStream:s,startOnMount:c=!0})=>{const{baseColor:u}=Pl(),f=y.useRef(null),h=y.useRef(null),d=y.useRef(null),g=y.useRef(null),v=y.useRef(null),S=y.useRef(null),_=y.useRef(!1),[w,m]=y.useState(null);y.useEffect(()=>{if(t||!h.current)return;const b=h.current,T=()=>{const x=f.current;if(!x)return;const C=b.clientWidth,A=n;x.width=Math.max(1,Math.floor(C*window.devicePixelRatio||1)),x.height=Math.max(1,Math.floor(A*window.devicePixelRatio||1))},N=new ResizeObserver(T);return N.observe(b),T(),()=>N.disconnect()},[t,n]),y.useEffect(()=>{if(!t)return;const b=f.current;b&&(b.width=Math.max(1,Math.floor(t*(window.devicePixelRatio||1))),b.height=Math.max(1,Math.floor(n*(window.devicePixelRatio||1))))},[t,n]),y.useEffect(()=>{let b=!1;return(async()=>{try{const N=new(window.AudioContext||window.webkitAudioContext);d.current=N;let x=s;if(!x){if(!c)return;x=await navigator.mediaDevices.getUserMedia({audio:!0,video:!1}),_.current=!0}if(b)return;const C=N.createAnalyser();C.fftSize=l,C.smoothingTimeConstant=r,g.current=C;const A=N.createMediaStreamSource(x);v.current=A,A.connect(C),p()}catch(N){m((N==null?void 0:N.message)||"Failed to initialize microphone")}})(),()=>{var N,x,C,A;b=!0,S.current&&cancelAnimationFrame(S.current);try{(N=v.current)==null||N.disconnect()}catch{}try{(x=g.current)==null||x.disconnect()}catch{}_.current&&((A=((C=v.current)==null?void 0:C.mediaStream)||void 0)==null||A.getTracks().forEach(O=>O.stop())),d.current&&d.current.state!=="closed"&&d.current.close()}},[s,l,r,c]);const p=()=>{const b=f.current,T=g.current;if(!b||!T)return;const N=b.getContext("2d");if(!N)return;const x=window.devicePixelRatio||1,C=b.width,A=b.height,O=T.frequencyBinCount,_e=new Uint8Array(O),He=()=>{S.current=requestAnimationFrame(He),T.getByteTimeDomainData(_e),N.clearRect(0,0,C,A),N.fillStyle="rgba(0,0,0,0)",N.fillRect(0,0,C,A);const st=Math.max(1,Math.floor(a*x)),un=Math.max(1,Math.floor(i*x)),St=st+un,M=Math.max(8,Math.floor((C+un)/St)),j=Math.floor(_e.length/M);for(let H=0;H<M;H++){const $=Math.min(_e.length-1,H*j),re=_e[$]/128-1,ot=Math.abs(re),bn=Math.pow(ot,.6),fn=Math.max(A*.06,bn*(A*.9)),Qt=H*St,ct=(A-fn)/2,ut=140-Math.min(140,140*ot),dn=85,De=48+Math.floor(12*(1-ot));N.fillStyle=`${u}`,N.shadowColor=`hsla(${ut}, ${dn}%, ${De}%, ${.25*ot})`,N.shadowBlur=8*ot;const Qa=Math.min(st/2,fn/2);G8(N,Qt,ct,st,fn,Qa),N.fill()}};He()};return o.jsxs("div",{ref:h,className:`iw-relative iw-w-full iw-overflow-hidden iw-rounded-md iw-bg-gray-50 ${e}`,style:{height:n},children:[o.jsx("canvas",{ref:f,className:"iw-w-full iw-h-full"}),w&&o.jsx("div",{className:"iw-absolute iw-inset-0 iw-flex iw-items-center iw-justify-center",children:o.jsx("span",{className:"iw-text-xs iw-text-red-600 iw-bg-red-50 iw-border iw-border-red-200 iw-px-2 iw-py-1 iw-rounded",children:w})})]})};function G8(e,t,n,a,i,l){const r=Math.min(l,a/2,i/2);e.beginPath(),e.moveTo(t+r,n),e.lineTo(t+a-r,n),e.quadraticCurveTo(t+a,n,t+a,n+r),e.lineTo(t+a,n+i-r),e.quadraticCurveTo(t+a,n+i,t+a-r,n+i),e.lineTo(t+r,n+i),e.quadraticCurveTo(t,n+i,t,n+i-r),e.lineTo(t,n+r),e.quadraticCurveTo(t,n,t+r,n),e.closePath()}const H8=({state:e,answeringTime:t,nextPhase:n,sttError:a})=>o.jsxs("div",{className:"iw-flex iw-flex-col iw-justify-between iw-h-full ",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"iw-flex iw-items-center iw-justify-between",children:[o.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"You may start speaking now. We're listening...."}),o.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-2",children:[o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-1",children:[o.jsx(a1,{className:"iw-size-4 iw-text-orange-600"}),o.jsx("p",{className:"iw-text-gray-700 iw-text-sm",children:"Time to talk: "})]}),o.jsx(zc,{total:t,remaining:e.currentPhaseTimeRemaining,size:50,strokeWidth:4})]})]}),o.jsx("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:"Done talking? Click the button to review your answer."})]}),o.jsxs("div",{children:[o.jsx(B8,{}),a&&o.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Recording error: ",a.message]})]}),o.jsx("div",{className:"iw-w-full iw-grid iw-grid-cols-1",children:o.jsx(Sr,{onClick:()=>{n()},children:"Transcribe My Answer"})})]});function j8(){const[e,t]=y.useState(!0),n=y.useMemo(()=>[0,1,2].map(a=>({id:a})),[]);return y.useEffect(()=>{const a=setInterval(()=>{t(i=>!i)},1500);return()=>clearInterval(a)},[]),o.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-h-full",children:[o.jsx("div",{className:"iw-relative iw-w-80 iw-h-48 ","aria-hidden":!0,children:n.map((a,i)=>{const l=i*50,r=e?l:l+12,s=e?1:.08,c=i*140;return o.jsx("div",{role:"presentation",className:"iw-absolute iw-w-full iw-rounded-lg iw-p-4 iw-shadow-md iw-bg-gradient-to-b iw-from-gray-50 iw-to-gray-100 iw-overflow-hidden",style:{top:0,transform:`translateY(${r}px)`,opacity:s,transition:`transform 600ms cubic-bezier(.2,.9,.3,1) ${c}ms, opacity 400ms ease ${c}ms`},children:o.jsxs("div",{className:"iw-flex iw-gap-3 iw-items-center",children:[o.jsx("div",{className:"iw-w-10 iw-h-10 iw-bg-gray-300 iw-rounded iw-flex-shrink-0"}),o.jsxs("div",{className:"iw-flex-1 iw-space-y-2",children:[o.jsx("div",{className:"iw-h-2 iw-bg-gray-300 iw-rounded iw-w-24"}),o.jsx("div",{className:"iw-h-2 iw-bg-gray-300 iw-rounded iw-w-32"})]})]})},a.id)})}),o.jsx("div",{className:"iw-text-center",children:o.jsx("p",{className:"iw-text-gray-500 iw-font-medium",children:"Preparing your question..."})})]})}const V8=({size:e="192px",className:t,colors:n,animationDuration:a=20})=>{const l={...{bg:"oklch(95% 0.02 264.695)",c1:"oklch(75% 0.15 350)",c2:"oklch(80% 0.12 200)",c3:"oklch(78% 0.14 280)"},...n},r=parseInt(e.replace("px",""),10),s=r<50?Math.max(r*.008,1):Math.max(r*.015,4),c=r<50?Math.max(r*.004,1.2):Math.max(r*.008,1.5),u=r<50?Math.max(r*.004,.05):Math.max(r*.008,.1),f=r<50?Math.max(r*.004,.5):Math.max(r*.008,2),h=r<30?"0%":r<50?"5%":r<100?"15%":"25%",d=r<30?1.1:r<50?Math.max(c*1.2,1.3):c;return o.jsx("div",{className:`siri-orb ${t}`,style:{width:e,height:e,"--bg":l.bg,"--c1":l.c1,"--c2":l.c2,"--c3":l.c3,"--animation-duration":`${a}s`,"--blur-amount":`${s}px`,"--contrast-amount":d,"--dot-size":`${u}px`,"--shadow-spread":`${f}px`,"--mask-radius":h},children:o.jsx("style",{children:`
107
99
  @property --angle {
108
100
  syntax: "<angle>";
109
101
  inherits: false;
@@ -208,4 +200,4 @@ Error generating stack: `+i.message+`
208
200
  animation: none;
209
201
  }
210
202
  }
211
- `})})};function Q8({ttsError:e}){return u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-w-full iw-h-full",children:[u.jsx(X8,{size:"80px"}),e&&u.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Audio playback failed: ",e.message]}),u.jsx("p",{className:"iw-text- iw-text-gray-700",children:"Your AI interviewer is speaking..."})]})}const Z8=({state:e,thinkingTime:t,nextPhase:n})=>u.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"Get Ready to Answer"}),u.jsx("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:"After 30-seconds thinking time, recording will start automatically, or you can begin recording early by clicking the button below."})]}),u.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-2",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-1",children:[u.jsx(s1,{className:"iw-size-4 iw-text-orange-600"}),u.jsx("p",{className:"iw-text-gray-700 iw-text-sm",children:"Time to think: "})]}),u.jsx(ko,{total:t,remaining:e.currentPhaseTimeRemaining,size:50,strokeWidth:4})]}),u.jsx("div",{className:"iw-w-full iw-grid iw-grid-cols-1",children:u.jsx(Ss,{onClick:()=>{n()},children:"Start Answering"})})]}),K8=({sttError:e,editingDuration:t})=>u.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full",children:[u.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 60 60",fill:"none",children:[u.jsx("rect",{width:60,height:60,rx:30,fill:"url(#prefix__paint0_linear_1460_12482)"}),u.jsx("path",{d:"M28.127 14c.276 7.685 6.442 13.851 14.127 14.127-7.684.276-13.85 6.442-14.127 14.127-.275-7.685-6.442-13.851-14.126-14.127 7.684-.276 13.85-6.442 14.126-14.127zM38.937 31.873A7.331 7.331 0 0046 38.937 7.331 7.331 0 0038.937 46a7.331 7.331 0 00-7.064-7.063 7.331 7.331 0 007.064-7.064z",fill:"#fff"}),u.jsx("defs",{children:u.jsxs("linearGradient",{id:"prefix__paint0_linear_1460_12482",x1:30,y1:-6.563,x2:77.813,y2:54.375,gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{offset:.211,stopColor:"#5C92FA"}),u.jsx("stop",{offset:1,stopColor:"#A75FFD"})]})})]}),u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1 iw-mt-3",children:"Just a moment... We're analyzing your response"}),u.jsxs("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:["After transcription, you'll have ",t||30," sec to review your answer."]}),e&&u.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Transcription error: ",e.message,e.recoverable&&" (attempting to continue)"]})]}),Lo=5;function I8({isOpen:e,onClose:t,warningCount:n,violationType:i,onDisqualify:a}){const[l,s]=y.useState(10),r=y.useRef(t);if(y.useEffect(()=>{r.current=t},[t]),y.useEffect(()=>{if(!e)return;const d=setInterval(()=>{s(m=>m<=1?(r.current(),10):m-1)},1e3);return()=>clearInterval(d)},[e]),y.useEffect(()=>{e&&s(10)},[e]),y.useEffect(()=>(e?(document.body.style.overflow="hidden",document.body.classList.add("interview-widget-container")):(document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")),()=>{document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")}),[e]),!e)return null;const c=(()=>{switch(i){case"tab_switch":return{title:"Tab Switch Detected",description:"You attempted to switch to another tab or reload application.",icon:u.jsx(u1,{className:"iw-h-5 iw-w-5"})};case"fullscreen_exit":return{title:"Full Screen Exit Detected",description:"You attempted to exit full screen mode.",icon:u.jsx(v6,{className:"iw-h-5 iw-w-5"})};case"focus_loss":return{title:"Focus Loss Detected",description:"You lost focus from the interview window.",icon:u.jsx(g6,{className:"iw-h-5 iw-w-5"})};case"blocked_shortcut":return{title:"Keyboard Shortcut Blocked",description:"You attempted to use a blocked keyboard shortcut.",icon:u.jsx(Jo,{className:"iw-h-5 iw-w-5"})};case"right_click_attempt":return{title:"Right Click Attempted",description:"You attempted to use the right click.",icon:u.jsx(b6,{className:"iw-h-5 iw-w-5"})};case"alt_tab_attempt":return{title:"Alt + Tab Attempted",description:"You attempted to use the Alt + Tab shortcut.",icon:u.jsx(Jo,{className:"iw-h-5 iw-w-5"})};case"blocked_function_key":return{title:"Function Key Blocked",description:"You attempted to use a blocked function key.",icon:u.jsx(Jo,{className:"iw-h-5 iw-w-5"})};default:return{title:"Violation Detected",description:"You attempted to perform an action that is not allowed.",icon:u.jsx(es,{className:"iw-h-5 iw-w-5"})}}})(),f=Lo-n,h=()=>{n+1>Lo?a():t()};return u.jsx("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-black/60 iw-p-4 iw-backdrop-blur-sm",children:u.jsxs("div",{className:"iw-w-full iw-max-w-md iw-rounded-2xl iw-border iw-border-gray-100 iw-bg-white iw-shadow-xl",children:[u.jsxs("div",{className:"iw-p-6 iw-pb-0",children:[u.jsxs("div",{className:"iw-mb-6 iw-flex iw-items-start iw-gap-4",children:[u.jsx("div",{className:"iw-flex iw-h-12 iw-w-12 iw-flex-shrink-0 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-red-50",children:u.jsx(es,{className:"iw-h-6 iw-w-6 iw-text-red-500"})}),u.jsxs("div",{className:"iw-flex-1",children:[u.jsx("h2",{className:"iw-mb-1 iw-text-xl iw-font-semibold iw-text-gray-900",children:"Security Violation"}),u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[u.jsx("span",{className:"iw-text-sm iw-text-gray-500",children:"Warning"}),u.jsx("div",{className:"iw-flex iw-gap-1",children:Array.from({length:Lo}).map((d,m)=>u.jsx("div",{className:`iw-h-2 iw-w-2 iw-rounded-full ${m<=n-1?"iw-bg-red-500":"iw-bg-gray-200"}`},m))}),u.jsxs("span",{className:"iw-text-sm iw-text-gray-500",children:["(",n,"/",Lo,")"]})]})]})]}),u.jsx("div",{className:"iw-mb-5 iw-rounded-2xl iw-border iw-border-red-100 iw-p-5",style:{background:"linear-gradient(to right, rgb(254, 242, 242), rgb(254, 245, 235))",borderColor:"rgb(254, 226, 226)"},children:u.jsxs("div",{className:"iw-flex iw-items-start iw-gap-4",children:[u.jsx("div",{className:"iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-xl iw-bg-white iw-shadow-sm",children:c.icon}),u.jsxs("div",{className:"iw-flex-1",children:[u.jsx("h3",{className:"iw-mb-2 iw-font-semibold iw-text-gray-900",children:c.title}),u.jsx("p",{className:"iw-text-sm iw-leading-relaxed iw-text-gray-700",children:c.description}),u.jsxs("div",{className:"iw-mt-3 iw-flex iw-items-center iw-gap-2 iw-text-xs iw-text-red-600",children:[u.jsx(x6,{className:"iw-h-3 iw-w-3"}),u.jsx("span",{children:"This action is monitored for interview integrity"})]})]})]})}),u.jsxs("div",{className:"iw-mb-5 iw-grid iw-grid-cols-2 iw-gap-3",children:[u.jsx("div",{className:"iw-rounded-xl iw-border iw-border-amber-200 iw-bg-amber-50 iw-p-4",children:u.jsxs("div",{className:"iw-text-center",children:[u.jsx("div",{className:"iw-mb-1 iw-text-2xl iw-font-bold iw-text-amber-600",children:f}),u.jsx("div",{className:"iw-text-xs iw-font-medium iw-text-amber-700",children:"Warnings Left"})]})}),u.jsx("div",{className:"iw-border-primary-100 iw-bg-primary-50 iw-rounded-xl iw-border iw-p-4",children:u.jsxs("div",{className:"iw-text-center",children:[u.jsxs("div",{className:"iw-mb-1 iw-flex iw-items-center iw-justify-center iw-gap-1.5",children:[u.jsx(m6,{className:"iw-text-primary-600 iw-h-4 iw-w-4"}),u.jsx("span",{className:"iw-text-primary-600 iw-text-2xl iw-font-bold",children:l})]}),u.jsx("div",{className:"iw-text-primary-700 iw-text-xs iw-font-medium",children:"Auto Close"})]})})]}),f===1&&u.jsx("div",{className:"iw-mb-5 iw-rounded-2xl iw-p-4 iw-text-white",style:{background:"linear-gradient(to right, rgba(220, 38, 38, 0.9), rgba(239, 68, 68, 0.9))"},children:u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[u.jsx("div",{className:"iw-flex iw-h-8 iw-w-8 iw-items-center iw-justify-center iw-rounded-full iw-bg-white/20",children:u.jsx(es,{className:"iw-h-4 iw-w-4"})}),u.jsxs("div",{children:[u.jsx("div",{className:"iw-text-sm iw-font-semibold",children:"Final Warning"}),u.jsx("div",{className:"iw-text-xs iw-text-red-100",children:"Next violation will disqualify you from this interview"})]})]})})]}),u.jsxs("div",{className:"iw-p-6 iw-pt-0",children:[u.jsx(Ss,{onClick:h,className:"iw-h-12 iw-w-full iw-rounded-xl iw-bg-gray-800 iw-text-sm iw-font-medium iw-text-white iw-hover:bg-gray-800",children:"I Understand - Continue Interview"}),u.jsx("p",{className:"iw-text-gray-500 iw-mt-3 iw-text-center iw-text-xs",children:"Please maintain focus and avoid switching tabs, exiting fullscreen, using shortcuts or right-clicking."})]})]})})}const J8=e=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[u.jsx("path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"}),u.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),W8=({showHardReloadWarning:e,onContinue:t})=>{const n=()=>{t()};return u.jsxs(Sf,{isOpen:e,onClose:n,closeOnOverlayClick:!1,closeOnEscape:!1,showCloseButton:!1,className:"iw-max-w-lg iw-px-2 iw-rounded-xl",children:[u.jsx("div",{className:"iw-absolute iw-inset-x-0 iw-top-0 iw-h-1 iw-bg-gradient-to-r iw-from-red-500 iw-to-red-600"}),u.jsx("div",{className:"iw-space-y-1 iw-pb-2 iw-pt-3",children:u.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[u.jsx(es,{className:"iw-w-5 iw-h-5 iw-text-red-500"}),u.jsx("h3",{className:"iw-text-xl iw-font-semibold iw-text-red-500",children:"Full Screen Exit Detected"})]})}),u.jsx("div",{className:"iw-pt-4 iw-pb-6",children:u.jsx("p",{className:"iw-text-center iw-text-sm iw-leading-relaxed iw-text-gray-500/90",children:"Exiting full screen mode or reloading this page during the session is strictly prohibited. Any attempt to do so will be recorded and may lead to penalties."})}),u.jsx("div",{className:"iw-pt-2 iw-pb-4",children:u.jsxs("button",{onClick:n,className:"iw-w-full iw-flex iw-items-center iw-justify-center iw-gap-2 iw-px-4 iw-py-3 iw-bg-gray-100 iw-text-gray-600 iw-rounded-md iw-font-medium iw-transition-colors hover:iw-bg-gray-200 focus:iw-outline-none focus:iw-ring-2 focus:iw-ring-gray-400 focus:iw-ring-offset-2",children:[u.jsx(J8,{className:"iw-size-4"}),"Continue Session"]})})]})},P8=y.forwardRef(({children:e,onDisqualify:t},n)=>{const[i,a]=y.useState(!1),[l,s]=y.useState(!1),[r,o]=y.useState(!1),[c,f]=y.useState("fullscreen_exit"),{logViolation:h,violationCount:d}=Qy({maxViolations:5,onViolation:g=>{l||(a(!0),f(g.type))}}),{enterFullScreen:m,isFullScreen:v,exitFullScreen:x}=Gy({onFullScreenChange(g){!g&&!l&&!r&&(a(!0),h({type:"fullscreen_exit",severity:"high",details:{action:"fullscreen_exit",reason:"Attempted to exit full screen mode"}})),g&&o(!1)}});y.useEffect(()=>{m()},[]),y.useImperativeHandle(n,()=>({exitFullScreenIntentionally:async()=>{o(!0),a(!1),s(!1);try{document.fullscreenElement&&await document.exitFullscreen()}catch(g){console.error("Failed to exit fullscreen:",g)}}}),[]),qy(h),Hy(h),Fy(),Zy();const E=()=>{s(!0),x(),a(!1),t==null||t()};return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"iw-relative iw-h-full iw-w-full",children:e}),u.jsx(I8,{warningCount:d,isOpen:i,violationType:c,onClose:()=>{a(!1),m()},onDisqualify:E}),!i&&d>0&&!l&&!r&&u.jsx(W8,{showHardReloadWarning:!v,logViolation:h,onContinue:m})]})}),$8=({interviewTitle:e,brandName:t="Novara",brandLogo:n,interviewId:i,onComplete:a,onDisqualify:l,className:s="",videoFeedRef:r})=>{var Ro;const o=b3(),{baseUrl:c,authToken:f}=a1(),{timers:h,stt:d,proctoring:m}=Ko(),v=y.useRef(null),[x,E]=y.useState(null),[g,w]=y.useState(""),[p,b]=y.useState(null),[A,N]=y.useState(Tr),[_,M]=y.useState(!0),T=y.useRef(""),D=y.useRef(null);y.useEffect(()=>{(async()=>{try{const _e=await o.getInterviewConfig(i);_e!=null&&_e.data&&(_e.data.duration_in_minutes&&N(_e.data.duration_in_minutes),typeof _e.data.allow_answer_editing=="boolean"&&M(_e.data.allow_answer_editing))}catch(_e){console.error("Failed to fetch interview config:",_e)}})()},[i]);const Ee={thinkingTime:(h==null?void 0:h.thinkingDuration)||0,answeringTime:(h==null?void 0:h.answeringDuration)||120,editingTime:_?(h==null?void 0:h.editingDuration)||30:0},{thinkingTime:Re,answeringTime:rt,editingTime:cn}=Ee;y.useEffect(()=>{T.current=g},[g]);const xt=y.useRef(!1),{speak:j,stop:G,error:R}=Xy({onEnd:()=>{xt.current=!1,Ce()},onError:()=>{xt.current||(xt.current=!0,Ce())}}),$=y.useRef(!1),se=y.useRef(!1),{startRecording:ut,stopRecording:bn,transcribe:fn,cancelRecording:Xt,error:ot}=Vy({config:{baseUrl:c,provider:d==null?void 0:d.provider,model:d==null?void 0:d.model,language:d==null?void 0:d.language,authToken:f,qnaId:((Ro=D.current)==null?void 0:Ro.qna_id)||"",interviewId:i},onStart:()=>{$.current=!1,se.current=!1},onStop:()=>{},onTranscriptionComplete:V=>{w(V.transcript),se.current||(se.current=!0,Ce())},onError:V=>{console.error("STT Error:",V),$.current||($.current=!0,Ce())}}),{state:ct,startQuestion:dn,nextPhase:Ce,completeInterview:Xi}=By({config:{answeringDuration:rt,editingDuration:cn},callbacks:{onPhaseChange:V=>{switch(V){case K.FETCHING_QUESTION:Il();break;case K.READING_QUESTION:xr();break;case K.ANSWERING:J2();break;case K.TRANSCRIBING:Bo();break;case K.SUBMITTING:br();break}},onInterviewEnd:()=>{a==null||a()}}});y.useEffect(()=>{dn()},[]);const{execute:Il}=Ry(async()=>{const V=await o.generateQuestion({interviewId:i});return D.current=V.data,V},{onSuccess:async V=>{V&&V.data&&(w(""),E(V.data),Ce())},onError:V=>{console.error("Failed to fetch questions:",V)}}),br=y.useCallback(async()=>{var V;try{const _e=T.current,Ca=((V=D.current)==null?void 0:V.qna_id)||"";await o.submitAnswer({interviewId:i,qnaId:Ca,answer:_e}),b({qnaId:Ca,answer:_e})}catch(_e){console.error("Failed to submit answer:",_e)}dn()},[o,i,dn]),xr=y.useCallback(async()=>{var V;if((V=D.current)!=null&&V.question)if(D.current.question_audio_data_base64)try{xt.current=!1,await j(D.current.question_audio_data_base64),D.current.is_interview_done&&Xi()}catch(_e){console.error("Failed to speak question:",_e),Ce()}else console.warn("No audio data available for question"),await u6(2e3),Ce();else Ce()},[j,Ce,Xi]),J2=y.useCallback(async()=>{try{await ut(rt)}catch(V){console.error("Failed to start recording:",V),Ce()}},[ut,Ce]),Bo=y.useCallback(async()=>{try{const V=await bn();await fn(V)}catch(V){console.error("STT processing failed:",V),!$.current&&!se.current&&($.current=!0,Ce())}},[bn,fn,Ce]),Ma=y.useCallback(async V=>{var _e,Ca;G(),Xt(),r&&"current"in r&&((_e=r.current)==null||_e.stopCamera()),await((Ca=v.current)==null?void 0:Ca.exitFullScreenIntentionally());try{await o.exitInterview(i)}catch(Go){console.error("API call failed:",Go)}finally{V==null||V(),Xi(),sessionStorage.removeItem(Yo)}},[i,G,o]),Sr=()=>{const{phase:V}=ct;switch(V){case K.IDLE:return u.jsxs("div",{className:"iw-text-center iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-2 iw-h-full",children:[u.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"Ready to start the Interview?"}),u.jsx("p",{className:"iw-max-w-xl iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:`You will be asked a series of behavioral and technical questions. For each one you'll get a short thinking period, then a timed recording window. We'll transcribe your response so you can review and edit it before submitting. Click "Start Interview" when you're ready.`}),u.jsx(Ss,{onClick:dn,className:"iw-mt-2 iw-w-40",children:"Start Interview"})]});case K.FETCHING_QUESTION:return u.jsx(Y8,{});case K.READING_QUESTION:return u.jsx(Q8,{ttsError:R});case K.THINKING:return u.jsx(Z8,{state:ct,thinkingTime:Re,nextPhase:Ce});case K.ANSWERING:return u.jsx(F8,{state:ct,answeringTime:rt,nextPhase:Ce,sttError:ot});case K.TRANSCRIBING:return u.jsx(K8,{sttError:ot,editingDuration:cn});case K.EDITING:case K.SUBMITTING:return null;case K.COMPLETED:return null;default:return null}};return u.jsx(u.Fragment,{children:m!=null&&m.enabled?u.jsxs(P8,{ref:v,onDisqualify:()=>Ma(l),children:[u.jsx(Hw,{title:e,brandName:t,brandLogo:n,totalDuration:A,elapsedTime:ct.totalTimeElapsed,onExit:()=>Ma()}),u.jsx(Gw,{brandName:t,currentQuestion:x,state:ct,phase:ct.phase,className:s,interviewId:i,interview_duration:A,videoFeedRef:r,lastSubmittedAnswer:p,onNextPhase:Ce,answerText:g,onAnswerChange:V=>w(V.target.value),editingTime:cn,answeringTime:rt,children:Sr()})]}):u.jsxs(u.Fragment,{children:[u.jsx(Hw,{title:e,brandName:t,brandLogo:n,totalDuration:A,elapsedTime:ct.totalTimeElapsed,onExit:()=>Ma()}),u.jsx(Gw,{brandName:t,currentQuestion:x,state:ct,phase:ct.phase,className:s,interviewId:i,interview_duration:A,videoFeedRef:r,lastSubmittedAnswer:p,onNextPhase:Ce,answerText:g,onAnswerChange:V=>w(V.target.value),editingTime:cn,answeringTime:rt,children:Sr()})]})})},Uo=({title:e,brandName:t,brandLogo:n,interviewId:i,onInterviewEnd:a,onInterviewDisqualify:l,className:s=""})=>{const{baseColor:r}=$l(),[o,c]=y.useState(!1),[f,h]=y.useState(!0),[d,m]=y.useState(!1),{proctoring:v}=Ko(),x=y.useRef(null),E=y.useRef(null),g=(v==null?void 0:v.gazeAnalysisEnabled)===!0,w=()=>{c(!0),h(!1)};return y.useEffect(()=>{if(o&&d&&E.current&&g)try{E.current.setReference()}finally{m(!1)}},[o,d,g]),o?u.jsx("div",{className:"interview-widget-container",children:u.jsx("div",{ref:x,className:`iw-flex iw-flex-col iw-rounded-xl iw-shadow-lg iw-overflow-hidden iw-h-[calc(100vh-1rem)] ${s}`,children:u.jsx("div",{className:"iw-h-[calc(100vh-1rem)] iw-flex iw-flex-col iw-justify-between gap-1",children:u.jsx($8,{interviewTitle:e??"Interview",brandName:t??"Novara",brandLogo:n,interviewId:i,className:s,onComplete:a??(()=>{}),onDisqualify:l,videoFeedRef:E})})})}):u.jsxs("div",{className:"interview-widget-container",children:[u.jsxs("div",{className:"iw-flex iw-items-center iw-space-x-2 iw-mx-auto iw-p-2 iw-max-w-[1800px]",children:[n||u.jsx("div",{className:"iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold",style:{backgroundColor:r},children:l1(t)}),u.jsx("p",{className:"iw-text-xl iw-font-semibold",children:t})]}),u.jsx(Ly,{isOpen:f,gazeEnabled:g,onStart:w,onRequestCalibration:()=>m(!0),videoFeedRef:E,interviewId:i})]})};typeof window<"u"&&(window.InterviewWidget={InterviewWidget:Uo,InterviewWidgetProvider:Zo}),it.InterviewWidget=Uo,it.InterviewWidgetProvider=Zo,it.default=Uo,Object.defineProperties(it,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
203
+ `})})};function q8({ttsError:e}){return o.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-8 iw-w-full iw-h-full",children:[o.jsx(V8,{size:"80px"}),e&&o.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Audio playback failed: ",e.message]}),o.jsx("p",{className:"iw-text- iw-text-gray-700",children:"Your AI interviewer is speaking..."})]})}const F8=({state:e,thinkingTime:t,nextPhase:n})=>o.jsxs("div",{className:"iw-flex iw-flex-col iw-gap-6 iw-items-center iw-justify-center iw-text-center iw-h-full ",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"Get Ready to Answer"}),o.jsx("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:"After 30-seconds thinking time, recording will start automatically, or you can begin recording early by clicking the button below."})]}),o.jsxs("div",{className:"iw-flex iw-items-center iw-justify-center iw-gap-2",children:[o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-1",children:[o.jsx(a1,{className:"iw-size-4 iw-text-orange-600"}),o.jsx("p",{className:"iw-text-gray-700 iw-text-sm",children:"Time to think: "})]}),o.jsx(zc,{total:t,remaining:e.currentPhaseTimeRemaining,size:50,strokeWidth:4})]}),o.jsx("div",{className:"iw-w-full iw-grid iw-grid-cols-1",children:o.jsx(Sr,{onClick:()=>{n()},children:"Start Answering"})})]}),Y8=({sttError:e,editingDuration:t})=>o.jsxs("div",{className:"iw-flex iw-flex-col iw-items-center iw-justify-center iw-h-full",children:[o.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 60 60",fill:"none",children:[o.jsx("rect",{width:60,height:60,rx:30,fill:"url(#prefix__paint0_linear_1460_12482)"}),o.jsx("path",{d:"M28.127 14c.276 7.685 6.442 13.851 14.127 14.127-7.684.276-13.85 6.442-14.127 14.127-.275-7.685-6.442-13.851-14.126-14.127 7.684-.276 13.85-6.442 14.126-14.127zM38.937 31.873A7.331 7.331 0 0046 38.937 7.331 7.331 0 0038.937 46a7.331 7.331 0 00-7.064-7.063 7.331 7.331 0 007.064-7.064z",fill:"#fff"}),o.jsx("defs",{children:o.jsxs("linearGradient",{id:"prefix__paint0_linear_1460_12482",x1:30,y1:-6.563,x2:77.813,y2:54.375,gradientUnits:"userSpaceOnUse",children:[o.jsx("stop",{offset:.211,stopColor:"#5C92FA"}),o.jsx("stop",{offset:1,stopColor:"#A75FFD"})]})})]}),o.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1 iw-mt-3",children:"Just a moment... We're analyzing your response"}),o.jsxs("p",{className:"iw-max-w-lg iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:["After transcription, you'll have ",t||30," sec to review your answer."]}),e&&o.jsxs("div",{className:"iw-mt-2 iw-text-xs iw-text-red-600",children:["Transcription error: ",e.message,e.recoverable&&" (attempting to continue)"]})]}),kc=5;function X8({isOpen:e,onClose:t,warningCount:n,violationType:a,onDisqualify:i}){const[l,r]=y.useState(10),s=y.useRef(t);if(y.useEffect(()=>{s.current=t},[t]),y.useEffect(()=>{if(!e)return;const d=setInterval(()=>{r(g=>g<=1?(s.current(),10):g-1)},1e3);return()=>clearInterval(d)},[e]),y.useEffect(()=>{e&&r(10)},[e]),y.useEffect(()=>(e?(document.body.style.overflow="hidden",document.body.classList.add("interview-widget-container")):(document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")),()=>{document.body.style.overflow="unset",document.body.classList.remove("interview-widget-container")}),[e]),!e)return null;const u=(()=>{switch(a){case"tab_switch":return{title:"Tab Switch Detected",description:"You attempted to switch to another tab or reload application.",icon:o.jsx(l1,{className:"iw-h-5 iw-w-5"})};case"fullscreen_exit":return{title:"Full Screen Exit Detected",description:"You attempted to exit full screen mode.",icon:o.jsx(g6,{className:"iw-h-5 iw-w-5"})};case"focus_loss":return{title:"Focus Loss Detected",description:"You lost focus from the interview window.",icon:o.jsx(u6,{className:"iw-h-5 iw-w-5"})};case"blocked_shortcut":return{title:"Keyboard Shortcut Blocked",description:"You attempted to use a blocked keyboard shortcut.",icon:o.jsx(Ic,{className:"iw-h-5 iw-w-5"})};case"right_click_attempt":return{title:"Right Click Attempted",description:"You attempted to use the right click.",icon:o.jsx(w6,{className:"iw-h-5 iw-w-5"})};case"alt_tab_attempt":return{title:"Alt + Tab Attempted",description:"You attempted to use the Alt + Tab shortcut.",icon:o.jsx(Ic,{className:"iw-h-5 iw-w-5"})};case"blocked_function_key":return{title:"Function Key Blocked",description:"You attempted to use a blocked function key.",icon:o.jsx(Ic,{className:"iw-h-5 iw-w-5"})};default:return{title:"Violation Detected",description:"You attempted to perform an action that is not allowed.",icon:o.jsx($l,{className:"iw-h-5 iw-w-5"})}}})(),f=kc-n,h=()=>{n+1>kc?i():t()};return o.jsx("div",{className:"iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-black/60 iw-p-4 iw-backdrop-blur-sm",children:o.jsxs("div",{className:"iw-w-full iw-max-w-md iw-rounded-2xl iw-border iw-border-gray-100 iw-bg-white iw-shadow-xl",children:[o.jsxs("div",{className:"iw-p-6 iw-pb-0",children:[o.jsxs("div",{className:"iw-mb-6 iw-flex iw-items-start iw-gap-4",children:[o.jsx("div",{className:"iw-flex iw-h-12 iw-w-12 iw-flex-shrink-0 iw-items-center iw-justify-center iw-rounded-2xl iw-bg-red-50",children:o.jsx($l,{className:"iw-h-6 iw-w-6 iw-text-red-500"})}),o.jsxs("div",{className:"iw-flex-1",children:[o.jsx("h2",{className:"iw-mb-1 iw-text-xl iw-font-semibold iw-text-gray-900",children:"Security Violation"}),o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[o.jsx("span",{className:"iw-text-sm iw-text-gray-500",children:"Warning"}),o.jsx("div",{className:"iw-flex iw-gap-1",children:Array.from({length:kc}).map((d,g)=>o.jsx("div",{className:`iw-h-2 iw-w-2 iw-rounded-full ${g<=n-1?"iw-bg-red-500":"iw-bg-gray-200"}`},g))}),o.jsxs("span",{className:"iw-text-sm iw-text-gray-500",children:["(",n,"/",kc,")"]})]})]})]}),o.jsx("div",{className:"iw-mb-5 iw-rounded-2xl iw-border iw-border-red-100 iw-p-5",style:{background:"linear-gradient(to right, rgb(254, 242, 242), rgb(254, 245, 235))",borderColor:"rgb(254, 226, 226)"},children:o.jsxs("div",{className:"iw-flex iw-items-start iw-gap-4",children:[o.jsx("div",{className:"iw-flex iw-h-10 iw-w-10 iw-items-center iw-justify-center iw-rounded-xl iw-bg-white iw-shadow-sm",children:u.icon}),o.jsxs("div",{className:"iw-flex-1",children:[o.jsx("h3",{className:"iw-mb-2 iw-font-semibold iw-text-gray-900",children:u.title}),o.jsx("p",{className:"iw-text-sm iw-leading-relaxed iw-text-gray-700",children:u.description}),o.jsxs("div",{className:"iw-mt-3 iw-flex iw-items-center iw-gap-2 iw-text-xs iw-text-red-600",children:[o.jsx(m6,{className:"iw-h-3 iw-w-3"}),o.jsx("span",{children:"This action is monitored for interview integrity"})]})]})]})}),o.jsxs("div",{className:"iw-mb-5 iw-grid iw-grid-cols-2 iw-gap-3",children:[o.jsx("div",{className:"iw-rounded-xl iw-border iw-border-amber-200 iw-bg-amber-50 iw-p-4",children:o.jsxs("div",{className:"iw-text-center",children:[o.jsx("div",{className:"iw-mb-1 iw-text-2xl iw-font-bold iw-text-amber-600",children:f}),o.jsx("div",{className:"iw-text-xs iw-font-medium iw-text-amber-700",children:"Warnings Left"})]})}),o.jsx("div",{className:"iw-border-primary-100 iw-bg-primary-50 iw-rounded-xl iw-border iw-p-4",children:o.jsxs("div",{className:"iw-text-center",children:[o.jsxs("div",{className:"iw-mb-1 iw-flex iw-items-center iw-justify-center iw-gap-1.5",children:[o.jsx(c6,{className:"iw-text-primary-600 iw-h-4 iw-w-4"}),o.jsx("span",{className:"iw-text-primary-600 iw-text-2xl iw-font-bold",children:l})]}),o.jsx("div",{className:"iw-text-primary-700 iw-text-xs iw-font-medium",children:"Auto Close"})]})})]}),f===1&&o.jsx("div",{className:"iw-mb-5 iw-rounded-2xl iw-p-4 iw-text-white",style:{background:"linear-gradient(to right, rgba(220, 38, 38, 0.9), rgba(239, 68, 68, 0.9))"},children:o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-3",children:[o.jsx("div",{className:"iw-flex iw-h-8 iw-w-8 iw-items-center iw-justify-center iw-rounded-full iw-bg-white/20",children:o.jsx($l,{className:"iw-h-4 iw-w-4"})}),o.jsxs("div",{children:[o.jsx("div",{className:"iw-text-sm iw-font-semibold",children:"Final Warning"}),o.jsx("div",{className:"iw-text-xs iw-text-red-100",children:"Next violation will disqualify you from this interview"})]})]})})]}),o.jsxs("div",{className:"iw-p-6 iw-pt-0",children:[o.jsx(Sr,{onClick:h,className:"iw-h-12 iw-w-full iw-rounded-xl iw-bg-gray-800 iw-text-sm iw-font-medium iw-text-white iw-hover:bg-gray-800",children:"I Understand - Continue Interview"}),o.jsx("p",{className:"iw-text-gray-500 iw-mt-3 iw-text-center iw-text-xs",children:"Please maintain focus and avoid switching tabs, exiting fullscreen, using shortcuts or right-clicking."})]})]})})}const Q8=e=>o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[o.jsx("path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"}),o.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),K8=({showHardReloadWarning:e,onContinue:t})=>{const n=()=>{t()};return o.jsxs(bf,{isOpen:e,onClose:n,closeOnOverlayClick:!1,closeOnEscape:!1,showCloseButton:!1,className:"iw-max-w-lg iw-px-2 iw-rounded-xl",children:[o.jsx("div",{className:"iw-absolute iw-inset-x-0 iw-top-0 iw-h-1 iw-bg-gradient-to-r iw-from-red-500 iw-to-red-600"}),o.jsx("div",{className:"iw-space-y-1 iw-pb-2 iw-pt-3",children:o.jsxs("div",{className:"iw-flex iw-items-center iw-gap-2",children:[o.jsx($l,{className:"iw-w-5 iw-h-5 iw-text-red-500"}),o.jsx("h3",{className:"iw-text-xl iw-font-semibold iw-text-red-500",children:"Full Screen Exit Detected"})]})}),o.jsx("div",{className:"iw-pt-4 iw-pb-6",children:o.jsx("p",{className:"iw-text-center iw-text-sm iw-leading-relaxed iw-text-gray-500/90",children:"Exiting full screen mode or reloading this page during the session is strictly prohibited. Any attempt to do so will be recorded and may lead to penalties."})}),o.jsx("div",{className:"iw-pt-2 iw-pb-4",children:o.jsxs("button",{onClick:n,className:"iw-w-full iw-flex iw-items-center iw-justify-center iw-gap-2 iw-px-4 iw-py-3 iw-bg-gray-100 iw-text-gray-600 iw-rounded-md iw-font-medium iw-transition-colors hover:iw-bg-gray-200 focus:iw-outline-none focus:iw-ring-2 focus:iw-ring-gray-400 focus:iw-ring-offset-2",children:[o.jsx(Q8,{className:"iw-size-4"}),"Continue Session"]})})]})},Z8=y.forwardRef(({children:e,onDisqualify:t},n)=>{const[a,i]=y.useState(!1),[l,r]=y.useState(!1),[s,c]=y.useState(!1),[u,f]=y.useState("fullscreen_exit"),{logViolation:h,violationCount:d}=qy({maxViolations:5,onViolation:w=>{l||(i(!0),f(w.type))}}),{enterFullScreen:g,isFullScreen:v,exitFullScreen:S}=Ly({onFullScreenChange(w){!w&&!l&&!s&&(i(!0),h({type:"fullscreen_exit",severity:"high",details:{action:"fullscreen_exit",reason:"Attempted to exit full screen mode"}})),w&&c(!1)}});y.useEffect(()=>{g()},[]),y.useImperativeHandle(n,()=>({exitFullScreenIntentionally:async()=>{c(!0),i(!1),r(!1);try{document.fullscreenElement&&await document.exitFullscreen()}catch(w){console.error("Failed to exit fullscreen:",w)}}}),[]),Gy(h),Uy(h),Hy(),Fy();const _=()=>{r(!0),S(),i(!1),t==null||t()};return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"iw-relative iw-h-full iw-w-full",children:e}),o.jsx(X8,{warningCount:d,isOpen:a,violationType:u,onClose:()=>{i(!1),g()},onDisqualify:_}),!a&&d>0&&!l&&!s&&o.jsx(K8,{showHardReloadWarning:!v,logViolation:h,onContinue:g})]})}),I8=({interviewTitle:e,brandName:t="Novara",brandLogo:n,interviewId:a,onComplete:i,onDisqualify:l,className:r="",videoFeedRef:s})=>{var Bc;const c=y3(),{baseUrl:u,authToken:f}=t1(),{timers:h,stt:d,proctoring:g}=Kc(),v=y.useRef(null),[S,_]=y.useState(null),[w,m]=y.useState(""),[p,b]=y.useState(null),[T,N]=y.useState(_s),[x,C]=y.useState(!0),A=y.useRef(""),O=y.useRef(null);y.useEffect(()=>{(async()=>{try{const xe=await c.getInterviewConfig(a);xe!=null&&xe.data&&(xe.data.duration_in_minutes&&N(xe.data.duration_in_minutes),typeof xe.data.allow_answer_editing=="boolean"&&C(xe.data.allow_answer_editing))}catch(xe){console.error("Failed to fetch interview config:",xe)}})()},[a]);const _e={thinkingTime:(h==null?void 0:h.thinkingDuration)||0,answeringTime:(h==null?void 0:h.answeringDuration)||120,editingTime:x?(h==null?void 0:h.editingDuration)||30:0},{thinkingTime:He,answeringTime:st,editingTime:un}=_e;y.useEffect(()=>{A.current=w},[w]);const St=y.useRef(!1),{speak:M,stop:j,error:H}=Vy({onEnd:()=>{St.current=!1,De()},onError:()=>{St.current||(St.current=!0,De())}}),$=y.useRef(!1),re=y.useRef(!1),{startRecording:ot,stopRecording:bn,transcribe:fn,cancelRecording:Qt,error:ct}=By({config:{baseUrl:u,provider:d==null?void 0:d.provider,model:d==null?void 0:d.model,language:d==null?void 0:d.language,authToken:f,qnaId:((Bc=O.current)==null?void 0:Bc.qna_id)||"",interviewId:a},onStart:()=>{$.current=!1,re.current=!1},onStop:()=>{},onTranscriptionComplete:q=>{m(q.transcript),re.current||(re.current=!0,De())},onError:q=>{console.error("STT Error:",q),$.current||($.current=!0,De())}}),{state:ut,startQuestion:dn,nextPhase:De,completeInterview:Qa}=zy({config:{answeringDuration:st,editingDuration:un},callbacks:{onPhaseChange:q=>{switch(q){case I.FETCHING_QUESTION:Il();break;case I.READING_QUESTION:bs();break;case I.ANSWERING:I2();break;case I.TRANSCRIBING:Uc();break;case I.SUBMITTING:vs();break}},onInterviewEnd:()=>{i==null||i()}}});y.useEffect(()=>{dn()},[]);const{execute:Il}=ky(async()=>{const q=await c.generateQuestion({interviewId:a});return O.current=q.data,q},{onSuccess:async q=>{q&&q.data&&(m(""),_(q.data),De())},onError:q=>{console.error("Failed to fetch questions:",q)}}),vs=y.useCallback(async()=>{var q;try{const xe=A.current,Ci=((q=O.current)==null?void 0:q.qna_id)||"";await c.submitAnswer({interviewId:a,qnaId:Ci,answer:xe}),b({qnaId:Ci,answer:xe})}catch(xe){console.error("Failed to submit answer:",xe)}dn()},[c,a,dn]),bs=y.useCallback(async()=>{var q;if((q=O.current)!=null&&q.question)if(O.current.question_audio_data_base64)try{St.current=!1,await M(O.current.question_audio_data_base64),O.current.is_interview_done&&Qa()}catch(xe){console.error("Failed to speak question:",xe),De()}else console.warn("No audio data available for question"),await a6(2e3),De();else De()},[M,De,Qa]),I2=y.useCallback(async()=>{try{await ot(st)}catch(q){console.error("Failed to start recording:",q),De()}},[ot,De]),Uc=y.useCallback(async()=>{try{const q=await bn();await fn(q)}catch(q){console.error("STT processing failed:",q),!$.current&&!re.current&&($.current=!0,De())}},[bn,fn,De]),Mi=y.useCallback(async q=>{var xe,Ci;j(),Qt(),s&&"current"in s&&((xe=s.current)==null||xe.stopCamera()),await((Ci=v.current)==null?void 0:Ci.exitFullScreenIntentionally());try{await c.exitInterview(a)}catch(Gc){console.error("API call failed:",Gc)}finally{q==null||q(),Qa(),sessionStorage.removeItem(Fc)}},[a,j,c]),Ss=()=>{const{phase:q}=ut;switch(q){case I.IDLE:return o.jsxs("div",{className:"iw-text-center iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-2 iw-h-full",children:[o.jsx("h3",{className:"iw-text-lg iw-font-semibold iw-text-gray-900 iw-mb-1",children:"Ready to start the Interview?"}),o.jsx("p",{className:"iw-max-w-xl iw-text-gray-500 iw-text-xs iw-leading-[21px]",children:`You will be asked a series of behavioral and technical questions. For each one you'll get a short thinking period, then a timed recording window. We'll transcribe your response so you can review and edit it before submitting. Click "Start Interview" when you're ready.`}),o.jsx(Sr,{onClick:dn,className:"iw-mt-2 iw-w-40",children:"Start Interview"})]});case I.FETCHING_QUESTION:return o.jsx(j8,{});case I.READING_QUESTION:return o.jsx(q8,{ttsError:H});case I.THINKING:return o.jsx(F8,{state:ut,thinkingTime:He,nextPhase:De});case I.ANSWERING:return o.jsx(H8,{state:ut,answeringTime:st,nextPhase:De,sttError:ct});case I.TRANSCRIBING:return o.jsx(Y8,{sttError:ct,editingDuration:un});case I.EDITING:case I.SUBMITTING:return null;case I.COMPLETED:return null;default:return null}};return o.jsx(o.Fragment,{children:g!=null&&g.enabled?o.jsxs(Z8,{ref:v,onDisqualify:()=>Mi(l),children:[o.jsx(Gm,{title:e,brandName:t,brandLogo:n,totalDuration:T,elapsedTime:ut.totalTimeElapsed,onExit:()=>Mi()}),o.jsx(Bm,{brandName:t,currentQuestion:S,state:ut,phase:ut.phase,className:r,interviewId:a,interview_duration:T,videoFeedRef:s,lastSubmittedAnswer:p,onNextPhase:De,answerText:w,onAnswerChange:q=>m(q.target.value),editingTime:un,answeringTime:st,children:Ss()})]}):o.jsxs(o.Fragment,{children:[o.jsx(Gm,{title:e,brandName:t,brandLogo:n,totalDuration:T,elapsedTime:ut.totalTimeElapsed,onExit:()=>Mi()}),o.jsx(Bm,{brandName:t,currentQuestion:S,state:ut,phase:ut.phase,className:r,interviewId:a,interview_duration:T,videoFeedRef:s,lastSubmittedAnswer:p,onNextPhase:De,answerText:w,onAnswerChange:q=>m(q.target.value),editingTime:un,answeringTime:st,children:Ss()})]})})},Lc=({title:e,brandName:t,brandLogo:n,interviewId:a,onInterviewEnd:i,onInterviewDisqualify:l,className:r=""})=>{const{baseColor:s}=Pl(),[c,u]=y.useState(!1),[f,h]=y.useState(!0),[d,g]=y.useState(!1),{proctoring:v}=Kc(),S=y.useRef(null),_=y.useRef(null),w=(v==null?void 0:v.gazeAnalysisEnabled)===!0,m=()=>{u(!0),h(!1)};return y.useEffect(()=>{if(c&&d&&_.current&&w)try{_.current.setReference()}finally{g(!1)}},[c,d,w]),c?o.jsx("div",{className:"interview-widget-container",children:o.jsx("div",{ref:S,className:`iw-flex iw-flex-col iw-rounded-xl iw-shadow-lg iw-overflow-hidden iw-h-[calc(100vh-1rem)] ${r}`,children:o.jsx("div",{className:"iw-h-[calc(100vh-1rem)] iw-flex iw-flex-col iw-justify-between gap-1",children:o.jsx(I8,{interviewTitle:e??"Interview",brandName:t??"Novara",brandLogo:n,interviewId:a,className:r,onComplete:i??(()=>{}),onDisqualify:l,videoFeedRef:_})})})}):o.jsxs("div",{className:"interview-widget-container",children:[o.jsxs("div",{className:"iw-flex iw-items-center iw-space-x-2 iw-mx-auto iw-p-2 iw-max-w-[1800px]",children:[n||o.jsx("div",{className:"iw-h-7 iw-w-7 iw-rounded-md iw-flex iw-items-center iw-justify-center iw-text-white iw-font-semibold",style:{backgroundColor:s},children:n1(t)}),o.jsx("p",{className:"iw-text-xl iw-font-semibold",children:t})]}),o.jsx(Dy,{isOpen:f,gazeEnabled:w,onStart:m,onRequestCalibration:()=>g(!0),videoFeedRef:_,interviewId:a})]})};typeof window<"u"&&(window.InterviewWidget={InterviewWidget:Lc,InterviewWidgetProvider:Qc}),Re.InterviewWidget=Lc,Re.InterviewWidgetProvider=Qc,Re.default=Lc,Object.defineProperties(Re,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});