diff --git a/apps/desktop/dist/assets/index-CmJQg31q.js b/apps/desktop/dist/assets/index-BeymWJKf.js similarity index 68% rename from apps/desktop/dist/assets/index-CmJQg31q.js rename to apps/desktop/dist/assets/index-BeymWJKf.js index 9d6f656..0eb4a2d 100644 --- a/apps/desktop/dist/assets/index-CmJQg31q.js +++ b/apps/desktop/dist/assets/index-BeymWJKf.js @@ -1,9 +1,9 @@ -(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const A of document.querySelectorAll('link[rel="modulepreload"]'))o(A);new MutationObserver(A=>{for(const U of A)if(U.type==="childList")for(const H of U.addedNodes)H.tagName==="LINK"&&H.rel==="modulepreload"&&o(H)}).observe(document,{childList:!0,subtree:!0});function y(A){const U={};return A.integrity&&(U.integrity=A.integrity),A.referrerPolicy&&(U.referrerPolicy=A.referrerPolicy),A.crossOrigin==="use-credentials"?U.credentials="include":A.crossOrigin==="anonymous"?U.credentials="omit":U.credentials="same-origin",U}function o(A){if(A.ep)return;A.ep=!0;const U=y(A);fetch(A.href,U)}})();var pf={exports:{}},Ou={};var qd;function Hm(){if(qd)return Ou;qd=1;var s=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function y(o,A,U){var H=null;if(U!==void 0&&(H=""+U),A.key!==void 0&&(H=""+A.key),"key"in A){U={};for(var x in A)x!=="key"&&(U[x]=A[x])}else U=A;return A=U.ref,{$$typeof:s,type:o,key:H,ref:A!==void 0?A:null,props:U}}return Ou.Fragment=f,Ou.jsx=y,Ou.jsxs=y,Ou}var Yd;function wm(){return Yd||(Yd=1,pf.exports=Hm()),pf.exports}var N=wm();function xm(s,f,y,o){if(typeof f=="function"?s!==f||!o:!f.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return y==="m"?o:y==="a"?o.call(s):o?o.value:f.get(s)}function jm(s,f,y,o,A){if(typeof f=="function"?s!==f||!0:!f.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f.set(s,y),y}var In;const _t="__TAURI_TO_IPC_KEY__";function Bm(s,f=!1){return window.__TAURI_INTERNALS__.transformCallback(s,f)}async function M(s,f={},y){return window.__TAURI_INTERNALS__.invoke(s,f,y)}class qm{get rid(){return xm(this,In,"f")}constructor(f){In.set(this,void 0),jm(this,In,f)}async close(){return M("plugin:resources|close",{rid:this.rid})}}In=new WeakMap;function Ru(){return!!(globalThis||window).isTauri}class th{constructor(...f){this.type="Logical",f.length===1?"Logical"in f[0]?(this.width=f[0].Logical.width,this.height=f[0].Logical.height):(this.width=f[0].width,this.height=f[0].height):(this.width=f[0],this.height=f[1])}toPhysical(f){return new Du(this.width*f,this.height*f)}[_t](){return{width:this.width,height:this.height}}toJSON(){return this[_t]()}}class Du{constructor(...f){this.type="Physical",f.length===1?"Physical"in f[0]?(this.width=f[0].Physical.width,this.height=f[0].Physical.height):(this.width=f[0].width,this.height=f[0].height):(this.width=f[0],this.height=f[1])}toLogical(f){return new th(this.width/f,this.height/f)}[_t](){return{width:this.width,height:this.height}}toJSON(){return this[_t]()}}class Ua{constructor(f){this.size=f}toLogical(f){return this.size instanceof th?this.size:this.size.toLogical(f)}toPhysical(f){return this.size instanceof Du?this.size:this.size.toPhysical(f)}[_t](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[_t]()}}class eh{constructor(...f){this.type="Logical",f.length===1?"Logical"in f[0]?(this.x=f[0].Logical.x,this.y=f[0].Logical.y):(this.x=f[0].x,this.y=f[0].y):(this.x=f[0],this.y=f[1])}toPhysical(f){return new Ae(this.x*f,this.y*f)}[_t](){return{x:this.x,y:this.y}}toJSON(){return this[_t]()}}class Ae{constructor(...f){this.type="Physical",f.length===1?"Physical"in f[0]?(this.x=f[0].Physical.x,this.y=f[0].Physical.y):(this.x=f[0].x,this.y=f[0].y):(this.x=f[0],this.y=f[1])}toLogical(f){return new eh(this.x/f,this.y/f)}[_t](){return{x:this.x,y:this.y}}toJSON(){return this[_t]()}}class Fn{constructor(f){this.position=f}toLogical(f){return this.position instanceof eh?this.position:this.position.toLogical(f)}toPhysical(f){return this.position instanceof Ae?this.position:this.position.toPhysical(f)}[_t](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[_t]()}}var st;(function(s){s.WINDOW_RESIZED="tauri://resize",s.WINDOW_MOVED="tauri://move",s.WINDOW_CLOSE_REQUESTED="tauri://close-requested",s.WINDOW_DESTROYED="tauri://destroyed",s.WINDOW_FOCUS="tauri://focus",s.WINDOW_BLUR="tauri://blur",s.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",s.WINDOW_THEME_CHANGED="tauri://theme-changed",s.WINDOW_CREATED="tauri://window-created",s.WINDOW_SUSPENDED="tauri://suspended",s.WINDOW_RESUMED="tauri://resumed",s.WEBVIEW_CREATED="tauri://webview-created",s.DRAG_ENTER="tauri://drag-enter",s.DRAG_OVER="tauri://drag-over",s.DRAG_DROP="tauri://drag-drop",s.DRAG_LEAVE="tauri://drag-leave"})(st||(st={}));async function ah(s,f){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(s,f),await M("plugin:event|unlisten",{event:s,eventId:f})}async function Cf(s,f,y){var o;const A=typeof y?.target=="string"?{kind:"AnyLabel",label:y.target}:(o=y?.target)!==null&&o!==void 0?o:{kind:"Any"};return M("plugin:event|listen",{event:s,target:A,handler:Bm(f)}).then(U=>async()=>ah(s,U))}async function Ym(s,f,y){return Cf(s,o=>{ah(s,o.id),f(o)},y)}async function Gm(s,f){await M("plugin:event|emit",{event:s,payload:f})}async function Qm(s,f,y){await M("plugin:event|emit_to",{target:typeof s=="string"?{kind:"AnyLabel",label:s}:s,event:f,payload:y})}class Nu extends qm{constructor(f){super(f)}static async new(f,y,o){return M("plugin:image|new",{rgba:Pn(f),width:y,height:o}).then(A=>new Nu(A))}static async fromBytes(f){return M("plugin:image|from_bytes",{bytes:Pn(f)}).then(y=>new Nu(y))}static async fromPath(f){return M("plugin:image|from_path",{path:f}).then(y=>new Nu(y))}async rgba(){return M("plugin:image|rgba",{rid:this.rid}).then(f=>new Uint8Array(f))}async size(){return M("plugin:image|size",{rid:this.rid})}}function Pn(s){return s==null?null:typeof s=="string"?s:s instanceof Nu?s.rid:s}var Rf;(function(s){s[s.Critical=1]="Critical",s[s.Informational=2]="Informational"})(Rf||(Rf={}));class Xm{constructor(f){this._preventDefault=!1,this.event=f.event,this.id=f.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var Gd;(function(s){s.None="none",s.Normal="normal",s.Indeterminate="indeterminate",s.Paused="paused",s.Error="error"})(Gd||(Gd={}));function Hf(){return new uh(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function _f(){return M("plugin:window|get_all_windows").then(s=>s.map(f=>new uh(f,{skip:!0})))}const Tf=["tauri://created","tauri://error"];class uh{constructor(f,y={}){var o;this.label=f,this.listeners=Object.create(null),y?.skip||M("plugin:window|create",{options:{...y,parent:typeof y.parent=="string"?y.parent:(o=y.parent)===null||o===void 0?void 0:o.label,label:f}}).then(async()=>this.emit("tauri://created")).catch(async A=>this.emit("tauri://error",A))}static async getByLabel(f){var y;return(y=(await _f()).find(o=>o.label===f))!==null&&y!==void 0?y:null}static getCurrent(){return Hf()}static async getAll(){return _f()}static async getFocusedWindow(){for(const f of await _f())if(await f.isFocused())return f;return null}async listen(f,y){return this._handleTauriEvent(f,y)?()=>{const o=this.listeners[f];o.splice(o.indexOf(y),1)}:Cf(f,y,{target:{kind:"Window",label:this.label}})}async once(f,y){return this._handleTauriEvent(f,y)?()=>{const o=this.listeners[f];o.splice(o.indexOf(y),1)}:Ym(f,y,{target:{kind:"Window",label:this.label}})}async emit(f,y){if(Tf.includes(f)){for(const o of this.listeners[f]||[])o({event:f,id:-1,payload:y});return}return Gm(f,y)}async emitTo(f,y,o){if(Tf.includes(y)){for(const A of this.listeners[y]||[])A({event:y,id:-1,payload:o});return}return Qm(f,y,o)}_handleTauriEvent(f,y){return Tf.includes(f)?(f in this.listeners?this.listeners[f].push(y):this.listeners[f]=[y],!0):!1}async scaleFactor(){return M("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return M("plugin:window|inner_position",{label:this.label}).then(f=>new Ae(f))}async outerPosition(){return M("plugin:window|outer_position",{label:this.label}).then(f=>new Ae(f))}async innerSize(){return M("plugin:window|inner_size",{label:this.label}).then(f=>new Du(f))}async outerSize(){return M("plugin:window|outer_size",{label:this.label}).then(f=>new Du(f))}async isFullscreen(){return M("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return M("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return M("plugin:window|is_maximized",{label:this.label})}async isFocused(){return M("plugin:window|is_focused",{label:this.label})}async isDecorated(){return M("plugin:window|is_decorated",{label:this.label})}async isResizable(){return M("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return M("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return M("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return M("plugin:window|is_closable",{label:this.label})}async isVisible(){return M("plugin:window|is_visible",{label:this.label})}async title(){return M("plugin:window|title",{label:this.label})}async theme(){return M("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return M("plugin:window|is_always_on_top",{label:this.label})}async activityName(){return M("plugin:window|activity_name",{label:this.label})}async sceneIdentifier(){return M("plugin:window|scene_identifier",{label:this.label})}async center(){return M("plugin:window|center",{label:this.label})}async requestUserAttention(f){let y=null;return f&&(f===Rf.Critical?y={type:"Critical"}:y={type:"Informational"}),M("plugin:window|request_user_attention",{label:this.label,value:y})}async setResizable(f){return M("plugin:window|set_resizable",{label:this.label,value:f})}async setEnabled(f){return M("plugin:window|set_enabled",{label:this.label,value:f})}async isEnabled(){return M("plugin:window|is_enabled",{label:this.label})}async setMaximizable(f){return M("plugin:window|set_maximizable",{label:this.label,value:f})}async setMinimizable(f){return M("plugin:window|set_minimizable",{label:this.label,value:f})}async setClosable(f){return M("plugin:window|set_closable",{label:this.label,value:f})}async setTitle(f){return M("plugin:window|set_title",{label:this.label,value:f})}async maximize(){return M("plugin:window|maximize",{label:this.label})}async unmaximize(){return M("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return M("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return M("plugin:window|minimize",{label:this.label})}async unminimize(){return M("plugin:window|unminimize",{label:this.label})}async show(){return M("plugin:window|show",{label:this.label})}async hide(){return M("plugin:window|hide",{label:this.label})}async close(){return M("plugin:window|close",{label:this.label})}async destroy(){return M("plugin:window|destroy",{label:this.label})}async setDecorations(f){return M("plugin:window|set_decorations",{label:this.label,value:f})}async setShadow(f){return M("plugin:window|set_shadow",{label:this.label,value:f})}async setEffects(f){return M("plugin:window|set_effects",{label:this.label,value:f})}async clearEffects(){return M("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(f){return M("plugin:window|set_always_on_top",{label:this.label,value:f})}async setAlwaysOnBottom(f){return M("plugin:window|set_always_on_bottom",{label:this.label,value:f})}async setContentProtected(f){return M("plugin:window|set_content_protected",{label:this.label,value:f})}async setSize(f){return M("plugin:window|set_size",{label:this.label,value:f instanceof Ua?f:new Ua(f)})}async setMinSize(f){return M("plugin:window|set_min_size",{label:this.label,value:f instanceof Ua?f:f?new Ua(f):null})}async setMaxSize(f){return M("plugin:window|set_max_size",{label:this.label,value:f instanceof Ua?f:f?new Ua(f):null})}async setSizeConstraints(f){function y(o){return o?{Logical:o}:null}return M("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:y(f?.minWidth),minHeight:y(f?.minHeight),maxWidth:y(f?.maxWidth),maxHeight:y(f?.maxHeight)}})}async setPosition(f){return M("plugin:window|set_position",{label:this.label,value:f instanceof Fn?f:new Fn(f)})}async setFullscreen(f){return M("plugin:window|set_fullscreen",{label:this.label,value:f})}async setSimpleFullscreen(f){return M("plugin:window|set_simple_fullscreen",{label:this.label,value:f})}async setFocus(){return M("plugin:window|set_focus",{label:this.label})}async setFocusable(f){return M("plugin:window|set_focusable",{label:this.label,value:f})}async setIcon(f){return M("plugin:window|set_icon",{label:this.label,value:Pn(f)})}async setSkipTaskbar(f){return M("plugin:window|set_skip_taskbar",{label:this.label,value:f})}async setCursorGrab(f){return M("plugin:window|set_cursor_grab",{label:this.label,value:f})}async setCursorVisible(f){return M("plugin:window|set_cursor_visible",{label:this.label,value:f})}async setCursorIcon(f){return M("plugin:window|set_cursor_icon",{label:this.label,value:f})}async setBackgroundColor(f){return M("plugin:window|set_background_color",{color:f})}async setCursorPosition(f){return M("plugin:window|set_cursor_position",{label:this.label,value:f instanceof Fn?f:new Fn(f)})}async setIgnoreCursorEvents(f){return M("plugin:window|set_ignore_cursor_events",{label:this.label,value:f})}async startDragging(){return M("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(f){return M("plugin:window|start_resize_dragging",{label:this.label,value:f})}async setBadgeCount(f){return M("plugin:window|set_badge_count",{label:this.label,value:f})}async setBadgeLabel(f){return M("plugin:window|set_badge_label",{label:this.label,value:f})}async setOverlayIcon(f){return M("plugin:window|set_overlay_icon",{label:this.label,value:f?Pn(f):void 0})}async setProgressBar(f){return M("plugin:window|set_progress_bar",{label:this.label,value:f})}async setVisibleOnAllWorkspaces(f){return M("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:f})}async setTitleBarStyle(f){return M("plugin:window|set_title_bar_style",{label:this.label,value:f})}async setTheme(f){return M("plugin:window|set_theme",{label:this.label,value:f})}async onResized(f){return this.listen(st.WINDOW_RESIZED,y=>{y.payload=new Du(y.payload),f(y)})}async onMoved(f){return this.listen(st.WINDOW_MOVED,y=>{y.payload=new Ae(y.payload),f(y)})}async onCloseRequested(f){return this.listen(st.WINDOW_CLOSE_REQUESTED,async y=>{const o=new Xm(y);await f(o),o.isPreventDefault()||await this.destroy()})}async onDragDropEvent(f){const y=await this.listen(st.DRAG_ENTER,H=>{f({...H,payload:{type:"enter",paths:H.payload.paths,position:new Ae(H.payload.position)}})}),o=await this.listen(st.DRAG_OVER,H=>{f({...H,payload:{type:"over",position:new Ae(H.payload.position)}})}),A=await this.listen(st.DRAG_DROP,H=>{f({...H,payload:{type:"drop",paths:H.payload.paths,position:new Ae(H.payload.position)}})}),U=await this.listen(st.DRAG_LEAVE,H=>{f({...H,payload:{type:"leave"}})});return()=>{y(),A(),o(),U()}}async onFocusChanged(f){const y=await this.listen(st.WINDOW_FOCUS,A=>{f({...A,payload:!0})}),o=await this.listen(st.WINDOW_BLUR,A=>{f({...A,payload:!1})});return()=>{y(),o()}}async onScaleChanged(f){return this.listen(st.WINDOW_SCALE_FACTOR_CHANGED,f)}async onThemeChanged(f){return this.listen(st.WINDOW_THEME_CHANGED,f)}}var Qd;(function(s){s.Disabled="disabled",s.Throttle="throttle",s.Suspend="suspend"})(Qd||(Qd={}));var Xd;(function(s){s.Default="default",s.FluentOverlay="fluentOverlay"})(Xd||(Xd={}));var Ld;(function(s){s.AppearanceBased="appearanceBased",s.Light="light",s.Dark="dark",s.MediumLight="mediumLight",s.UltraDark="ultraDark",s.Titlebar="titlebar",s.Selection="selection",s.Menu="menu",s.Popover="popover",s.Sidebar="sidebar",s.HeaderView="headerView",s.Sheet="sheet",s.WindowBackground="windowBackground",s.HudWindow="hudWindow",s.FullScreenUI="fullScreenUI",s.Tooltip="tooltip",s.ContentBackground="contentBackground",s.UnderWindowBackground="underWindowBackground",s.UnderPageBackground="underPageBackground",s.Mica="mica",s.Blur="blur",s.Acrylic="acrylic",s.Tabbed="tabbed",s.TabbedDark="tabbedDark",s.TabbedLight="tabbedLight"})(Ld||(Ld={}));var Vd;(function(s){s.FollowsWindowActiveState="followsWindowActiveState",s.Active="active",s.Inactive="inactive"})(Vd||(Vd={}));var zf={exports:{}},X={};var Zd;function Lm(){if(Zd)return X;Zd=1;var s=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),H=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),ll=Symbol.iterator;function Dl(h){return h===null||typeof h!="object"?null:(h=ll&&h[ll]||h["@@iterator"],typeof h=="function"?h:null)}var pl={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},tl=Object.assign,ql={};function nl(h,O,C){this.props=h,this.context=O,this.refs=ql,this.updater=C||pl}nl.prototype.isReactComponent={},nl.prototype.setState=function(h,O){if(typeof h!="object"&&typeof h!="function"&&h!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,h,O,"setState")},nl.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function It(){}It.prototype=nl.prototype;function Yl(h,O,C){this.props=h,this.context=O,this.refs=ql,this.updater=C||pl}var ot=Yl.prototype=new It;ot.constructor=Yl,tl(ot,nl.prototype),ot.isPureReactComponent=!0;var Ot=Array.isArray;function Ll(){}var I={H:null,A:null,T:null,S:null},Vl=Object.prototype.hasOwnProperty;function Mt(h,O,C){var j=C.ref;return{$$typeof:s,type:h,key:O,ref:j!==void 0?j:null,props:C}}function Ze(h,O){return Mt(h.type,O,h.props)}function Dt(h){return typeof h=="object"&&h!==null&&h.$$typeof===s}function Zl(h){var O={"=":"=0",":":"=2"};return"$"+h.replace(/[=:]/g,function(C){return O[C]})}var Ee=/\/+/g;function Ht(h,O){return typeof h=="object"&&h!==null&&h.key!=null?Zl(""+h.key):O.toString(36)}function Tt(h){switch(h.status){case"fulfilled":return h.value;case"rejected":throw h.reason;default:switch(typeof h.status=="string"?h.then(Ll,Ll):(h.status="pending",h.then(function(O){h.status==="pending"&&(h.status="fulfilled",h.value=O)},function(O){h.status==="pending"&&(h.status="rejected",h.reason=O)})),h.status){case"fulfilled":return h.value;case"rejected":throw h.reason}}throw h}function T(h,O,C,j,L){var J=typeof h;(J==="undefined"||J==="boolean")&&(h=null);var il=!1;if(h===null)il=!0;else switch(J){case"bigint":case"string":case"number":il=!0;break;case"object":switch(h.$$typeof){case s:case f:il=!0;break;case K:return il=h._init,T(il(h._payload),O,C,j,L)}}if(il)return L=L(h),il=j===""?"."+Ht(h,0):j,Ot(L)?(C="",il!=null&&(C=il.replace(Ee,"$&/")+"/"),T(L,O,C,"",function(Ha){return Ha})):L!=null&&(Dt(L)&&(L=Ze(L,C+(L.key==null||h&&h.key===L.key?"":(""+L.key).replace(Ee,"$&/")+"/")+il)),O.push(L)),1;il=0;var Ql=j===""?".":j+":";if(Ot(h))for(var _l=0;_l>>1,hl=T[sl];if(0>>1;slA(C,Q))jA(L,C)?(T[sl]=L,T[j]=Q,sl=j):(T[sl]=C,T[O]=Q,sl=O);else if(jA(L,Q))T[sl]=L,T[j]=Q,sl=j;else break l}}return R}function A(T,R){var Q=T.sortIndex-R.sortIndex;return Q!==0?Q:T.id-R.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var U=performance;s.unstable_now=function(){return U.now()}}else{var H=Date,x=H.now();s.unstable_now=function(){return H.now()-x}}var D=[],p=[],K=1,q=null,ll=3,Dl=!1,pl=!1,tl=!1,ql=!1,nl=typeof setTimeout=="function"?setTimeout:null,It=typeof clearTimeout=="function"?clearTimeout:null,Yl=typeof setImmediate<"u"?setImmediate:null;function ot(T){for(var R=y(p);R!==null;){if(R.callback===null)o(p);else if(R.startTime<=T)o(p),R.sortIndex=R.expirationTime,f(D,R);else break;R=y(p)}}function Ot(T){if(tl=!1,ot(T),!pl)if(y(D)!==null)pl=!0,Ll||(Ll=!0,Zl());else{var R=y(p);R!==null&&Tt(Ot,R.startTime-T)}}var Ll=!1,I=-1,Vl=5,Mt=-1;function Ze(){return ql?!0:!(s.unstable_now()-MtT&&Ze());){var sl=q.callback;if(typeof sl=="function"){q.callback=null,ll=q.priorityLevel;var hl=sl(q.expirationTime<=T);if(T=s.unstable_now(),typeof hl=="function"){q.callback=hl,ot(T),R=!0;break t}q===y(D)&&o(D),ot(T)}else o(D);q=y(D)}if(q!==null)R=!0;else{var h=y(p);h!==null&&Tt(Ot,h.startTime-T),R=!1}}break l}finally{q=null,ll=Q,Dl=!1}R=void 0}}finally{R?Zl():Ll=!1}}}var Zl;if(typeof Yl=="function")Zl=function(){Yl(Dt)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,Ht=Ee.port2;Ee.port1.onmessage=Dt,Zl=function(){Ht.postMessage(null)}}else Zl=function(){nl(Dt,0)};function Tt(T,R){I=nl(function(){T(s.unstable_now())},R)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(T){T.callback=null},s.unstable_forceFrameRate=function(T){0>T||125sl?(T.sortIndex=Q,f(p,T),y(D)===null&&T===y(p)&&(tl?(It(I),I=-1):tl=!0,Tt(Ot,Q-sl))):(T.sortIndex=hl,f(D,T),pl||Dl||(pl=!0,Ll||(Ll=!0,Zl()))),T},s.unstable_shouldYield=Ze,s.unstable_wrapCallback=function(T){var R=ll;return function(){var Q=ll;ll=R;try{return T.apply(this,arguments)}finally{ll=Q}}}})(Of)),Of}var Wd;function Zm(){return Wd||(Wd=1,Ef.exports=Vm()),Ef.exports}var Mf={exports:{}},Gl={};var $d;function Km(){if($d)return Gl;$d=1;var s=wf();function f(D){var p="https://react.dev/errors/"+D;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(f){console.error(f)}}return s(),Mf.exports=Km(),Mf.exports}var Fd;function Wm(){if(Fd)return Mu;Fd=1;var s=Zm(),f=wf(),y=Jm();function o(l){var t="https://react.dev/errors/"+l;if(1hl||(l.current=sl[hl],sl[hl]=null,hl--)}function C(l,t){hl++,sl[hl]=l.current,l.current=t}var j=h(null),L=h(null),J=h(null),il=h(null);function Ql(l,t){switch(C(J,t),C(L,l),C(j,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)&&(l=l.namespaceURI)?cd(l):0;break;default:if(l=t.tagName,t=t.namespaceURI)t=cd(t),l=fd(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}O(j),C(j,l)}function _l(){O(j),O(L),O(J)}function Ha(l){l.memoizedState!==null&&C(il,l);var t=j.current,e=fd(t,l.type);t!==e&&(C(L,l),C(j,e))}function Cu(l){L.current===l&&(O(j),O(L)),il.current===l&&(O(il),Tu._currentValue=Q)}var ti,jf;function Oe(l){if(ti===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ti=t&&t[1]||"",jf=-1{for(const U of E)if(U.type==="childList")for(const H of U.addedNodes)H.tagName==="LINK"&&H.rel==="modulepreload"&&o(H)}).observe(document,{childList:!0,subtree:!0});function y(E){const U={};return E.integrity&&(U.integrity=E.integrity),E.referrerPolicy&&(U.referrerPolicy=E.referrerPolicy),E.crossOrigin==="use-credentials"?U.credentials="include":E.crossOrigin==="anonymous"?U.credentials="omit":U.credentials="same-origin",U}function o(E){if(E.ep)return;E.ep=!0;const U=y(E);fetch(E.href,U)}})();var pf={exports:{}},Ou={};var qd;function Hm(){if(qd)return Ou;qd=1;var s=Symbol.for("react.transitional.element"),f=Symbol.for("react.fragment");function y(o,E,U){var H=null;if(U!==void 0&&(H=""+U),E.key!==void 0&&(H=""+E.key),"key"in E){U={};for(var x in E)x!=="key"&&(U[x]=E[x])}else U=E;return E=U.ref,{$$typeof:s,type:o,key:H,ref:E!==void 0?E:null,props:U}}return Ou.Fragment=f,Ou.jsx=y,Ou.jsxs=y,Ou}var Yd;function wm(){return Yd||(Yd=1,pf.exports=Hm()),pf.exports}var N=wm();function xm(s,f,y,o){if(typeof f=="function"?s!==f||!o:!f.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return y==="m"?o:y==="a"?o.call(s):o?o.value:f.get(s)}function jm(s,f,y,o,E){if(typeof f=="function"?s!==f||!0:!f.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return f.set(s,y),y}var In;const Tt="__TAURI_TO_IPC_KEY__";function Bm(s,f=!1){return window.__TAURI_INTERNALS__.transformCallback(s,f)}async function M(s,f={},y){return window.__TAURI_INTERNALS__.invoke(s,f,y)}class qm{get rid(){return xm(this,In,"f")}constructor(f){In.set(this,void 0),jm(this,In,f)}async close(){return M("plugin:resources|close",{rid:this.rid})}}In=new WeakMap;function Ru(){return!!(globalThis||window).isTauri}class th{constructor(...f){this.type="Logical",f.length===1?"Logical"in f[0]?(this.width=f[0].Logical.width,this.height=f[0].Logical.height):(this.width=f[0].width,this.height=f[0].height):(this.width=f[0],this.height=f[1])}toPhysical(f){return new Du(this.width*f,this.height*f)}[Tt](){return{width:this.width,height:this.height}}toJSON(){return this[Tt]()}}class Du{constructor(...f){this.type="Physical",f.length===1?"Physical"in f[0]?(this.width=f[0].Physical.width,this.height=f[0].Physical.height):(this.width=f[0].width,this.height=f[0].height):(this.width=f[0],this.height=f[1])}toLogical(f){return new th(this.width/f,this.height/f)}[Tt](){return{width:this.width,height:this.height}}toJSON(){return this[Tt]()}}class Ua{constructor(f){this.size=f}toLogical(f){return this.size instanceof th?this.size:this.size.toLogical(f)}toPhysical(f){return this.size instanceof Du?this.size:this.size.toPhysical(f)}[Tt](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[Tt]()}}class eh{constructor(...f){this.type="Logical",f.length===1?"Logical"in f[0]?(this.x=f[0].Logical.x,this.y=f[0].Logical.y):(this.x=f[0].x,this.y=f[0].y):(this.x=f[0],this.y=f[1])}toPhysical(f){return new Ae(this.x*f,this.y*f)}[Tt](){return{x:this.x,y:this.y}}toJSON(){return this[Tt]()}}class Ae{constructor(...f){this.type="Physical",f.length===1?"Physical"in f[0]?(this.x=f[0].Physical.x,this.y=f[0].Physical.y):(this.x=f[0].x,this.y=f[0].y):(this.x=f[0],this.y=f[1])}toLogical(f){return new eh(this.x/f,this.y/f)}[Tt](){return{x:this.x,y:this.y}}toJSON(){return this[Tt]()}}class Fn{constructor(f){this.position=f}toLogical(f){return this.position instanceof eh?this.position:this.position.toLogical(f)}toPhysical(f){return this.position instanceof Ae?this.position:this.position.toPhysical(f)}[Tt](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[Tt]()}}var rt;(function(s){s.WINDOW_RESIZED="tauri://resize",s.WINDOW_MOVED="tauri://move",s.WINDOW_CLOSE_REQUESTED="tauri://close-requested",s.WINDOW_DESTROYED="tauri://destroyed",s.WINDOW_FOCUS="tauri://focus",s.WINDOW_BLUR="tauri://blur",s.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",s.WINDOW_THEME_CHANGED="tauri://theme-changed",s.WINDOW_CREATED="tauri://window-created",s.WINDOW_SUSPENDED="tauri://suspended",s.WINDOW_RESUMED="tauri://resumed",s.WEBVIEW_CREATED="tauri://webview-created",s.DRAG_ENTER="tauri://drag-enter",s.DRAG_OVER="tauri://drag-over",s.DRAG_DROP="tauri://drag-drop",s.DRAG_LEAVE="tauri://drag-leave"})(rt||(rt={}));async function ah(s,f){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(s,f),await M("plugin:event|unlisten",{event:s,eventId:f})}async function Cf(s,f,y){var o;const E=typeof y?.target=="string"?{kind:"AnyLabel",label:y.target}:(o=y?.target)!==null&&o!==void 0?o:{kind:"Any"};return M("plugin:event|listen",{event:s,target:E,handler:Bm(f)}).then(U=>async()=>ah(s,U))}async function Ym(s,f,y){return Cf(s,o=>{ah(s,o.id),f(o)},y)}async function Gm(s,f){await M("plugin:event|emit",{event:s,payload:f})}async function Qm(s,f,y){await M("plugin:event|emit_to",{target:typeof s=="string"?{kind:"AnyLabel",label:s}:s,event:f,payload:y})}class Nu extends qm{constructor(f){super(f)}static async new(f,y,o){return M("plugin:image|new",{rgba:Pn(f),width:y,height:o}).then(E=>new Nu(E))}static async fromBytes(f){return M("plugin:image|from_bytes",{bytes:Pn(f)}).then(y=>new Nu(y))}static async fromPath(f){return M("plugin:image|from_path",{path:f}).then(y=>new Nu(y))}async rgba(){return M("plugin:image|rgba",{rid:this.rid}).then(f=>new Uint8Array(f))}async size(){return M("plugin:image|size",{rid:this.rid})}}function Pn(s){return s==null?null:typeof s=="string"?s:s instanceof Nu?s.rid:s}var Rf;(function(s){s[s.Critical=1]="Critical",s[s.Informational=2]="Informational"})(Rf||(Rf={}));class Xm{constructor(f){this._preventDefault=!1,this.event=f.event,this.id=f.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var Gd;(function(s){s.None="none",s.Normal="normal",s.Indeterminate="indeterminate",s.Paused="paused",s.Error="error"})(Gd||(Gd={}));function Hf(){return new uh(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function _f(){return M("plugin:window|get_all_windows").then(s=>s.map(f=>new uh(f,{skip:!0})))}const Tf=["tauri://created","tauri://error"];class uh{constructor(f,y={}){var o;this.label=f,this.listeners=Object.create(null),y?.skip||M("plugin:window|create",{options:{...y,parent:typeof y.parent=="string"?y.parent:(o=y.parent)===null||o===void 0?void 0:o.label,label:f}}).then(async()=>this.emit("tauri://created")).catch(async E=>this.emit("tauri://error",E))}static async getByLabel(f){var y;return(y=(await _f()).find(o=>o.label===f))!==null&&y!==void 0?y:null}static getCurrent(){return Hf()}static async getAll(){return _f()}static async getFocusedWindow(){for(const f of await _f())if(await f.isFocused())return f;return null}async listen(f,y){return this._handleTauriEvent(f,y)?()=>{const o=this.listeners[f];o.splice(o.indexOf(y),1)}:Cf(f,y,{target:{kind:"Window",label:this.label}})}async once(f,y){return this._handleTauriEvent(f,y)?()=>{const o=this.listeners[f];o.splice(o.indexOf(y),1)}:Ym(f,y,{target:{kind:"Window",label:this.label}})}async emit(f,y){if(Tf.includes(f)){for(const o of this.listeners[f]||[])o({event:f,id:-1,payload:y});return}return Gm(f,y)}async emitTo(f,y,o){if(Tf.includes(y)){for(const E of this.listeners[y]||[])E({event:y,id:-1,payload:o});return}return Qm(f,y,o)}_handleTauriEvent(f,y){return Tf.includes(f)?(f in this.listeners?this.listeners[f].push(y):this.listeners[f]=[y],!0):!1}async scaleFactor(){return M("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return M("plugin:window|inner_position",{label:this.label}).then(f=>new Ae(f))}async outerPosition(){return M("plugin:window|outer_position",{label:this.label}).then(f=>new Ae(f))}async innerSize(){return M("plugin:window|inner_size",{label:this.label}).then(f=>new Du(f))}async outerSize(){return M("plugin:window|outer_size",{label:this.label}).then(f=>new Du(f))}async isFullscreen(){return M("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return M("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return M("plugin:window|is_maximized",{label:this.label})}async isFocused(){return M("plugin:window|is_focused",{label:this.label})}async isDecorated(){return M("plugin:window|is_decorated",{label:this.label})}async isResizable(){return M("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return M("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return M("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return M("plugin:window|is_closable",{label:this.label})}async isVisible(){return M("plugin:window|is_visible",{label:this.label})}async title(){return M("plugin:window|title",{label:this.label})}async theme(){return M("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return M("plugin:window|is_always_on_top",{label:this.label})}async activityName(){return M("plugin:window|activity_name",{label:this.label})}async sceneIdentifier(){return M("plugin:window|scene_identifier",{label:this.label})}async center(){return M("plugin:window|center",{label:this.label})}async requestUserAttention(f){let y=null;return f&&(f===Rf.Critical?y={type:"Critical"}:y={type:"Informational"}),M("plugin:window|request_user_attention",{label:this.label,value:y})}async setResizable(f){return M("plugin:window|set_resizable",{label:this.label,value:f})}async setEnabled(f){return M("plugin:window|set_enabled",{label:this.label,value:f})}async isEnabled(){return M("plugin:window|is_enabled",{label:this.label})}async setMaximizable(f){return M("plugin:window|set_maximizable",{label:this.label,value:f})}async setMinimizable(f){return M("plugin:window|set_minimizable",{label:this.label,value:f})}async setClosable(f){return M("plugin:window|set_closable",{label:this.label,value:f})}async setTitle(f){return M("plugin:window|set_title",{label:this.label,value:f})}async maximize(){return M("plugin:window|maximize",{label:this.label})}async unmaximize(){return M("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return M("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return M("plugin:window|minimize",{label:this.label})}async unminimize(){return M("plugin:window|unminimize",{label:this.label})}async show(){return M("plugin:window|show",{label:this.label})}async hide(){return M("plugin:window|hide",{label:this.label})}async close(){return M("plugin:window|close",{label:this.label})}async destroy(){return M("plugin:window|destroy",{label:this.label})}async setDecorations(f){return M("plugin:window|set_decorations",{label:this.label,value:f})}async setShadow(f){return M("plugin:window|set_shadow",{label:this.label,value:f})}async setEffects(f){return M("plugin:window|set_effects",{label:this.label,value:f})}async clearEffects(){return M("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(f){return M("plugin:window|set_always_on_top",{label:this.label,value:f})}async setAlwaysOnBottom(f){return M("plugin:window|set_always_on_bottom",{label:this.label,value:f})}async setContentProtected(f){return M("plugin:window|set_content_protected",{label:this.label,value:f})}async setSize(f){return M("plugin:window|set_size",{label:this.label,value:f instanceof Ua?f:new Ua(f)})}async setMinSize(f){return M("plugin:window|set_min_size",{label:this.label,value:f instanceof Ua?f:f?new Ua(f):null})}async setMaxSize(f){return M("plugin:window|set_max_size",{label:this.label,value:f instanceof Ua?f:f?new Ua(f):null})}async setSizeConstraints(f){function y(o){return o?{Logical:o}:null}return M("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:y(f?.minWidth),minHeight:y(f?.minHeight),maxWidth:y(f?.maxWidth),maxHeight:y(f?.maxHeight)}})}async setPosition(f){return M("plugin:window|set_position",{label:this.label,value:f instanceof Fn?f:new Fn(f)})}async setFullscreen(f){return M("plugin:window|set_fullscreen",{label:this.label,value:f})}async setSimpleFullscreen(f){return M("plugin:window|set_simple_fullscreen",{label:this.label,value:f})}async setFocus(){return M("plugin:window|set_focus",{label:this.label})}async setFocusable(f){return M("plugin:window|set_focusable",{label:this.label,value:f})}async setIcon(f){return M("plugin:window|set_icon",{label:this.label,value:Pn(f)})}async setSkipTaskbar(f){return M("plugin:window|set_skip_taskbar",{label:this.label,value:f})}async setCursorGrab(f){return M("plugin:window|set_cursor_grab",{label:this.label,value:f})}async setCursorVisible(f){return M("plugin:window|set_cursor_visible",{label:this.label,value:f})}async setCursorIcon(f){return M("plugin:window|set_cursor_icon",{label:this.label,value:f})}async setBackgroundColor(f){return M("plugin:window|set_background_color",{color:f})}async setCursorPosition(f){return M("plugin:window|set_cursor_position",{label:this.label,value:f instanceof Fn?f:new Fn(f)})}async setIgnoreCursorEvents(f){return M("plugin:window|set_ignore_cursor_events",{label:this.label,value:f})}async startDragging(){return M("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(f){return M("plugin:window|start_resize_dragging",{label:this.label,value:f})}async setBadgeCount(f){return M("plugin:window|set_badge_count",{label:this.label,value:f})}async setBadgeLabel(f){return M("plugin:window|set_badge_label",{label:this.label,value:f})}async setOverlayIcon(f){return M("plugin:window|set_overlay_icon",{label:this.label,value:f?Pn(f):void 0})}async setProgressBar(f){return M("plugin:window|set_progress_bar",{label:this.label,value:f})}async setVisibleOnAllWorkspaces(f){return M("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:f})}async setTitleBarStyle(f){return M("plugin:window|set_title_bar_style",{label:this.label,value:f})}async setTheme(f){return M("plugin:window|set_theme",{label:this.label,value:f})}async onResized(f){return this.listen(rt.WINDOW_RESIZED,y=>{y.payload=new Du(y.payload),f(y)})}async onMoved(f){return this.listen(rt.WINDOW_MOVED,y=>{y.payload=new Ae(y.payload),f(y)})}async onCloseRequested(f){return this.listen(rt.WINDOW_CLOSE_REQUESTED,async y=>{const o=new Xm(y);await f(o),o.isPreventDefault()||await this.destroy()})}async onDragDropEvent(f){const y=await this.listen(rt.DRAG_ENTER,H=>{f({...H,payload:{type:"enter",paths:H.payload.paths,position:new Ae(H.payload.position)}})}),o=await this.listen(rt.DRAG_OVER,H=>{f({...H,payload:{type:"over",position:new Ae(H.payload.position)}})}),E=await this.listen(rt.DRAG_DROP,H=>{f({...H,payload:{type:"drop",paths:H.payload.paths,position:new Ae(H.payload.position)}})}),U=await this.listen(rt.DRAG_LEAVE,H=>{f({...H,payload:{type:"leave"}})});return()=>{y(),E(),o(),U()}}async onFocusChanged(f){const y=await this.listen(rt.WINDOW_FOCUS,E=>{f({...E,payload:!0})}),o=await this.listen(rt.WINDOW_BLUR,E=>{f({...E,payload:!1})});return()=>{y(),o()}}async onScaleChanged(f){return this.listen(rt.WINDOW_SCALE_FACTOR_CHANGED,f)}async onThemeChanged(f){return this.listen(rt.WINDOW_THEME_CHANGED,f)}}var Qd;(function(s){s.Disabled="disabled",s.Throttle="throttle",s.Suspend="suspend"})(Qd||(Qd={}));var Xd;(function(s){s.Default="default",s.FluentOverlay="fluentOverlay"})(Xd||(Xd={}));var Ld;(function(s){s.AppearanceBased="appearanceBased",s.Light="light",s.Dark="dark",s.MediumLight="mediumLight",s.UltraDark="ultraDark",s.Titlebar="titlebar",s.Selection="selection",s.Menu="menu",s.Popover="popover",s.Sidebar="sidebar",s.HeaderView="headerView",s.Sheet="sheet",s.WindowBackground="windowBackground",s.HudWindow="hudWindow",s.FullScreenUI="fullScreenUI",s.Tooltip="tooltip",s.ContentBackground="contentBackground",s.UnderWindowBackground="underWindowBackground",s.UnderPageBackground="underPageBackground",s.Mica="mica",s.Blur="blur",s.Acrylic="acrylic",s.Tabbed="tabbed",s.TabbedDark="tabbedDark",s.TabbedLight="tabbedLight"})(Ld||(Ld={}));var Vd;(function(s){s.FollowsWindowActiveState="followsWindowActiveState",s.Active="active",s.Inactive="inactive"})(Vd||(Vd={}));var zf={exports:{}},X={};var Zd;function Lm(){if(Zd)return X;Zd=1;var s=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),H=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),ll=Symbol.iterator;function Ul(h){return h===null||typeof h!="object"?null:(h=ll&&h[ll]||h["@@iterator"],typeof h=="function"?h:null)}var pl={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yl=Object.assign,lt={};function Ql(h,O,C){this.props=h,this.context=O,this.refs=lt,this.updater=C||pl}Ql.prototype.isReactComponent={},Ql.prototype.setState=function(h,O){if(typeof h!="object"&&typeof h!="function"&&h!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,h,O,"setState")},Ql.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function _l(){}_l.prototype=Ql.prototype;function Tl(h,O,C){this.props=h,this.context=O,this.refs=lt,this.updater=C||pl}var nl=Tl.prototype=new _l;nl.constructor=Tl,yl(nl,Ql.prototype),nl.isPureReactComponent=!0;var Mt=Array.isArray;function Vl(){}var I={H:null,A:null,T:null,S:null},Zl=Object.prototype.hasOwnProperty;function Dt(h,O,C){var j=C.ref;return{$$typeof:s,type:h,key:O,ref:j!==void 0?j:null,props:C}}function Ze(h,O){return Dt(h.type,O,h.props)}function Nt(h){return typeof h=="object"&&h!==null&&h.$$typeof===s}function Kl(h){var O={"=":"=0",":":"=2"};return"$"+h.replace(/[=:]/g,function(C){return O[C]})}var Ee=/\/+/g;function wt(h,O){return typeof h=="object"&&h!==null&&h.key!=null?Kl(""+h.key):O.toString(36)}function zt(h){switch(h.status){case"fulfilled":return h.value;case"rejected":throw h.reason;default:switch(typeof h.status=="string"?h.then(Vl,Vl):(h.status="pending",h.then(function(O){h.status==="pending"&&(h.status="fulfilled",h.value=O)},function(O){h.status==="pending"&&(h.status="rejected",h.reason=O)})),h.status){case"fulfilled":return h.value;case"rejected":throw h.reason}}throw h}function T(h,O,C,j,L){var J=typeof h;(J==="undefined"||J==="boolean")&&(h=null);var ul=!1;if(h===null)ul=!0;else switch(J){case"bigint":case"string":case"number":ul=!0;break;case"object":switch(h.$$typeof){case s:case f:ul=!0;break;case K:return ul=h._init,T(ul(h._payload),O,C,j,L)}}if(ul)return L=L(h),ul=j===""?"."+wt(h,0):j,Mt(L)?(C="",ul!=null&&(C=ul.replace(Ee,"$&/")+"/"),T(L,O,C,"",function(Ha){return Ha})):L!=null&&(Nt(L)&&(L=Ze(L,C+(L.key==null||h&&h.key===L.key?"":(""+L.key).replace(Ee,"$&/")+"/")+ul)),O.push(L)),1;ul=0;var Xl=j===""?".":j+":";if(Mt(h))for(var zl=0;zl>>1,dl=T[fl];if(0>>1;flE(C,Q))jE(L,C)?(T[fl]=L,T[j]=Q,fl=j):(T[fl]=C,T[O]=Q,fl=O);else if(jE(L,Q))T[fl]=L,T[j]=Q,fl=j;else break l}}return R}function E(T,R){var Q=T.sortIndex-R.sortIndex;return Q!==0?Q:T.id-R.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var U=performance;s.unstable_now=function(){return U.now()}}else{var H=Date,x=H.now();s.unstable_now=function(){return H.now()-x}}var D=[],p=[],K=1,q=null,ll=3,Ul=!1,pl=!1,yl=!1,lt=!1,Ql=typeof setTimeout=="function"?setTimeout:null,_l=typeof clearTimeout=="function"?clearTimeout:null,Tl=typeof setImmediate<"u"?setImmediate:null;function nl(T){for(var R=y(p);R!==null;){if(R.callback===null)o(p);else if(R.startTime<=T)o(p),R.sortIndex=R.expirationTime,f(D,R);else break;R=y(p)}}function Mt(T){if(yl=!1,nl(T),!pl)if(y(D)!==null)pl=!0,Vl||(Vl=!0,Kl());else{var R=y(p);R!==null&&zt(Mt,R.startTime-T)}}var Vl=!1,I=-1,Zl=5,Dt=-1;function Ze(){return lt?!0:!(s.unstable_now()-DtT&&Ze());){var fl=q.callback;if(typeof fl=="function"){q.callback=null,ll=q.priorityLevel;var dl=fl(q.expirationTime<=T);if(T=s.unstable_now(),typeof dl=="function"){q.callback=dl,nl(T),R=!0;break t}q===y(D)&&o(D),nl(T)}else o(D);q=y(D)}if(q!==null)R=!0;else{var h=y(p);h!==null&&zt(Mt,h.startTime-T),R=!1}}break l}finally{q=null,ll=Q,Ul=!1}R=void 0}}finally{R?Kl():Vl=!1}}}var Kl;if(typeof Tl=="function")Kl=function(){Tl(Nt)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,wt=Ee.port2;Ee.port1.onmessage=Nt,Kl=function(){wt.postMessage(null)}}else Kl=function(){Ql(Nt,0)};function zt(T,R){I=Ql(function(){T(s.unstable_now())},R)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(T){T.callback=null},s.unstable_forceFrameRate=function(T){0>T||125fl?(T.sortIndex=Q,f(p,T),y(D)===null&&T===y(p)&&(yl?(_l(I),I=-1):yl=!0,zt(Mt,Q-fl))):(T.sortIndex=dl,f(D,T),pl||Ul||(pl=!0,Vl||(Vl=!0,Kl()))),T},s.unstable_shouldYield=Ze,s.unstable_wrapCallback=function(T){var R=ll;return function(){var Q=ll;ll=R;try{return T.apply(this,arguments)}finally{ll=Q}}}})(Of)),Of}var Wd;function Zm(){return Wd||(Wd=1,Ef.exports=Vm()),Ef.exports}var Mf={exports:{}},Gl={};var $d;function Km(){if($d)return Gl;$d=1;var s=wf();function f(D){var p="https://react.dev/errors/"+D;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(f){console.error(f)}}return s(),Mf.exports=Km(),Mf.exports}var Fd;function Wm(){if(Fd)return Mu;Fd=1;var s=Zm(),f=wf(),y=Jm();function o(l){var t="https://react.dev/errors/"+l;if(1dl||(l.current=fl[dl],fl[dl]=null,dl--)}function C(l,t){dl++,fl[dl]=l.current,l.current=t}var j=h(null),L=h(null),J=h(null),ul=h(null);function Xl(l,t){switch(C(J,t),C(L,l),C(j,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)&&(l=l.namespaceURI)?cd(l):0;break;default:if(l=t.tagName,t=t.namespaceURI)t=cd(t),l=fd(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}O(j),C(j,l)}function zl(){O(j),O(L),O(J)}function Ha(l){l.memoizedState!==null&&C(ul,l);var t=j.current,e=fd(t,l.type);t!==e&&(C(L,l),C(j,e))}function Cu(l){L.current===l&&(O(j),O(L)),ul.current===l&&(O(ul),Tu._currentValue=Q)}var ti,jf;function Oe(l){if(ti===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ti=t&&t[1]||"",jf=-1)":-1u||r[a]!==g[u]){var _=` `+r[a].replace(" at new "," at ");return l.displayName&&_.includes("")&&(_=_.replace("",l.displayName)),_}while(1<=a&&0<=u);break}}}finally{ei=!1,Error.prepareStackTrace=e}return(e=l?l.displayName||l.name:"")?Oe(e):""}function oh(l,t){switch(l.tag){case 26:case 27:case 5:return Oe(l.type);case 16:return Oe("Lazy");case 13:return l.child!==t&&t!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return ai(l.type,!1);case 11:return ai(l.type.render,!1);case 1:return ai(l.type,!0);case 31:return Oe("Activity");default:return""}}function Bf(l){try{var t="",e=null;do t+=oh(l,e),e=l,l=l.return;while(l);return t}catch(a){return` Error generating stack: `+a.message+` -`+a.stack}}var ui=Object.prototype.hasOwnProperty,ni=s.unstable_scheduleCallback,ii=s.unstable_cancelCallback,rh=s.unstable_shouldYield,dh=s.unstable_requestPaint,Pl=s.unstable_now,hh=s.unstable_getCurrentPriorityLevel,qf=s.unstable_ImmediatePriority,Yf=s.unstable_UserBlockingPriority,Hu=s.unstable_NormalPriority,yh=s.unstable_LowPriority,Gf=s.unstable_IdlePriority,mh=s.log,vh=s.unstable_setDisableYieldValue,wa=null,lt=null;function Pt(l){if(typeof mh=="function"&&vh(l),lt&&typeof lt.setStrictMode=="function")try{lt.setStrictMode(wa,l)}catch{}}var tt=Math.clz32?Math.clz32:Sh,gh=Math.log,bh=Math.LN2;function Sh(l){return l>>>=0,l===0?32:31-(gh(l)/bh|0)|0}var wu=256,xu=262144,ju=4194304;function Me(l){var t=l&42;if(t!==0)return t;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Bu(l,t,e){var a=l.pendingLanes;if(a===0)return 0;var u=0,n=l.suspendedLanes,i=l.pingedLanes;l=l.warmLanes;var c=a&134217727;return c!==0?(a=c&~n,a!==0?u=Me(a):(i&=c,i!==0?u=Me(i):e||(e=c&~l,e!==0&&(u=Me(e))))):(c=a&~n,c!==0?u=Me(c):i!==0?u=Me(i):e||(e=a&~l,e!==0&&(u=Me(e)))),u===0?0:t!==0&&t!==u&&(t&n)===0&&(n=u&-u,e=t&-t,n>=e||n===32&&(e&4194048)!==0)?t:u}function xa(l,t){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&t)===0}function ph(l,t){switch(l){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 Qf(){var l=ju;return ju<<=1,(ju&62914560)===0&&(ju=4194304),l}function ci(l){for(var t=[],e=0;31>e;e++)t.push(l);return t}function ja(l,t){l.pendingLanes|=t,t!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function _h(l,t,e,a,u,n){var i=l.pendingLanes;l.pendingLanes=e,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=e,l.entangledLanes&=e,l.errorRecoveryDisabledLanes&=e,l.shellSuspendCounter=0;var c=l.entanglements,r=l.expirationTimes,g=l.hiddenUpdates;for(e=i&~e;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var Mh=/[\n"\\]/g;function dt(l){return l.replace(Mh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function hi(l,t,e,a,u,n,i,c){l.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?l.type=i:l.removeAttribute("type"),t!=null?i==="number"?(t===0&&l.value===""||l.value!=t)&&(l.value=""+rt(t)):l.value!==""+rt(t)&&(l.value=""+rt(t)):i!=="submit"&&i!=="reset"||l.removeAttribute("value"),t!=null?yi(l,i,rt(t)):e!=null?yi(l,i,rt(e)):a!=null&&l.removeAttribute("value"),u==null&&n!=null&&(l.defaultChecked=!!n),u!=null&&(l.checked=u&&typeof u!="function"&&typeof u!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?l.name=""+rt(c):l.removeAttribute("name")}function ls(l,t,e,a,u,n,i,c){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(l.type=n),t!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){di(l);return}e=e!=null?""+rt(e):"",t=t!=null?""+rt(t):e,c||t===l.value||(l.value=t),l.defaultValue=t}a=a??u,a=typeof a!="function"&&typeof a!="symbol"&&!!a,l.checked=c?l.checked:!!a,l.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(l.name=i),di(l)}function yi(l,t,e){t==="number"&&Gu(l.ownerDocument)===l||l.defaultValue===""+e||(l.defaultValue=""+e)}function Fe(l,t,e,a){if(l=l.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Si=!1;if(jt)try{var Ga={};Object.defineProperty(Ga,"passive",{get:function(){Si=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{Si=!1}var te=null,pi=null,Xu=null;function cs(){if(Xu)return Xu;var l,t=pi,e=t.length,a,u="value"in te?te.value:te.textContent,n=u.length;for(l=0;l=La),hs=" ",ys=!1;function ms(l,t){switch(l){case"keyup":return ty.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vs(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var ta=!1;function ay(l,t){switch(l){case"compositionend":return vs(t);case"keypress":return t.which!==32?null:(ys=!0,hs);case"textInput":return l=t.data,l===hs&&ys?null:l;default:return null}}function uy(l,t){if(ta)return l==="compositionend"||!Ei&&ms(l,t)?(l=cs(),Xu=pi=te=null,ta=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:e,offset:t-l};l=a}l:{for(;e;){if(e.nextSibling){e=e.nextSibling;break l}e=e.parentNode}e=void 0}e=As(e)}}function Os(l,t){return l&&t?l===t?!0:l&&l.nodeType===3?!1:t&&t.nodeType===3?Os(l,t.parentNode):"contains"in l?l.contains(t):l.compareDocumentPosition?!!(l.compareDocumentPosition(t)&16):!1:!1}function Ms(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var t=Gu(l.document);t instanceof l.HTMLIFrameElement;){try{var e=typeof t.contentWindow.location.href=="string"}catch{e=!1}if(e)l=t.contentWindow;else break;t=Gu(l.document)}return t}function Di(l){var t=l&&l.nodeName&&l.nodeName.toLowerCase();return t&&(t==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||t==="textarea"||l.contentEditable==="true")}var dy=jt&&"documentMode"in document&&11>=document.documentMode,ea=null,Ni=null,Ja=null,Ui=!1;function Ds(l,t,e){var a=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Ui||ea==null||ea!==Gu(a)||(a=ea,"selectionStart"in a&&Di(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}),Ja&&Ka(Ja,a)||(Ja=a,a=jn(Ni,"onSelect"),0>=i,u-=i,Nt=1<<32-tt(t)+u|e<Z?(F=B,B=null):F=B.sibling;var al=b(m,B,v[Z],z);if(al===null){B===null&&(B=F);break}l&&B&&al.alternate===null&&t(m,B),d=n(al,d,Z),el===null?Y=al:el.sibling=al,el=al,B=F}if(Z===v.length)return e(m,B),P&&qt(m,Z),Y;if(B===null){for(;ZZ?(F=B,B=null):F=B.sibling;var ze=b(m,B,al.value,z);if(ze===null){B===null&&(B=F);break}l&&B&&ze.alternate===null&&t(m,B),d=n(ze,d,Z),el===null?Y=ze:el.sibling=ze,el=ze,B=F}if(al.done)return e(m,B),P&&qt(m,Z),Y;if(B===null){for(;!al.done;Z++,al=v.next())al=E(m,al.value,z),al!==null&&(d=n(al,d,Z),el===null?Y=al:el.sibling=al,el=al);return P&&qt(m,Z),Y}for(B=a(B);!al.done;Z++,al=v.next())al=S(B,m,Z,al.value,z),al!==null&&(l&&al.alternate!==null&&B.delete(al.key===null?Z:al.key),d=n(al,d,Z),el===null?Y=al:el.sibling=al,el=al);return l&&B.forEach(function(Cm){return t(m,Cm)}),P&&qt(m,Z),Y}function dl(m,d,v,z){if(typeof v=="object"&&v!==null&&v.type===tl&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Dl:l:{for(var Y=v.key;d!==null;){if(d.key===Y){if(Y=v.type,Y===tl){if(d.tag===7){e(m,d.sibling),z=u(d,v.props.children),z.return=m,m=z;break l}}else if(d.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===Vl&&qe(Y)===d.type){e(m,d.sibling),z=u(d,v.props),Pa(z,v),z.return=m,m=z;break l}e(m,d);break}else t(m,d);d=d.sibling}v.type===tl?(z=He(v.props.children,m.mode,z,v.key),z.return=m,m=z):(z=Iu(v.type,v.key,v.props,null,m.mode,z),Pa(z,v),z.return=m,m=z)}return i(m);case pl:l:{for(Y=v.key;d!==null;){if(d.key===Y)if(d.tag===4&&d.stateNode.containerInfo===v.containerInfo&&d.stateNode.implementation===v.implementation){e(m,d.sibling),z=u(d,v.children||[]),z.return=m,m=z;break l}else{e(m,d);break}else t(m,d);d=d.sibling}z=Bi(v,m.mode,z),z.return=m,m=z}return i(m);case Vl:return v=qe(v),dl(m,d,v,z)}if(Tt(v))return w(m,d,v,z);if(Zl(v)){if(Y=Zl(v),typeof Y!="function")throw Error(o(150));return v=Y.call(v),G(m,d,v,z)}if(typeof v.then=="function")return dl(m,d,nn(v),z);if(v.$$typeof===Yl)return dl(m,d,tn(m,v),z);cn(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,d!==null&&d.tag===6?(e(m,d.sibling),z=u(d,v),z.return=m,m=z):(e(m,d),z=ji(v,m.mode,z),z.return=m,m=z),i(m)):e(m,d)}return function(m,d,v,z){try{Ia=0;var Y=dl(m,d,v,z);return ha=null,Y}catch(B){if(B===da||B===an)throw B;var el=at(29,B,null,m.mode);return el.lanes=z,el.return=m,el}}}var Ge=Fs(!0),Is=Fs(!1),ie=!1;function $i(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ki(l,t){l=l.updateQueue,t.updateQueue===l&&(t.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function ce(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function fe(l,t,e){var a=l.updateQueue;if(a===null)return null;if(a=a.shared,(ul&2)!==0){var u=a.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),a.pending=t,t=Fu(l),xs(l,null,e),t}return ku(l,a,t,e),Fu(l)}function lu(l,t,e){if(t=t.updateQueue,t!==null&&(t=t.shared,(e&4194048)!==0)){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,Lf(l,e)}}function Fi(l,t){var e=l.updateQueue,a=l.alternate;if(a!==null&&(a=a.updateQueue,e===a)){var u=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?u=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?u=n=t:n=n.next=t}else u=n=t;e={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:n,shared:a.shared,callbacks:a.callbacks},l.updateQueue=e;return}l=e.lastBaseUpdate,l===null?e.firstBaseUpdate=t:l.next=t,e.lastBaseUpdate=t}var Ii=!1;function tu(){if(Ii){var l=ra;if(l!==null)throw l}}function eu(l,t,e,a){Ii=!1;var u=l.updateQueue;ie=!1;var n=u.firstBaseUpdate,i=u.lastBaseUpdate,c=u.shared.pending;if(c!==null){u.shared.pending=null;var r=c,g=r.next;r.next=null,i===null?n=g:i.next=g,i=r;var _=l.alternate;_!==null&&(_=_.updateQueue,c=_.lastBaseUpdate,c!==i&&(c===null?_.firstBaseUpdate=g:c.next=g,_.lastBaseUpdate=r))}if(n!==null){var E=u.baseState;i=0,_=g=r=null,c=n;do{var b=c.lane&-536870913,S=b!==c.lane;if(S?(k&b)===b:(a&b)===b){b!==0&&b===oa&&(Ii=!0),_!==null&&(_=_.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});l:{var w=l,G=c;b=t;var dl=e;switch(G.tag){case 1:if(w=G.payload,typeof w=="function"){E=w.call(dl,E,b);break l}E=w;break l;case 3:w.flags=w.flags&-65537|128;case 0:if(w=G.payload,b=typeof w=="function"?w.call(dl,E,b):w,b==null)break l;E=q({},E,b);break l;case 2:ie=!0}}b=c.callback,b!==null&&(l.flags|=64,S&&(l.flags|=8192),S=u.callbacks,S===null?u.callbacks=[b]:S.push(b))}else S={lane:b,tag:c.tag,payload:c.payload,callback:c.callback,next:null},_===null?(g=_=S,r=E):_=_.next=S,i|=b;if(c=c.next,c===null){if(c=u.shared.pending,c===null)break;S=c,c=S.next,S.next=null,u.lastBaseUpdate=S,u.shared.pending=null}}while(!0);_===null&&(r=E),u.baseState=r,u.firstBaseUpdate=g,u.lastBaseUpdate=_,n===null&&(u.shared.lanes=0),he|=i,l.lanes=i,l.memoizedState=E}}function Ps(l,t){if(typeof l!="function")throw Error(o(191,l));l.call(t)}function lo(l,t){var e=l.callbacks;if(e!==null)for(l.callbacks=null,l=0;ln?n:8;var i=T.T,c={};T.T=c,gc(l,!1,t,e);try{var r=u(),g=T.S;if(g!==null&&g(c,r),r!==null&&typeof r=="object"&&typeof r.then=="function"){var _=_y(r,a);nu(l,t,_,ft(l))}else nu(l,t,a,ft(l))}catch(E){nu(l,t,{then:function(){},status:"rejected",reason:E},ft())}finally{R.p=n,i!==null&&c.types!==null&&(i.types=c.types),T.T=i}}function My(){}function mc(l,t,e,a){if(l.tag!==5)throw Error(o(476));var u=Ho(l).queue;Co(l,u,t,Q,e===null?My:function(){return wo(l),e(a)})}function Ho(l){var t=l.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xt,lastRenderedState:Q},next:null};var e={};return t.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xt,lastRenderedState:e},next:null},l.memoizedState=t,l=l.alternate,l!==null&&(l.memoizedState=t),t}function wo(l){var t=Ho(l);t.next===null&&(t=l.alternate.memoizedState),nu(l,t.next.queue,{},ft())}function vc(){return xl(Tu)}function xo(){return zl().memoizedState}function jo(){return zl().memoizedState}function Dy(l){for(var t=l.return;t!==null;){switch(t.tag){case 24:case 3:var e=ft();l=ce(e);var a=fe(t,l,e);a!==null&&(Il(a,t,e),lu(a,t,e)),t={cache:Zi()},l.payload=t;return}t=t.return}}function Ny(l,t,e){var a=ft();e={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},gn(l)?qo(t,e):(e=wi(l,t,e,a),e!==null&&(Il(e,l,a),Yo(e,t,a)))}function Bo(l,t,e){var a=ft();nu(l,t,e,a)}function nu(l,t,e,a){var u={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(gn(l))qo(t,u);else{var n=l.alternate;if(l.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var i=t.lastRenderedState,c=n(i,e);if(u.hasEagerState=!0,u.eagerState=c,et(c,i))return ku(l,t,u,0),yl===null&&$u(),!1}catch{}if(e=wi(l,t,u,a),e!==null)return Il(e,l,a),Yo(e,t,a),!0}return!1}function gc(l,t,e,a){if(a={lane:2,revertLane:$c(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},gn(l)){if(t)throw Error(o(479))}else t=wi(l,e,a,2),t!==null&&Il(t,l,2)}function gn(l){var t=l.alternate;return l===V||t!==null&&t===V}function qo(l,t){ma=on=!0;var e=l.pending;e===null?t.next=t:(t.next=e.next,e.next=t),l.pending=t}function Yo(l,t,e){if((e&4194048)!==0){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,Lf(l,e)}}var iu={readContext:xl,use:hn,useCallback:bl,useContext:bl,useEffect:bl,useImperativeHandle:bl,useLayoutEffect:bl,useInsertionEffect:bl,useMemo:bl,useReducer:bl,useRef:bl,useState:bl,useDebugValue:bl,useDeferredValue:bl,useTransition:bl,useSyncExternalStore:bl,useId:bl,useHostTransitionStatus:bl,useFormState:bl,useActionState:bl,useOptimistic:bl,useMemoCache:bl,useCacheRefresh:bl};iu.useEffectEvent=bl;var Go={readContext:xl,use:hn,useCallback:function(l,t){return Xl().memoizedState=[l,t===void 0?null:t],l},useContext:xl,useEffect:zo,useImperativeHandle:function(l,t,e){e=e!=null?e.concat([l]):null,mn(4194308,4,Mo.bind(null,t,l),e)},useLayoutEffect:function(l,t){return mn(4194308,4,l,t)},useInsertionEffect:function(l,t){mn(4,2,l,t)},useMemo:function(l,t){var e=Xl();t=t===void 0?null:t;var a=l();if(Qe){Pt(!0);try{l()}finally{Pt(!1)}}return e.memoizedState=[a,t],a},useReducer:function(l,t,e){var a=Xl();if(e!==void 0){var u=e(t);if(Qe){Pt(!0);try{e(t)}finally{Pt(!1)}}}else u=t;return a.memoizedState=a.baseState=u,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},a.queue=l,l=l.dispatch=Ny.bind(null,V,l),[a.memoizedState,l]},useRef:function(l){var t=Xl();return l={current:l},t.memoizedState=l},useState:function(l){l=oc(l);var t=l.queue,e=Bo.bind(null,V,t);return t.dispatch=e,[l.memoizedState,e]},useDebugValue:hc,useDeferredValue:function(l,t){var e=Xl();return yc(e,l,t)},useTransition:function(){var l=oc(!1);return l=Co.bind(null,V,l.queue,!0,!1),Xl().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,t,e){var a=V,u=Xl();if(P){if(e===void 0)throw Error(o(407));e=e()}else{if(e=t(),yl===null)throw Error(o(349));(k&127)!==0||io(a,t,e)}u.memoizedState=e;var n={value:e,getSnapshot:t};return u.queue=n,zo(fo.bind(null,a,n,l),[l]),a.flags|=2048,ga(9,{destroy:void 0},co.bind(null,a,n,e,t),null),e},useId:function(){var l=Xl(),t=yl.identifierPrefix;if(P){var e=Ut,a=Nt;e=(a&~(1<<32-tt(a)-1)).toString(32)+e,t="_"+t+"R_"+e,e=rn++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?n.multiple=!0:a.size&&(n.size=a.size);break;default:n=typeof a.is=="string"?i.createElement(u,{is:a.is}):i.createElement(u)}}n[Hl]=t,n[Kl]=a;l:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break l;for(;i.sibling===null;){if(i.return===null||i.return===t)break l;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=n;l:switch(Bl(n,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break l;case"img":a=!0;break l;default:a=!1}a&&Vt(t)}}return vl(t),Rc(t,t.type,l===null?null:l.memoizedProps,t.pendingProps,e),null;case 6:if(l&&t.stateNode!=null)l.memoizedProps!==a&&Vt(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(l=J.current,fa(t)){if(l=t.stateNode,e=t.memoizedProps,a=null,u=wl,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}l[Hl]=t,l=!!(l.nodeValue===e||a!==null&&a.suppressHydrationWarning===!0||nd(l.nodeValue,e)),l||ue(t,!0)}else l=Bn(l).createTextNode(a),l[Hl]=t,t.stateNode=l}return vl(t),null;case 31:if(e=t.memoizedState,l===null||l.memoizedState!==null){if(a=fa(t),e!==null){if(l===null){if(!a)throw Error(o(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(557));l[Hl]=t}else we(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vl(t),l=!1}else e=Qi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=e),l=!0;if(!l)return t.flags&256?(nt(t),t):(nt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return vl(t),null;case 13:if(a=t.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(u=fa(t),a!==null&&a.dehydrated!==null){if(l===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Hl]=t}else we(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vl(t),u=!1}else u=Qi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(nt(t),t):(nt(t),null)}return nt(t),(t.flags&128)!==0?(t.lanes=e,t):(e=a!==null,l=l!==null&&l.memoizedState!==null,e&&(a=t.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==u&&(a.flags|=2048)),e!==l&&e&&(t.child.flags|=8192),Tn(t,t.updateQueue),vl(t),null);case 4:return _l(),l===null&&Pc(t.stateNode.containerInfo),vl(t),null;case 10:return Gt(t.type),vl(t),null;case 19:if(O(Tl),a=t.memoizedState,a===null)return vl(t),null;if(u=(t.flags&128)!==0,n=a.rendering,n===null)if(u)fu(a,!1);else{if(Sl!==0||l!==null&&(l.flags&128)!==0)for(l=t.child;l!==null;){if(n=sn(l),n!==null){for(t.flags|=128,fu(a,!1),l=n.updateQueue,t.updateQueue=l,Tn(t,l),t.subtreeFlags=0,l=e,e=t.child;e!==null;)js(e,l),e=e.sibling;return C(Tl,Tl.current&1|2),P&&qt(t,a.treeForkCount),t.child}l=l.sibling}a.tail!==null&&Pl()>Mn&&(t.flags|=128,u=!0,fu(a,!1),t.lanes=4194304)}else{if(!u)if(l=sn(n),l!==null){if(t.flags|=128,u=!0,l=l.updateQueue,t.updateQueue=l,Tn(t,l),fu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!n.alternate&&!P)return vl(t),null}else 2*Pl()-a.renderingStartTime>Mn&&e!==536870912&&(t.flags|=128,u=!0,fu(a,!1),t.lanes=4194304);a.isBackwards?(n.sibling=t.child,t.child=n):(l=a.last,l!==null?l.sibling=n:t.child=n,a.last=n)}return a.tail!==null?(l=a.tail,a.rendering=l,a.tail=l.sibling,a.renderingStartTime=Pl(),l.sibling=null,e=Tl.current,C(Tl,u?e&1|2:e&1),P&&qt(t,a.treeForkCount),l):(vl(t),null);case 22:case 23:return nt(t),lc(),a=t.memoizedState!==null,l!==null?l.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(e&536870912)!==0&&(t.flags&128)===0&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),e=t.updateQueue,e!==null&&Tn(t,e.retryQueue),e=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(e=l.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==e&&(t.flags|=2048),l!==null&&O(Be),null;case 24:return e=null,l!==null&&(e=l.memoizedState.cache),t.memoizedState.cache!==e&&(t.flags|=2048),Gt(Al),vl(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function wy(l,t){switch(Yi(t),t.tag){case 1:return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 3:return Gt(Al),_l(),l=t.flags,(l&65536)!==0&&(l&128)===0?(t.flags=l&-65537|128,t):null;case 26:case 27:case 5:return Cu(t),null;case 31:if(t.memoizedState!==null){if(nt(t),t.alternate===null)throw Error(o(340));we()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 13:if(nt(t),l=t.memoizedState,l!==null&&l.dehydrated!==null){if(t.alternate===null)throw Error(o(340));we()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 19:return O(Tl),null;case 4:return _l(),null;case 10:return Gt(t.type),null;case 22:case 23:return nt(t),lc(),l!==null&&O(Be),l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 24:return Gt(Al),null;case 25:return null;default:return null}}function or(l,t){switch(Yi(t),t.tag){case 3:Gt(Al),_l();break;case 26:case 27:case 5:Cu(t);break;case 4:_l();break;case 31:t.memoizedState!==null&&nt(t);break;case 13:nt(t);break;case 19:O(Tl);break;case 10:Gt(t.type);break;case 22:case 23:nt(t),lc(),l!==null&&O(Be);break;case 24:Gt(Al)}}function su(l,t){try{var e=t.updateQueue,a=e!==null?e.lastEffect:null;if(a!==null){var u=a.next;e=u;do{if((e.tag&l)===l){a=void 0;var n=e.create,i=e.inst;a=n(),i.destroy=a}e=e.next}while(e!==u)}}catch(c){fl(t,t.return,c)}}function re(l,t,e){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var n=u.next;a=n;do{if((a.tag&l)===l){var i=a.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,u=t;var r=e,g=c;try{g()}catch(_){fl(u,r,_)}}}a=a.next}while(a!==n)}}catch(_){fl(t,t.return,_)}}function rr(l){var t=l.updateQueue;if(t!==null){var e=l.stateNode;try{lo(t,e)}catch(a){fl(l,l.return,a)}}}function dr(l,t,e){e.props=Xe(l.type,l.memoizedProps),e.state=l.memoizedState;try{e.componentWillUnmount()}catch(a){fl(l,t,a)}}function ou(l,t){try{var e=l.ref;if(e!==null){switch(l.tag){case 26:case 27:case 5:var a=l.stateNode;break;case 30:a=l.stateNode;break;default:a=l.stateNode}typeof e=="function"?l.refCleanup=e(a):e.current=a}}catch(u){fl(l,t,u)}}function Rt(l,t){var e=l.ref,a=l.refCleanup;if(e!==null)if(typeof a=="function")try{a()}catch(u){fl(l,t,u)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(u){fl(l,t,u)}else e.current=null}function hr(l){var t=l.type,e=l.memoizedProps,a=l.stateNode;try{l:switch(t){case"button":case"input":case"select":case"textarea":e.autoFocus&&a.focus();break l;case"img":e.src?a.src=e.src:e.srcSet&&(a.srcset=e.srcSet)}}catch(u){fl(l,l.return,u)}}function Cc(l,t,e){try{var a=l.stateNode;em(a,l.type,e,t),a[Kl]=t}catch(u){fl(l,l.return,u)}}function yr(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&be(l.type)||l.tag===4}function Hc(l){l:for(;;){for(;l.sibling===null;){if(l.return===null||yr(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&be(l.type)||l.flags&2||l.child===null||l.tag===4)continue l;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function wc(l,t,e){var a=l.tag;if(a===5||a===6)l=l.stateNode,t?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(l,t):(t=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,t.appendChild(l),e=e._reactRootContainer,e!=null||t.onclick!==null||(t.onclick=xt));else if(a!==4&&(a===27&&be(l.type)&&(e=l.stateNode,t=null),l=l.child,l!==null))for(wc(l,t,e),l=l.sibling;l!==null;)wc(l,t,e),l=l.sibling}function zn(l,t,e){var a=l.tag;if(a===5||a===6)l=l.stateNode,t?e.insertBefore(l,t):e.appendChild(l);else if(a!==4&&(a===27&&be(l.type)&&(e=l.stateNode),l=l.child,l!==null))for(zn(l,t,e),l=l.sibling;l!==null;)zn(l,t,e),l=l.sibling}function mr(l){var t=l.stateNode,e=l.memoizedProps;try{for(var a=l.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Bl(t,a,e),t[Hl]=l,t[Kl]=e}catch(n){fl(l,l.return,n)}}var Zt=!1,Ml=!1,xc=!1,vr=typeof WeakSet=="function"?WeakSet:Set,Rl=null;function xy(l,t){if(l=l.containerInfo,ef=Vn,l=Ms(l),Di(l)){if("selectionStart"in l)var e={start:l.selectionStart,end:l.selectionEnd};else l:{e=(e=l.ownerDocument)&&e.defaultView||window;var a=e.getSelection&&e.getSelection();if(a&&a.rangeCount!==0){e=a.anchorNode;var u=a.anchorOffset,n=a.focusNode;a=a.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break l}var i=0,c=-1,r=-1,g=0,_=0,E=l,b=null;t:for(;;){for(var S;E!==e||u!==0&&E.nodeType!==3||(c=i+u),E!==n||a!==0&&E.nodeType!==3||(r=i+a),E.nodeType===3&&(i+=E.nodeValue.length),(S=E.firstChild)!==null;)b=E,E=S;for(;;){if(E===l)break t;if(b===e&&++g===u&&(c=i),b===n&&++_===a&&(r=i),(S=E.nextSibling)!==null)break;E=b,b=E.parentNode}E=S}e=c===-1||r===-1?null:{start:c,end:r}}else e=null}e=e||{start:0,end:0}}else e=null;for(af={focusedElem:l,selectionRange:e},Vn=!1,Rl=t;Rl!==null;)if(t=Rl,l=t.child,(t.subtreeFlags&1028)!==0&&l!==null)l.return=t,Rl=l;else for(;Rl!==null;){switch(t=Rl,n=t.alternate,l=t.flags,t.tag){case 0:if((l&4)!==0&&(l=t.updateQueue,l=l!==null?l.events:null,l!==null))for(e=0;e title"))),Bl(n,a,e),n[Hl]=l,Ul(n),a=n;break l;case"link":var i=Td("link","href",u).get(a+(e.href||""));if(i){for(var c=0;cdl&&(i=dl,dl=G,G=i);var m=Es(c,G),d=Es(c,dl);if(m&&d&&(S.rangeCount!==1||S.anchorNode!==m.node||S.anchorOffset!==m.offset||S.focusNode!==d.node||S.focusOffset!==d.offset)){var v=E.createRange();v.setStart(m.node,m.offset),S.removeAllRanges(),G>dl?(S.addRange(v),S.extend(d.node,d.offset)):(v.setEnd(d.node,d.offset),S.addRange(v))}}}}for(E=[],S=c;S=S.parentNode;)S.nodeType===1&&E.push({element:S,left:S.scrollLeft,top:S.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;ce?32:e,T.T=null,e=Xc,Xc=null;var n=me,i=kt;if(Nl=0,Ta=me=null,kt=0,(ul&6)!==0)throw Error(o(331));var c=ul;if(ul|=4,Mr(n.current),Ar(n,n.current,i,e),ul=c,vu(0,!1),lt&&typeof lt.onPostCommitFiberRoot=="function")try{lt.onPostCommitFiberRoot(wa,n)}catch{}return!0}finally{R.p=u,T.T=a,Zr(l,t)}}function Jr(l,t,e){t=yt(e,t),t=_c(l.stateNode,t,2),l=fe(l,t,2),l!==null&&(ja(l,2),Ct(l))}function fl(l,t,e){if(l.tag===3)Jr(l,l,e);else for(;t!==null;){if(t.tag===3){Jr(t,l,e);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ye===null||!ye.has(a))){l=yt(e,l),e=Wo(2),a=fe(t,e,2),a!==null&&($o(e,a,t,l),ja(a,2),Ct(a));break}}t=t.return}}function Kc(l,t,e){var a=l.pingCache;if(a===null){a=l.pingCache=new qy;var u=new Set;a.set(t,u)}else u=a.get(t),u===void 0&&(u=new Set,a.set(t,u));u.has(e)||(qc=!0,u.add(e),l=Ly.bind(null,l,t,e),t.then(l,l))}function Ly(l,t,e){var a=l.pingCache;a!==null&&a.delete(t),l.pingedLanes|=l.suspendedLanes&e,l.warmLanes&=~e,yl===l&&(k&e)===e&&(Sl===4||Sl===3&&(k&62914560)===k&&300>Pl()-On?(ul&2)===0&&za(l,0):Yc|=e,_a===k&&(_a=0)),Ct(l)}function Wr(l,t){t===0&&(t=Qf()),l=Ce(l,t),l!==null&&(ja(l,t),Ct(l))}function Vy(l){var t=l.memoizedState,e=0;t!==null&&(e=t.retryLane),Wr(l,e)}function Zy(l,t){var e=0;switch(l.tag){case 31:case 13:var a=l.stateNode,u=l.memoizedState;u!==null&&(e=u.retryLane);break;case 19:a=l.stateNode;break;case 22:a=l.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),Wr(l,e)}function Ky(l,t){return ni(l,t)}var Hn=null,Ea=null,Jc=!1,wn=!1,Wc=!1,ge=0;function Ct(l){l!==Ea&&l.next===null&&(Ea===null?Hn=Ea=l:Ea=Ea.next=l),wn=!0,Jc||(Jc=!0,Wy())}function vu(l,t){if(!Wc&&wn){Wc=!0;do for(var e=!1,a=Hn;a!==null;){if(l!==0){var u=a.pendingLanes;if(u===0)var n=0;else{var i=a.suspendedLanes,c=a.pingedLanes;n=(1<<31-tt(42|l)+1)-1,n&=u&~(i&~c),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Ir(a,n))}else n=k,n=Bu(a,a===yl?n:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(n&3)===0||xa(a,n)||(e=!0,Ir(a,n));a=a.next}while(e);Wc=!1}}function Jy(){$r()}function $r(){wn=Jc=!1;var l=0;ge!==0&&um()&&(l=ge);for(var t=Pl(),e=null,a=Hn;a!==null;){var u=a.next,n=kr(a,t);n===0?(a.next=null,e===null?Hn=u:e.next=u,u===null&&(Ea=e)):(e=a,(l!==0||(n&3)!==0)&&(wn=!0)),a=u}Nl!==0&&Nl!==5||vu(l),ge!==0&&(ge=0)}function kr(l,t){for(var e=l.suspendedLanes,a=l.pingedLanes,u=l.expirationTimes,n=l.pendingLanes&-62914561;0c)break;var _=r.transferSize,E=r.initiatorType;_&&id(E)&&(r=r.responseEnd,i+=_*(r"u"?null:document;function bd(l,t,e){var a=Oa;if(a&&typeof t=="string"&&t){var u=dt(t);u='link[rel="'+l+'"][href="'+u+'"]',typeof e=="string"&&(u+='[crossorigin="'+e+'"]'),gd.has(u)||(gd.add(u),l={rel:l,crossOrigin:e,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),Bl(t,"link",l),Ul(t),a.head.appendChild(t)))}}function hm(l){Ft.D(l),bd("dns-prefetch",l,null)}function ym(l,t){Ft.C(l,t),bd("preconnect",l,t)}function mm(l,t,e){Ft.L(l,t,e);var a=Oa;if(a&&l&&t){var u='link[rel="preload"][as="'+dt(t)+'"]';t==="image"&&e&&e.imageSrcSet?(u+='[imagesrcset="'+dt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(u+='[imagesizes="'+dt(e.imageSizes)+'"]')):u+='[href="'+dt(l)+'"]';var n=u;switch(t){case"style":n=Ma(l);break;case"script":n=Da(l)}pt.has(n)||(l=q({rel:"preload",href:t==="image"&&e&&e.imageSrcSet?void 0:l,as:t},e),pt.set(n,l),a.querySelector(u)!==null||t==="style"&&a.querySelector(pu(n))||t==="script"&&a.querySelector(_u(n))||(t=a.createElement("link"),Bl(t,"link",l),Ul(t),a.head.appendChild(t)))}}function vm(l,t){Ft.m(l,t);var e=Oa;if(e&&l){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+dt(a)+'"][href="'+dt(l)+'"]',n=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=Da(l)}if(!pt.has(n)&&(l=q({rel:"modulepreload",href:l},t),pt.set(n,l),e.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(_u(n)))return}a=e.createElement("link"),Bl(a,"link",l),Ul(a),e.head.appendChild(a)}}}function gm(l,t,e){Ft.S(l,t,e);var a=Oa;if(a&&l){var u=$e(a).hoistableStyles,n=Ma(l);t=t||"default";var i=u.get(n);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(pu(n)))c.loading=5;else{l=q({rel:"stylesheet",href:l,"data-precedence":t},e),(e=pt.get(n))&&rf(l,e);var r=i=a.createElement("link");Ul(r),Bl(r,"link",l),r._p=new Promise(function(g,_){r.onload=g,r.onerror=_}),r.addEventListener("load",function(){c.loading|=1}),r.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Yn(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:c},u.set(n,i)}}}function bm(l,t){Ft.X(l,t);var e=Oa;if(e&&l){var a=$e(e).hoistableScripts,u=Da(l),n=a.get(u);n||(n=e.querySelector(_u(u)),n||(l=q({src:l,async:!0},t),(t=pt.get(u))&&df(l,t),n=e.createElement("script"),Ul(n),Bl(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Sm(l,t){Ft.M(l,t);var e=Oa;if(e&&l){var a=$e(e).hoistableScripts,u=Da(l),n=a.get(u);n||(n=e.querySelector(_u(u)),n||(l=q({src:l,async:!0,type:"module"},t),(t=pt.get(u))&&df(l,t),n=e.createElement("script"),Ul(n),Bl(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Sd(l,t,e,a){var u=(u=J.current)?qn(u):null;if(!u)throw Error(o(446));switch(l){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(t=Ma(e.href),e=$e(u).hoistableStyles,a=e.get(t),a||(a={type:"style",instance:null,count:0,state:null},e.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){l=Ma(e.href);var n=$e(u).hoistableStyles,i=n.get(l);if(i||(u=u.ownerDocument||u,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(l,i),(n=u.querySelector(pu(l)))&&!n._p&&(i.instance=n,i.state.loading=5),pt.has(l)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},pt.set(l,e),n||pm(u,l,e,i.state))),t&&a===null)throw Error(o(528,""));return i}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=e.async,e=e.src,typeof e=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Da(e),e=$e(u).hoistableScripts,a=e.get(t),a||(a={type:"script",instance:null,count:0,state:null},e.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,l))}}function Ma(l){return'href="'+dt(l)+'"'}function pu(l){return'link[rel="stylesheet"]['+l+"]"}function pd(l){return q({},l,{"data-precedence":l.precedence,precedence:null})}function pm(l,t,e,a){l.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=l.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Bl(t,"link",e),Ul(t),l.head.appendChild(t))}function Da(l){return'[src="'+dt(l)+'"]'}function _u(l){return"script[async]"+l}function _d(l,t,e){if(t.count++,t.instance===null)switch(t.type){case"style":var a=l.querySelector('style[data-href~="'+dt(e.href)+'"]');if(a)return t.instance=a,Ul(a),a;var u=q({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(l.ownerDocument||l).createElement("style"),Ul(a),Bl(a,"style",u),Yn(a,e.precedence,l),t.instance=a;case"stylesheet":u=Ma(e.href);var n=l.querySelector(pu(u));if(n)return t.state.loading|=4,t.instance=n,Ul(n),n;a=pd(e),(u=pt.get(u))&&rf(a,u),n=(l.ownerDocument||l).createElement("link"),Ul(n);var i=n;return i._p=new Promise(function(c,r){i.onload=c,i.onerror=r}),Bl(n,"link",a),t.state.loading|=4,Yn(n,e.precedence,l),t.instance=n;case"script":return n=Da(e.src),(u=l.querySelector(_u(n)))?(t.instance=u,Ul(u),u):(a=e,(u=pt.get(n))&&(a=q({},e),df(a,u)),l=l.ownerDocument||l,u=l.createElement("script"),Ul(u),Bl(u,"link",a),l.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Yn(a,e.precedence,l));return t.instance}function Yn(l,t,e){for(var a=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,n=u,i=0;i title"):null)}function _m(l,t,e){if(e===1||t.itemProp!=null)return!1;switch(l){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;return t.rel==="stylesheet"?(l=t.disabled,typeof t.precedence=="string"&&l==null):!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 Ad(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function Tm(l,t,e,a){if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var u=Ma(a.href),n=t.querySelector(pu(u));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Qn.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=n,Ul(n);return}n=t.ownerDocument||t,a=pd(a),(u=pt.get(u))&&rf(a,u),n=n.createElement("link"),Ul(n);var i=n;i._p=new Promise(function(c,r){i.onload=c,i.onerror=r}),Bl(n,"link",a),e.instance=n}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=Qn.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}var hf=0;function zm(l,t){return l.stylesheets&&l.count===0&&Ln(l,l.stylesheets),0hf?50:800)+t);return l.unsuspend=e,function(){l.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Qn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ln(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Xn=null;function Ln(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Xn=new Map,t.forEach(Am,l),Xn=null,Qn.call(l))}function Am(l,t){if(!(t.state.loading&4)){var e=Xn.get(l);if(e)var a=e.get(null);else{e=new Map,Xn.set(l,e);for(var u=l.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(f){console.error(f)}}return s(),Af.exports=Wm(),Af.exports}var km=$m();function Fm(){return{currentState(){return M("current_state")},setPin(s){return M("set_pin",{pin:s})},acceptStay(){return M("accept_stay")},dismissCandidate(){return M("dismiss_candidate")},stopGuarding(){return M("stop_guarding")},submitPin(s){return M("submit_pin",{pin:s})},async subscribe(s){const f=await Cf("stay-state-changed",y=>{s(y.payload.view)});return()=>{f()}}}}function Df(s){return s instanceof Error?s.message:typeof s=="string"?s:"Stay could not complete that action."}function nh(s){return{zoom:"Zoom",google_meet:"Google Meet",microsoft_teams:"Microsoft Teams",facetime:"FaceTime",webex:"Webex",slack_huddle:"Slack huddle"}[s]}function xf(s){return s.title||s.app_name}function Im({meeting:s,error:f,onStop:y}){return N.jsxs("section",{className:"mode-panel mode-panel-active",children:[N.jsx("p",{className:"kicker",children:"Stay is on"}),N.jsx("h2",{children:xf(s.window)||`${nh(s.app)} is protected.`}),N.jsx("p",{className:"muted",children:"Keep the hour you agreed to."}),N.jsx("div",{className:"action-row",children:N.jsx("button",{type:"button",className:"ghost strong-ghost",onClick:y,children:"Stop"})}),N.jsx("p",{className:"error-line",role:"status",children:f})]})}const Pd=7600,Pm=1200,l0=[5,12.5,20,27.5,35,42.5,50,57.5,65,72.5,80,87.5,95],Nf=[-18,-6,6,18,30,42,54,66,78,90,102,114],t0=l0.flatMap((s,f)=>Nf.map((y,o)=>{const A=f*Nf.length+o,U=A%4===0,H=A%11===0?"accent":A%3===0?"warm":"neutral",x=3600+A%8*210,D=(o%3-1)*1.8,p=(f%4-1.5)*1.6;return{kind:U?"dot":"bar",tone:H,width:U?6+A%5*2:34+A%8*10,height:U?6+A%5*2:5+A%3,x:`${y+p}vw`,y:`${s+D}vh`,driftX:`${38+A%6*5}vw`,driftY:`${(A%7-3)*.55}vh`,delayMs:-Math.round((o+1)/Nf.length*x)+f*34,durationMs:x}})),e0=t0.map((s,f)=>({id:`signal-${f+1}`,...s})),a0=[{id:"top-left-dot",kind:"dot",tone:"neutral",placement:"top-left-dot"},{id:"top-left-bar",kind:"bar",tone:"neutral",placement:"top-left-bar"},{id:"top-center-dot",kind:"dot",tone:"neutral",placement:"top-center-dot"},{id:"top-right-bar",kind:"bar",tone:"neutral",placement:"top-right-bar"},{id:"upper-warm-left",kind:"bar",tone:"warm",placement:"upper-warm-left"},{id:"upper-warm-dot",kind:"dot",tone:"warm",placement:"upper-warm-dot"},{id:"upper-warm-right",kind:"bar",tone:"warm",placement:"upper-warm-right"},{id:"mid-left-bar",kind:"bar",tone:"neutral",placement:"mid-left-bar"},{id:"mid-right-bar",kind:"bar",tone:"neutral",placement:"mid-right-bar"},{id:"lower-left-bar",kind:"bar",tone:"neutral",placement:"lower-left-bar"},{id:"lower-left-dot",kind:"dot",tone:"neutral",placement:"lower-left-dot"},{id:"lower-right-warm",kind:"bar",tone:"warm",placement:"lower-right-warm"},{id:"lower-right-dot",kind:"dot",tone:"warm",placement:"lower-right-dot"},{id:"bottom-left-warm",kind:"bar",tone:"warm",placement:"bottom-left-warm"},{id:"bottom-neutral",kind:"bar",tone:"neutral",placement:"bottom-neutral"}];function u0({onComplete:s}){const f=Cl.useMemo(c0,[])?Pm:Pd;return Cl.useEffect(()=>{const y=window.setTimeout(s,f),o=f===Pd?f0():void 0;return()=>{window.clearTimeout(y),o?.()}},[f,s]),N.jsxs("section",{className:"launch-intro","aria-label":"Stay opening animation",style:n0(f),children:[N.jsx("div",{className:"launch-intro__grain","aria-hidden":"true"}),N.jsx("div",{className:"launch-intro__room","aria-hidden":"true"}),N.jsx("div",{className:"launch-intro__signals","aria-hidden":"true",children:e0.map(y=>N.jsx("span",{className:["launch-intro__signal",`launch-intro__signal-${y.kind}`,`launch-intro__signal-${y.tone}`].join(" "),style:i0(y)},y.id))}),N.jsxs("div",{className:"launch-intro__icon-stage","aria-hidden":"true",children:[N.jsx("div",{className:"launch-intro__tile"}),N.jsx("div",{className:"launch-intro__icon-pattern",children:a0.map(y=>N.jsx("span",{className:["launch-intro__icon-mark",`launch-intro__icon-mark-${y.kind}`,`launch-intro__icon-mark-${y.tone}`,`launch-intro__icon-mark--${y.placement}`].join(" ")},y.id))}),N.jsxs("div",{className:"launch-intro__connector",children:[N.jsx("span",{className:"launch-intro__connector-line"}),N.jsx("span",{className:"launch-intro__connector-dot launch-intro__connector-dot-left"}),N.jsx("span",{className:"launch-intro__connector-dot launch-intro__connector-dot-right"})]})]}),N.jsxs("div",{className:"launch-intro__copy","aria-hidden":"true",children:[N.jsx("p",{children:"Stay"}),N.jsx("span",{children:"Their hour deserves your hour."})]}),N.jsx("button",{type:"button",className:"launch-intro__skip ghost",onClick:s,children:"Skip"})]})}function n0(s){return{"--launch-duration":`${s}ms`}}function i0(s){return{"--signal-width":`${s.width}px`,"--signal-height":`${s.height}px`,"--signal-x":s.x,"--signal-y":s.y,"--signal-drift-x":s.driftX,"--signal-drift-y":s.driftY,"--signal-delay":`${s.delayMs}ms`,"--signal-duration":`${s.durationMs}ms`}}function c0(){return typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function f0(){const s=window.AudioContext??window.webkitAudioContext;if(!s)return;const f=new s,y=f.currentTime,o=f.createGain(),A=f.createBiquadFilter(),U=[];return o.gain.setValueAtTime(1e-4,y),o.gain.exponentialRampToValueAtTime(.95,y+.28),o.gain.exponentialRampToValueAtTime(.58,y+3.8),o.gain.exponentialRampToValueAtTime(1e-4,y+7.2),A.type="lowpass",A.frequency.setValueAtTime(4200,y),A.frequency.exponentialRampToValueAtTime(760,y+3.4),A.frequency.exponentialRampToValueAtTime(340,y+5.4),A.Q.setValueAtTime(.8,y),A.connect(o),o.connect(f.destination),s0(f,A,U,y),o0(f,A,U,y),r0(f,A,U,y),f.resume().catch(()=>{}),()=>{U.forEach(H=>{try{H.stop()}catch{}}),f.close().catch(()=>{})}}function s0(s,f,y,o){const A=s.createBufferSource(),U=s.createGain(),H=s.createBiquadFilter(),x=s.createBuffer(1,s.sampleRate*2,s.sampleRate),D=x.getChannelData(0);for(let p=0;p{const x=o+.18+H*.22,D=s.createOscillator(),p=s.createGain();D.type=H%3===0?"triangle":"sine",D.frequency.setValueAtTime(U,x),D.frequency.exponentialRampToValueAtTime(U*.72,x+.16),p.gain.setValueAtTime(1e-4,x),p.gain.exponentialRampToValueAtTime(.088-H*.0035,x+.03),p.gain.exponentialRampToValueAtTime(1e-4,x+.24),D.connect(p),p.connect(f),D.start(x),D.stop(x+.28),y.push(D)})}function r0(s,f,y,o){[146.83,220,293.66].forEach((U,H)=>{const x=s.createOscillator(),D=s.createGain(),p=o+2.6+H*.08;x.type="sine",x.frequency.setValueAtTime(U,p),x.detune.setValueAtTime(H===1?4:-3,p),D.gain.setValueAtTime(1e-4,p),D.gain.exponentialRampToValueAtTime(H===1?.096:.06,p+1.2),D.gain.exponentialRampToValueAtTime(1e-4,o+7.1),x.connect(D),D.connect(f),x.start(p),x.stop(o+7.3),y.push(x)})}const Uu=4;function d0(s){return s.replace(/\D/g,"").slice(0,Uu)}function li(s){return s.length===Uu}function ih({id:s,label:f,ariaLabel:y,value:o,error:A,errorId:U,onChange:H}){const x=Cl.useId(),D=Cl.useRef(null),p=s??x,K=Array.from({length:Uu},(pl,tl)=>o[tl]??""),q=Math.min(o.length,Uu-1);function ll(pl){H(d0(pl.currentTarget.value))}function Dl(){D.current?.focus()}return N.jsxs("div",{className:"pin-code-field",children:[f?N.jsx("label",{htmlFor:p,children:f}):null,N.jsxs("div",{className:"pin-code-input","data-invalid":!!A,onClick:Dl,children:[N.jsx("input",{ref:D,id:p,className:"pin-code-control","aria-label":y,inputMode:"numeric",maxLength:Uu,pattern:"[0-9]{4}",autoComplete:"off",value:o,"aria-invalid":!!A,"aria-describedby":A?U:void 0,onChange:ll}),N.jsx("div",{className:"pin-code-slots","aria-hidden":"true",children:K.map((pl,tl)=>{const ql=["pin-code-slot",pl?"pin-code-slot-filled":null,tl===q?"pin-code-slot-active":null].filter(Boolean).join(" ");return N.jsx("span",{className:ql},tl)})})]})]})}function h0({view:s,error:f,onSubmit:y}){const[o,A]=Cl.useState(""),U=f||s.last_error;async function H(x){if(x.preventDefault(),!li(o))return;await y(o)&&A("")}return N.jsxs("section",{className:"mode-panel mode-panel-active",children:[N.jsx("p",{className:"kicker",children:"Stay with the call"}),N.jsx("h2",{children:"Enter your PIN."}),N.jsxs("p",{className:"muted",children:[s.focused.app_name,s.focused.title?`: ${xf(s.focused)}`:""]}),N.jsx("form",{className:"unlock-form",noValidate:!0,onSubmit:H,children:N.jsxs("div",{className:"control-row pin-entry-row",children:[N.jsx(ih,{ariaLabel:"Unlock PIN",value:o,error:U,errorId:"unlock-error",onChange:A}),N.jsx("button",{type:"submit",disabled:!li(o),children:"Open"})]})}),N.jsx("p",{id:"unlock-error",className:"error-line",role:"status",children:U})]})}function y0({candidate:s,canAccept:f,error:y,onAccept:o,onDismiss:A}){return N.jsxs("section",{className:"mode-panel mode-panel-active",children:[N.jsx("p",{className:"kicker",children:nh(s.app)}),N.jsx("h2",{children:"Stay with this meeting?"}),N.jsx("p",{className:"muted",children:xf(s.window)||s.reason}),N.jsxs("div",{className:"action-row",children:[N.jsx("button",{type:"button",disabled:!f,onClick:o,children:"Stay"}),N.jsx("button",{type:"button",className:"ghost",onClick:A,children:"Not now"})]}),N.jsx("p",{className:"error-line",role:"status",children:y})]})}function m0({error:s,onSave:f}){const[y,o]=Cl.useState("");async function A(U){if(U.preventDefault(),!li(y))return;await f(y)&&o("")}return N.jsxs("form",{className:"pin-setup mode-panel",noValidate:!0,onSubmit:A,children:[N.jsxs("div",{className:"control-row pin-entry-row",children:[N.jsx(ih,{id:"setup-pin",label:"Set a four digit PIN",value:y,error:s,errorId:"setup-error",onChange:o}),N.jsx("button",{type:"submit",disabled:!li(y),children:"Keep"})]}),N.jsx("p",{id:"setup-error",className:"error-line",role:"status",children:s})]})}function v0({mode:s,children:f,status:y}){const o=s==="guarding",[A,U]=Cl.useState(!1),H=Cl.useRef(void 0);Cl.useEffect(()=>(o||U(!1),()=>{Uf(H.current)}),[o]);function x(){Uf(H.current),H.current=void 0,p(!0)}function D(){Uf(H.current),H.current=window.setTimeout(()=>{H.current=void 0,p(!1)},180)}function p(ll){U(ll),Ru()&&M("set_guarding_panel_expanded",{expanded:ll}).catch(()=>{})}function K(ll){ll.currentTarget.contains(ll.relatedTarget)||D()}const q=["stay-shell",`stay-shell-${s}`,o?A?"stay-shell-revealed":"stay-shell-collapsed":null].filter(Boolean).join(" ");return N.jsxs("main",{className:q,"aria-live":"polite",tabIndex:o?0:void 0,onMouseEnter:o?x:void 0,onMouseLeave:o?D:void 0,onFocusCapture:o?x:void 0,onBlurCapture:o?K:void 0,children:[N.jsxs("header",{className:"brand-strip","data-tauri-drag-region":!0,children:[N.jsxs("div",{className:"brand-label","data-tauri-drag-region":!0,children:[N.jsx("p",{className:"eyebrow","data-tauri-drag-region":!0,children:"Stay"}),N.jsx("h1",{"data-tauri-drag-region":!0,children:"Stay focused."})]}),N.jsxs("div",{className:"brand-controls",children:[y?N.jsx("span",{className:"status-pill",children:y}):null,N.jsx("button",{type:"button",className:"window-close","aria-label":"Hide Stay window",onClick:g0,children:N.jsx("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",children:N.jsx("path",{d:"M2 2L10 10M10 2L2 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]})]}),f]})}function g0(){Ru()&&Hf().hide().catch(()=>{})}function Uf(s){s!==void 0&&window.clearTimeout(s)}const ch="stay.launchIntro.v1.seen",b0="launchIntro",S0={mode:"idle",pin_configured:!1};function p0({client:s,showLaunchIntro:f}){const[y,o]=Cl.useState(S0),[A,U]=Cl.useState(!0),[H,x]=Cl.useState(null),[D,p]=Cl.useState(()=>f??T0());Cl.useEffect(()=>{let tl=!0,ql;return s.currentState().then(nl=>{tl&&o(nl)}).catch(nl=>{tl&&x({target:"mode",message:Df(nl)})}).finally(()=>{tl&&U(!1)}),s.subscribe(nl=>{o(nl),x(null)}).then(nl=>{tl?ql=nl:nl()}).catch(nl=>{tl&&x({target:"mode",message:Df(nl)})}),()=>{tl=!1,ql?.()}},[s]),Cl.useEffect(()=>{if(D)return lh(!0),()=>{lh(!1)}},[D]);const K=Cl.useMemo(()=>_0(y,A),[A,y]);async function q(tl,ql="mode"){x(null);try{const nl=await tl();return o(nl.view),nl.view.mode!=="locked"||nl.view.last_error===null}catch(nl){return x({target:ql,message:Df(nl)}),!1}}const ll=H?.target==="setup"?H.message:null,Dl=H?.target==="mode"?H.message:null,pl=Cl.useCallback(()=>{z0(),p(!1)},[]);return N.jsxs(N.Fragment,{children:[N.jsxs(v0,{mode:y.mode,status:K,children:[A?N.jsxs("section",{className:"mode-panel quiet-state",children:[N.jsx("p",{className:"kicker",children:"Opening"}),N.jsx("h2",{children:"Stay is opening."})]}):null,!A&&!y.pin_configured?N.jsx(m0,{error:ll,onSave:tl=>q(()=>s.setPin(tl),"setup")}):null,!A&&y.mode==="idle"&&y.pin_configured?N.jsxs("section",{className:"mode-panel quiet-state",children:[N.jsx("p",{className:"kicker",children:"Ready"}),N.jsx("h2",{children:"Stay is waiting."})]}):null,!A&&y.mode==="meeting_candidate"?N.jsx(y0,{candidate:y.candidate,canAccept:y.pin_configured,error:Dl,onAccept:()=>{q(()=>s.acceptStay())},onDismiss:()=>{q(()=>s.dismissCandidate())}}):null,!A&&y.mode==="guarding"?N.jsx(Im,{meeting:y.meeting,error:Dl,onStop:()=>{q(()=>s.stopGuarding())}}):null,!A&&y.mode==="locked"?N.jsx(h0,{view:y,error:Dl,onSubmit:tl=>q(()=>s.submitPin(tl))}):null]}),D?N.jsx(u0,{onComplete:pl}):null]})}function _0(s,f){if(f)return"Opening";if(!s.pin_configured)return"PIN needed";switch(s.mode){case"idle":return"Ready";case"meeting_candidate":return"Meeting";case"guarding":return"On";case"locked":return"Locked"}}function T0(){if(new URLSearchParams(window.location.search).get(b0)==="1")return!0;try{return window.localStorage.getItem(ch)!=="true"}catch{return!0}}function z0(){try{window.localStorage.setItem(ch,"true")}catch{}}async function lh(s){if(Ru())try{await M("set_launch_animation_active",{active:s})}catch{}}const Ra={app:"zoom",window:fh("zoom.us","Weekly Team Sync"),reason:"Zoom foreground window"},Ca=fh("Safari","Quarterly planning notes");function A0(s){const f=new Set,y=[];let o=null,A=s??{mode:"idle",pin_configured:!1};function U(x,D=[]){A=x;const p={view:A,commands:D};return f.forEach(K=>K(A)),p}return{commandLog:y,async currentState(){return y.push("current_state"),A},async setPin(x){if(y.push("set_pin"),!/^\d{4}$/.test(x))throw new Error("PIN must be exactly four digits");return o=x,U({mode:"idle",pin_configured:!0})},async acceptStay(){if(y.push("accept_stay"),!o)throw new Error("set a four digit PIN before turning on Stay");return U({mode:"guarding",meeting:Ra,pin_configured:!0},[{type:"begin_guarding",meeting:Ra}])},async dismissCandidate(){return y.push("dismiss_candidate"),U({mode:"idle",pin_configured:!!o},[{type:"hide_prompt"}])},async stopGuarding(){return y.push("stop_guarding"),U({mode:"idle",pin_configured:!!o},[{type:"stop_guarding"}])},async submitPin(x){if(y.push("submit_pin"),A.mode!=="locked")throw new Error("Stay is not locked right now");return x===o?U({mode:"guarding",meeting:A.meeting,pin_configured:!0},[{type:"unlock"}]):U({...A,failed_attempts:A.failed_attempts+1,last_error:"That PIN did not open Stay."},[{type:"stay_locked",failed_attempts:A.failed_attempts+1}])},async subscribe(x){return f.add(x),()=>{f.delete(x)}},emitView(x){return U(x)},focusMeeting(){return U({mode:"meeting_candidate",candidate:Ra,pin_configured:!!o},[{type:"show_prompt",candidate:Ra}])},focusAway(){return U({mode:"locked",meeting:Ra,focused:{app_name:Ca.app_name,title:Ca.title,bounds:Ca.bounds},failed_attempts:0,pin_configured:!!o,last_error:null},[{type:"show_lock",meeting:Ra,focused:{app_name:Ca.app_name,title:Ca.title,bounds:Ca.bounds}}])},view(){return A}}}function fh(s,f){return{app_name:s,title:f,process_id:null,window_id:null,process_path:null,bounds:{x:96,y:88,width:680,height:420}}}const sh=document.querySelector("#root");if(!sh)throw new Error("Stay root element is missing");km.createRoot(sh).render(N.jsx(Cl.StrictMode,{children:O0()==="guard-border"?N.jsx(E0,{}):N.jsx(p0,{client:M0()})}));function E0(){return N.jsx("div",{className:"guard-border-surface","aria-hidden":"true",children:N.jsx("div",{className:"guard-border-frame"})})}function O0(){if(new URLSearchParams(window.location.search).get("surface")==="guard-border")return"guard-border";if(!Ru())return"main";try{return Hf().label==="guard-border"?"guard-border":"main"}catch{return"main"}}function M0(){if(window.__STAY_CLIENT__)return window.__STAY_CLIENT__;if(Ru()||window.__TAURI__||window.__TAURI_INTERNALS__)return Fm();const s=A0();return window.__STAY_CLIENT__=s,window.__stayMock=s,s} +`+a.stack}}var ui=Object.prototype.hasOwnProperty,ni=s.unstable_scheduleCallback,ii=s.unstable_cancelCallback,rh=s.unstable_shouldYield,dh=s.unstable_requestPaint,tt=s.unstable_now,hh=s.unstable_getCurrentPriorityLevel,qf=s.unstable_ImmediatePriority,Yf=s.unstable_UserBlockingPriority,Hu=s.unstable_NormalPriority,yh=s.unstable_LowPriority,Gf=s.unstable_IdlePriority,mh=s.log,vh=s.unstable_setDisableYieldValue,wa=null,et=null;function Pt(l){if(typeof mh=="function"&&vh(l),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(wa,l)}catch{}}var at=Math.clz32?Math.clz32:Sh,gh=Math.log,bh=Math.LN2;function Sh(l){return l>>>=0,l===0?32:31-(gh(l)/bh|0)|0}var wu=256,xu=262144,ju=4194304;function Me(l){var t=l&42;if(t!==0)return t;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Bu(l,t,e){var a=l.pendingLanes;if(a===0)return 0;var u=0,n=l.suspendedLanes,i=l.pingedLanes;l=l.warmLanes;var c=a&134217727;return c!==0?(a=c&~n,a!==0?u=Me(a):(i&=c,i!==0?u=Me(i):e||(e=c&~l,e!==0&&(u=Me(e))))):(c=a&~n,c!==0?u=Me(c):i!==0?u=Me(i):e||(e=a&~l,e!==0&&(u=Me(e)))),u===0?0:t!==0&&t!==u&&(t&n)===0&&(n=u&-u,e=t&-t,n>=e||n===32&&(e&4194048)!==0)?t:u}function xa(l,t){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&t)===0}function ph(l,t){switch(l){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 Qf(){var l=ju;return ju<<=1,(ju&62914560)===0&&(ju=4194304),l}function ci(l){for(var t=[],e=0;31>e;e++)t.push(l);return t}function ja(l,t){l.pendingLanes|=t,t!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function _h(l,t,e,a,u,n){var i=l.pendingLanes;l.pendingLanes=e,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=e,l.entangledLanes&=e,l.errorRecoveryDisabledLanes&=e,l.shellSuspendCounter=0;var c=l.entanglements,r=l.expirationTimes,g=l.hiddenUpdates;for(e=i&~e;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var Mh=/[\n"\\]/g;function ht(l){return l.replace(Mh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function hi(l,t,e,a,u,n,i,c){l.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?l.type=i:l.removeAttribute("type"),t!=null?i==="number"?(t===0&&l.value===""||l.value!=t)&&(l.value=""+dt(t)):l.value!==""+dt(t)&&(l.value=""+dt(t)):i!=="submit"&&i!=="reset"||l.removeAttribute("value"),t!=null?yi(l,i,dt(t)):e!=null?yi(l,i,dt(e)):a!=null&&l.removeAttribute("value"),u==null&&n!=null&&(l.defaultChecked=!!n),u!=null&&(l.checked=u&&typeof u!="function"&&typeof u!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?l.name=""+dt(c):l.removeAttribute("name")}function ls(l,t,e,a,u,n,i,c){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(l.type=n),t!=null||e!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){di(l);return}e=e!=null?""+dt(e):"",t=t!=null?""+dt(t):e,c||t===l.value||(l.value=t),l.defaultValue=t}a=a??u,a=typeof a!="function"&&typeof a!="symbol"&&!!a,l.checked=c?l.checked:!!a,l.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(l.name=i),di(l)}function yi(l,t,e){t==="number"&&Gu(l.ownerDocument)===l||l.defaultValue===""+e||(l.defaultValue=""+e)}function Fe(l,t,e,a){if(l=l.options,t){t={};for(var u=0;u"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Si=!1;if(Bt)try{var Ga={};Object.defineProperty(Ga,"passive",{get:function(){Si=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{Si=!1}var te=null,pi=null,Xu=null;function cs(){if(Xu)return Xu;var l,t=pi,e=t.length,a,u="value"in te?te.value:te.textContent,n=u.length;for(l=0;l=La),hs=" ",ys=!1;function ms(l,t){switch(l){case"keyup":return ty.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vs(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var ta=!1;function ay(l,t){switch(l){case"compositionend":return vs(t);case"keypress":return t.which!==32?null:(ys=!0,hs);case"textInput":return l=t.data,l===hs&&ys?null:l;default:return null}}function uy(l,t){if(ta)return l==="compositionend"||!Ei&&ms(l,t)?(l=cs(),Xu=pi=te=null,ta=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:e,offset:t-l};l=a}l:{for(;e;){if(e.nextSibling){e=e.nextSibling;break l}e=e.parentNode}e=void 0}e=As(e)}}function Os(l,t){return l&&t?l===t?!0:l&&l.nodeType===3?!1:t&&t.nodeType===3?Os(l,t.parentNode):"contains"in l?l.contains(t):l.compareDocumentPosition?!!(l.compareDocumentPosition(t)&16):!1:!1}function Ms(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var t=Gu(l.document);t instanceof l.HTMLIFrameElement;){try{var e=typeof t.contentWindow.location.href=="string"}catch{e=!1}if(e)l=t.contentWindow;else break;t=Gu(l.document)}return t}function Di(l){var t=l&&l.nodeName&&l.nodeName.toLowerCase();return t&&(t==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||t==="textarea"||l.contentEditable==="true")}var dy=Bt&&"documentMode"in document&&11>=document.documentMode,ea=null,Ni=null,Ja=null,Ui=!1;function Ds(l,t,e){var a=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Ui||ea==null||ea!==Gu(a)||(a=ea,"selectionStart"in a&&Di(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}),Ja&&Ka(Ja,a)||(Ja=a,a=jn(Ni,"onSelect"),0>=i,u-=i,Ut=1<<32-at(t)+u|e<Z?(F=B,B=null):F=B.sibling;var el=b(m,B,v[Z],z);if(el===null){B===null&&(B=F);break}l&&B&&el.alternate===null&&t(m,B),d=n(el,d,Z),tl===null?Y=el:tl.sibling=el,tl=el,B=F}if(Z===v.length)return e(m,B),P&&Yt(m,Z),Y;if(B===null){for(;ZZ?(F=B,B=null):F=B.sibling;var ze=b(m,B,el.value,z);if(ze===null){B===null&&(B=F);break}l&&B&&ze.alternate===null&&t(m,B),d=n(ze,d,Z),tl===null?Y=ze:tl.sibling=ze,tl=ze,B=F}if(el.done)return e(m,B),P&&Yt(m,Z),Y;if(B===null){for(;!el.done;Z++,el=v.next())el=A(m,el.value,z),el!==null&&(d=n(el,d,Z),tl===null?Y=el:tl.sibling=el,tl=el);return P&&Yt(m,Z),Y}for(B=a(B);!el.done;Z++,el=v.next())el=S(B,m,Z,el.value,z),el!==null&&(l&&el.alternate!==null&&B.delete(el.key===null?Z:el.key),d=n(el,d,Z),tl===null?Y=el:tl.sibling=el,tl=el);return l&&B.forEach(function(Cm){return t(m,Cm)}),P&&Yt(m,Z),Y}function rl(m,d,v,z){if(typeof v=="object"&&v!==null&&v.type===yl&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ul:l:{for(var Y=v.key;d!==null;){if(d.key===Y){if(Y=v.type,Y===yl){if(d.tag===7){e(m,d.sibling),z=u(d,v.props.children),z.return=m,m=z;break l}}else if(d.elementType===Y||typeof Y=="object"&&Y!==null&&Y.$$typeof===Zl&&qe(Y)===d.type){e(m,d.sibling),z=u(d,v.props),Pa(z,v),z.return=m,m=z;break l}e(m,d);break}else t(m,d);d=d.sibling}v.type===yl?(z=He(v.props.children,m.mode,z,v.key),z.return=m,m=z):(z=Iu(v.type,v.key,v.props,null,m.mode,z),Pa(z,v),z.return=m,m=z)}return i(m);case pl:l:{for(Y=v.key;d!==null;){if(d.key===Y)if(d.tag===4&&d.stateNode.containerInfo===v.containerInfo&&d.stateNode.implementation===v.implementation){e(m,d.sibling),z=u(d,v.children||[]),z.return=m,m=z;break l}else{e(m,d);break}else t(m,d);d=d.sibling}z=Bi(v,m.mode,z),z.return=m,m=z}return i(m);case Zl:return v=qe(v),rl(m,d,v,z)}if(zt(v))return w(m,d,v,z);if(Kl(v)){if(Y=Kl(v),typeof Y!="function")throw Error(o(150));return v=Y.call(v),G(m,d,v,z)}if(typeof v.then=="function")return rl(m,d,nn(v),z);if(v.$$typeof===Tl)return rl(m,d,tn(m,v),z);cn(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,d!==null&&d.tag===6?(e(m,d.sibling),z=u(d,v),z.return=m,m=z):(e(m,d),z=ji(v,m.mode,z),z.return=m,m=z),i(m)):e(m,d)}return function(m,d,v,z){try{Ia=0;var Y=rl(m,d,v,z);return ha=null,Y}catch(B){if(B===da||B===an)throw B;var tl=nt(29,B,null,m.mode);return tl.lanes=z,tl.return=m,tl}}}var Ge=Fs(!0),Is=Fs(!1),ie=!1;function $i(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ki(l,t){l=l.updateQueue,t.updateQueue===l&&(t.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function ce(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function fe(l,t,e){var a=l.updateQueue;if(a===null)return null;if(a=a.shared,(al&2)!==0){var u=a.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),a.pending=t,t=Fu(l),xs(l,null,e),t}return ku(l,a,t,e),Fu(l)}function lu(l,t,e){if(t=t.updateQueue,t!==null&&(t=t.shared,(e&4194048)!==0)){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,Lf(l,e)}}function Fi(l,t){var e=l.updateQueue,a=l.alternate;if(a!==null&&(a=a.updateQueue,e===a)){var u=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?u=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?u=n=t:n=n.next=t}else u=n=t;e={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:n,shared:a.shared,callbacks:a.callbacks},l.updateQueue=e;return}l=e.lastBaseUpdate,l===null?e.firstBaseUpdate=t:l.next=t,e.lastBaseUpdate=t}var Ii=!1;function tu(){if(Ii){var l=ra;if(l!==null)throw l}}function eu(l,t,e,a){Ii=!1;var u=l.updateQueue;ie=!1;var n=u.firstBaseUpdate,i=u.lastBaseUpdate,c=u.shared.pending;if(c!==null){u.shared.pending=null;var r=c,g=r.next;r.next=null,i===null?n=g:i.next=g,i=r;var _=l.alternate;_!==null&&(_=_.updateQueue,c=_.lastBaseUpdate,c!==i&&(c===null?_.firstBaseUpdate=g:c.next=g,_.lastBaseUpdate=r))}if(n!==null){var A=u.baseState;i=0,_=g=r=null,c=n;do{var b=c.lane&-536870913,S=b!==c.lane;if(S?(k&b)===b:(a&b)===b){b!==0&&b===oa&&(Ii=!0),_!==null&&(_=_.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});l:{var w=l,G=c;b=t;var rl=e;switch(G.tag){case 1:if(w=G.payload,typeof w=="function"){A=w.call(rl,A,b);break l}A=w;break l;case 3:w.flags=w.flags&-65537|128;case 0:if(w=G.payload,b=typeof w=="function"?w.call(rl,A,b):w,b==null)break l;A=q({},A,b);break l;case 2:ie=!0}}b=c.callback,b!==null&&(l.flags|=64,S&&(l.flags|=8192),S=u.callbacks,S===null?u.callbacks=[b]:S.push(b))}else S={lane:b,tag:c.tag,payload:c.payload,callback:c.callback,next:null},_===null?(g=_=S,r=A):_=_.next=S,i|=b;if(c=c.next,c===null){if(c=u.shared.pending,c===null)break;S=c,c=S.next,S.next=null,u.lastBaseUpdate=S,u.shared.pending=null}}while(!0);_===null&&(r=A),u.baseState=r,u.firstBaseUpdate=g,u.lastBaseUpdate=_,n===null&&(u.shared.lanes=0),he|=i,l.lanes=i,l.memoizedState=A}}function Ps(l,t){if(typeof l!="function")throw Error(o(191,l));l.call(t)}function lo(l,t){var e=l.callbacks;if(e!==null)for(l.callbacks=null,l=0;ln?n:8;var i=T.T,c={};T.T=c,gc(l,!1,t,e);try{var r=u(),g=T.S;if(g!==null&&g(c,r),r!==null&&typeof r=="object"&&typeof r.then=="function"){var _=_y(r,a);nu(l,t,_,ot(l))}else nu(l,t,a,ot(l))}catch(A){nu(l,t,{then:function(){},status:"rejected",reason:A},ot())}finally{R.p=n,i!==null&&c.types!==null&&(i.types=c.types),T.T=i}}function My(){}function mc(l,t,e,a){if(l.tag!==5)throw Error(o(476));var u=Ho(l).queue;Co(l,u,t,Q,e===null?My:function(){return wo(l),e(a)})}function Ho(l){var t=l.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lt,lastRenderedState:Q},next:null};var e={};return t.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lt,lastRenderedState:e},next:null},l.memoizedState=t,l=l.alternate,l!==null&&(l.memoizedState=t),t}function wo(l){var t=Ho(l);t.next===null&&(t=l.alternate.memoizedState),nu(l,t.next.queue,{},ot())}function vc(){return Bl(Tu)}function xo(){return El().memoizedState}function jo(){return El().memoizedState}function Dy(l){for(var t=l.return;t!==null;){switch(t.tag){case 24:case 3:var e=ot();l=ce(e);var a=fe(t,l,e);a!==null&&(Pl(a,t,e),lu(a,t,e)),t={cache:Zi()},l.payload=t;return}t=t.return}}function Ny(l,t,e){var a=ot();e={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},gn(l)?qo(t,e):(e=wi(l,t,e,a),e!==null&&(Pl(e,l,a),Yo(e,t,a)))}function Bo(l,t,e){var a=ot();nu(l,t,e,a)}function nu(l,t,e,a){var u={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(gn(l))qo(t,u);else{var n=l.alternate;if(l.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var i=t.lastRenderedState,c=n(i,e);if(u.hasEagerState=!0,u.eagerState=c,ut(c,i))return ku(l,t,u,0),hl===null&&$u(),!1}catch{}if(e=wi(l,t,u,a),e!==null)return Pl(e,l,a),Yo(e,t,a),!0}return!1}function gc(l,t,e,a){if(a={lane:2,revertLane:$c(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},gn(l)){if(t)throw Error(o(479))}else t=wi(l,e,a,2),t!==null&&Pl(t,l,2)}function gn(l){var t=l.alternate;return l===V||t!==null&&t===V}function qo(l,t){ma=on=!0;var e=l.pending;e===null?t.next=t:(t.next=e.next,e.next=t),l.pending=t}function Yo(l,t,e){if((e&4194048)!==0){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,Lf(l,e)}}var iu={readContext:Bl,use:hn,useCallback:bl,useContext:bl,useEffect:bl,useImperativeHandle:bl,useLayoutEffect:bl,useInsertionEffect:bl,useMemo:bl,useReducer:bl,useRef:bl,useState:bl,useDebugValue:bl,useDeferredValue:bl,useTransition:bl,useSyncExternalStore:bl,useId:bl,useHostTransitionStatus:bl,useFormState:bl,useActionState:bl,useOptimistic:bl,useMemoCache:bl,useCacheRefresh:bl};iu.useEffectEvent=bl;var Go={readContext:Bl,use:hn,useCallback:function(l,t){return Ll().memoizedState=[l,t===void 0?null:t],l},useContext:Bl,useEffect:zo,useImperativeHandle:function(l,t,e){e=e!=null?e.concat([l]):null,mn(4194308,4,Mo.bind(null,t,l),e)},useLayoutEffect:function(l,t){return mn(4194308,4,l,t)},useInsertionEffect:function(l,t){mn(4,2,l,t)},useMemo:function(l,t){var e=Ll();t=t===void 0?null:t;var a=l();if(Qe){Pt(!0);try{l()}finally{Pt(!1)}}return e.memoizedState=[a,t],a},useReducer:function(l,t,e){var a=Ll();if(e!==void 0){var u=e(t);if(Qe){Pt(!0);try{e(t)}finally{Pt(!1)}}}else u=t;return a.memoizedState=a.baseState=u,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},a.queue=l,l=l.dispatch=Ny.bind(null,V,l),[a.memoizedState,l]},useRef:function(l){var t=Ll();return l={current:l},t.memoizedState=l},useState:function(l){l=oc(l);var t=l.queue,e=Bo.bind(null,V,t);return t.dispatch=e,[l.memoizedState,e]},useDebugValue:hc,useDeferredValue:function(l,t){var e=Ll();return yc(e,l,t)},useTransition:function(){var l=oc(!1);return l=Co.bind(null,V,l.queue,!0,!1),Ll().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,t,e){var a=V,u=Ll();if(P){if(e===void 0)throw Error(o(407));e=e()}else{if(e=t(),hl===null)throw Error(o(349));(k&127)!==0||io(a,t,e)}u.memoizedState=e;var n={value:e,getSnapshot:t};return u.queue=n,zo(fo.bind(null,a,n,l),[l]),a.flags|=2048,ga(9,{destroy:void 0},co.bind(null,a,n,e,t),null),e},useId:function(){var l=Ll(),t=hl.identifierPrefix;if(P){var e=Rt,a=Ut;e=(a&~(1<<32-at(a)-1)).toString(32)+e,t="_"+t+"R_"+e,e=rn++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?n.multiple=!0:a.size&&(n.size=a.size);break;default:n=typeof a.is=="string"?i.createElement(u,{is:a.is}):i.createElement(u)}}n[xl]=t,n[Jl]=a;l:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break l;for(;i.sibling===null;){if(i.return===null||i.return===t)break l;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=n;l:switch(Yl(n,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break l;case"img":a=!0;break l;default:a=!1}a&&Zt(t)}}return vl(t),Rc(t,t.type,l===null?null:l.memoizedProps,t.pendingProps,e),null;case 6:if(l&&t.stateNode!=null)l.memoizedProps!==a&&Zt(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(l=J.current,fa(t)){if(l=t.stateNode,e=t.memoizedProps,a=null,u=jl,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}l[xl]=t,l=!!(l.nodeValue===e||a!==null&&a.suppressHydrationWarning===!0||nd(l.nodeValue,e)),l||ue(t,!0)}else l=Bn(l).createTextNode(a),l[xl]=t,t.stateNode=l}return vl(t),null;case 31:if(e=t.memoizedState,l===null||l.memoizedState!==null){if(a=fa(t),e!==null){if(l===null){if(!a)throw Error(o(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(557));l[xl]=t}else we(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vl(t),l=!1}else e=Qi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=e),l=!0;if(!l)return t.flags&256?(ct(t),t):(ct(t),null);if((t.flags&128)!==0)throw Error(o(558))}return vl(t),null;case 13:if(a=t.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(u=fa(t),a!==null&&a.dehydrated!==null){if(l===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[xl]=t}else we(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vl(t),u=!1}else u=Qi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(ct(t),t):(ct(t),null)}return ct(t),(t.flags&128)!==0?(t.lanes=e,t):(e=a!==null,l=l!==null&&l.memoizedState!==null,e&&(a=t.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==u&&(a.flags|=2048)),e!==l&&e&&(t.child.flags|=8192),Tn(t,t.updateQueue),vl(t),null);case 4:return zl(),l===null&&Pc(t.stateNode.containerInfo),vl(t),null;case 10:return Qt(t.type),vl(t),null;case 19:if(O(Al),a=t.memoizedState,a===null)return vl(t),null;if(u=(t.flags&128)!==0,n=a.rendering,n===null)if(u)fu(a,!1);else{if(Sl!==0||l!==null&&(l.flags&128)!==0)for(l=t.child;l!==null;){if(n=sn(l),n!==null){for(t.flags|=128,fu(a,!1),l=n.updateQueue,t.updateQueue=l,Tn(t,l),t.subtreeFlags=0,l=e,e=t.child;e!==null;)js(e,l),e=e.sibling;return C(Al,Al.current&1|2),P&&Yt(t,a.treeForkCount),t.child}l=l.sibling}a.tail!==null&&tt()>Mn&&(t.flags|=128,u=!0,fu(a,!1),t.lanes=4194304)}else{if(!u)if(l=sn(n),l!==null){if(t.flags|=128,u=!0,l=l.updateQueue,t.updateQueue=l,Tn(t,l),fu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!n.alternate&&!P)return vl(t),null}else 2*tt()-a.renderingStartTime>Mn&&e!==536870912&&(t.flags|=128,u=!0,fu(a,!1),t.lanes=4194304);a.isBackwards?(n.sibling=t.child,t.child=n):(l=a.last,l!==null?l.sibling=n:t.child=n,a.last=n)}return a.tail!==null?(l=a.tail,a.rendering=l,a.tail=l.sibling,a.renderingStartTime=tt(),l.sibling=null,e=Al.current,C(Al,u?e&1|2:e&1),P&&Yt(t,a.treeForkCount),l):(vl(t),null);case 22:case 23:return ct(t),lc(),a=t.memoizedState!==null,l!==null?l.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(e&536870912)!==0&&(t.flags&128)===0&&(vl(t),t.subtreeFlags&6&&(t.flags|=8192)):vl(t),e=t.updateQueue,e!==null&&Tn(t,e.retryQueue),e=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(e=l.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==e&&(t.flags|=2048),l!==null&&O(Be),null;case 24:return e=null,l!==null&&(e=l.memoizedState.cache),t.memoizedState.cache!==e&&(t.flags|=2048),Qt(Ol),vl(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function wy(l,t){switch(Yi(t),t.tag){case 1:return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 3:return Qt(Ol),zl(),l=t.flags,(l&65536)!==0&&(l&128)===0?(t.flags=l&-65537|128,t):null;case 26:case 27:case 5:return Cu(t),null;case 31:if(t.memoizedState!==null){if(ct(t),t.alternate===null)throw Error(o(340));we()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 13:if(ct(t),l=t.memoizedState,l!==null&&l.dehydrated!==null){if(t.alternate===null)throw Error(o(340));we()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 19:return O(Al),null;case 4:return zl(),null;case 10:return Qt(t.type),null;case 22:case 23:return ct(t),lc(),l!==null&&O(Be),l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 24:return Qt(Ol),null;case 25:return null;default:return null}}function or(l,t){switch(Yi(t),t.tag){case 3:Qt(Ol),zl();break;case 26:case 27:case 5:Cu(t);break;case 4:zl();break;case 31:t.memoizedState!==null&&ct(t);break;case 13:ct(t);break;case 19:O(Al);break;case 10:Qt(t.type);break;case 22:case 23:ct(t),lc(),l!==null&&O(Be);break;case 24:Qt(Ol)}}function su(l,t){try{var e=t.updateQueue,a=e!==null?e.lastEffect:null;if(a!==null){var u=a.next;e=u;do{if((e.tag&l)===l){a=void 0;var n=e.create,i=e.inst;a=n(),i.destroy=a}e=e.next}while(e!==u)}}catch(c){cl(t,t.return,c)}}function re(l,t,e){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var n=u.next;a=n;do{if((a.tag&l)===l){var i=a.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,u=t;var r=e,g=c;try{g()}catch(_){cl(u,r,_)}}}a=a.next}while(a!==n)}}catch(_){cl(t,t.return,_)}}function rr(l){var t=l.updateQueue;if(t!==null){var e=l.stateNode;try{lo(t,e)}catch(a){cl(l,l.return,a)}}}function dr(l,t,e){e.props=Xe(l.type,l.memoizedProps),e.state=l.memoizedState;try{e.componentWillUnmount()}catch(a){cl(l,t,a)}}function ou(l,t){try{var e=l.ref;if(e!==null){switch(l.tag){case 26:case 27:case 5:var a=l.stateNode;break;case 30:a=l.stateNode;break;default:a=l.stateNode}typeof e=="function"?l.refCleanup=e(a):e.current=a}}catch(u){cl(l,t,u)}}function Ct(l,t){var e=l.ref,a=l.refCleanup;if(e!==null)if(typeof a=="function")try{a()}catch(u){cl(l,t,u)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(u){cl(l,t,u)}else e.current=null}function hr(l){var t=l.type,e=l.memoizedProps,a=l.stateNode;try{l:switch(t){case"button":case"input":case"select":case"textarea":e.autoFocus&&a.focus();break l;case"img":e.src?a.src=e.src:e.srcSet&&(a.srcset=e.srcSet)}}catch(u){cl(l,l.return,u)}}function Cc(l,t,e){try{var a=l.stateNode;em(a,l.type,e,t),a[Jl]=t}catch(u){cl(l,l.return,u)}}function yr(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&be(l.type)||l.tag===4}function Hc(l){l:for(;;){for(;l.sibling===null;){if(l.return===null||yr(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&be(l.type)||l.flags&2||l.child===null||l.tag===4)continue l;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function wc(l,t,e){var a=l.tag;if(a===5||a===6)l=l.stateNode,t?(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).insertBefore(l,t):(t=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,t.appendChild(l),e=e._reactRootContainer,e!=null||t.onclick!==null||(t.onclick=jt));else if(a!==4&&(a===27&&be(l.type)&&(e=l.stateNode,t=null),l=l.child,l!==null))for(wc(l,t,e),l=l.sibling;l!==null;)wc(l,t,e),l=l.sibling}function zn(l,t,e){var a=l.tag;if(a===5||a===6)l=l.stateNode,t?e.insertBefore(l,t):e.appendChild(l);else if(a!==4&&(a===27&&be(l.type)&&(e=l.stateNode),l=l.child,l!==null))for(zn(l,t,e),l=l.sibling;l!==null;)zn(l,t,e),l=l.sibling}function mr(l){var t=l.stateNode,e=l.memoizedProps;try{for(var a=l.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Yl(t,a,e),t[xl]=l,t[Jl]=e}catch(n){cl(l,l.return,n)}}var Kt=!1,Nl=!1,xc=!1,vr=typeof WeakSet=="function"?WeakSet:Set,Hl=null;function xy(l,t){if(l=l.containerInfo,ef=Vn,l=Ms(l),Di(l)){if("selectionStart"in l)var e={start:l.selectionStart,end:l.selectionEnd};else l:{e=(e=l.ownerDocument)&&e.defaultView||window;var a=e.getSelection&&e.getSelection();if(a&&a.rangeCount!==0){e=a.anchorNode;var u=a.anchorOffset,n=a.focusNode;a=a.focusOffset;try{e.nodeType,n.nodeType}catch{e=null;break l}var i=0,c=-1,r=-1,g=0,_=0,A=l,b=null;t:for(;;){for(var S;A!==e||u!==0&&A.nodeType!==3||(c=i+u),A!==n||a!==0&&A.nodeType!==3||(r=i+a),A.nodeType===3&&(i+=A.nodeValue.length),(S=A.firstChild)!==null;)b=A,A=S;for(;;){if(A===l)break t;if(b===e&&++g===u&&(c=i),b===n&&++_===a&&(r=i),(S=A.nextSibling)!==null)break;A=b,b=A.parentNode}A=S}e=c===-1||r===-1?null:{start:c,end:r}}else e=null}e=e||{start:0,end:0}}else e=null;for(af={focusedElem:l,selectionRange:e},Vn=!1,Hl=t;Hl!==null;)if(t=Hl,l=t.child,(t.subtreeFlags&1028)!==0&&l!==null)l.return=t,Hl=l;else for(;Hl!==null;){switch(t=Hl,n=t.alternate,l=t.flags,t.tag){case 0:if((l&4)!==0&&(l=t.updateQueue,l=l!==null?l.events:null,l!==null))for(e=0;e title"))),Yl(n,a,e),n[xl]=l,Cl(n),a=n;break l;case"link":var i=Td("link","href",u).get(a+(e.href||""));if(i){for(var c=0;crl&&(i=rl,rl=G,G=i);var m=Es(c,G),d=Es(c,rl);if(m&&d&&(S.rangeCount!==1||S.anchorNode!==m.node||S.anchorOffset!==m.offset||S.focusNode!==d.node||S.focusOffset!==d.offset)){var v=A.createRange();v.setStart(m.node,m.offset),S.removeAllRanges(),G>rl?(S.addRange(v),S.extend(d.node,d.offset)):(v.setEnd(d.node,d.offset),S.addRange(v))}}}}for(A=[],S=c;S=S.parentNode;)S.nodeType===1&&A.push({element:S,left:S.scrollLeft,top:S.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;ce?32:e,T.T=null,e=Xc,Xc=null;var n=me,i=Ft;if(Rl=0,Ta=me=null,Ft=0,(al&6)!==0)throw Error(o(331));var c=al;if(al|=4,Mr(n.current),Ar(n,n.current,i,e),al=c,vu(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(wa,n)}catch{}return!0}finally{R.p=u,T.T=a,Zr(l,t)}}function Jr(l,t,e){t=mt(e,t),t=_c(l.stateNode,t,2),l=fe(l,t,2),l!==null&&(ja(l,2),Ht(l))}function cl(l,t,e){if(l.tag===3)Jr(l,l,e);else for(;t!==null;){if(t.tag===3){Jr(t,l,e);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ye===null||!ye.has(a))){l=mt(e,l),e=Wo(2),a=fe(t,e,2),a!==null&&($o(e,a,t,l),ja(a,2),Ht(a));break}}t=t.return}}function Kc(l,t,e){var a=l.pingCache;if(a===null){a=l.pingCache=new qy;var u=new Set;a.set(t,u)}else u=a.get(t),u===void 0&&(u=new Set,a.set(t,u));u.has(e)||(qc=!0,u.add(e),l=Ly.bind(null,l,t,e),t.then(l,l))}function Ly(l,t,e){var a=l.pingCache;a!==null&&a.delete(t),l.pingedLanes|=l.suspendedLanes&e,l.warmLanes&=~e,hl===l&&(k&e)===e&&(Sl===4||Sl===3&&(k&62914560)===k&&300>tt()-On?(al&2)===0&&za(l,0):Yc|=e,_a===k&&(_a=0)),Ht(l)}function Wr(l,t){t===0&&(t=Qf()),l=Ce(l,t),l!==null&&(ja(l,t),Ht(l))}function Vy(l){var t=l.memoizedState,e=0;t!==null&&(e=t.retryLane),Wr(l,e)}function Zy(l,t){var e=0;switch(l.tag){case 31:case 13:var a=l.stateNode,u=l.memoizedState;u!==null&&(e=u.retryLane);break;case 19:a=l.stateNode;break;case 22:a=l.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),Wr(l,e)}function Ky(l,t){return ni(l,t)}var Hn=null,Ea=null,Jc=!1,wn=!1,Wc=!1,ge=0;function Ht(l){l!==Ea&&l.next===null&&(Ea===null?Hn=Ea=l:Ea=Ea.next=l),wn=!0,Jc||(Jc=!0,Wy())}function vu(l,t){if(!Wc&&wn){Wc=!0;do for(var e=!1,a=Hn;a!==null;){if(l!==0){var u=a.pendingLanes;if(u===0)var n=0;else{var i=a.suspendedLanes,c=a.pingedLanes;n=(1<<31-at(42|l)+1)-1,n&=u&~(i&~c),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,Ir(a,n))}else n=k,n=Bu(a,a===hl?n:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(n&3)===0||xa(a,n)||(e=!0,Ir(a,n));a=a.next}while(e);Wc=!1}}function Jy(){$r()}function $r(){wn=Jc=!1;var l=0;ge!==0&&um()&&(l=ge);for(var t=tt(),e=null,a=Hn;a!==null;){var u=a.next,n=kr(a,t);n===0?(a.next=null,e===null?Hn=u:e.next=u,u===null&&(Ea=e)):(e=a,(l!==0||(n&3)!==0)&&(wn=!0)),a=u}Rl!==0&&Rl!==5||vu(l),ge!==0&&(ge=0)}function kr(l,t){for(var e=l.suspendedLanes,a=l.pingedLanes,u=l.expirationTimes,n=l.pendingLanes&-62914561;0c)break;var _=r.transferSize,A=r.initiatorType;_&&id(A)&&(r=r.responseEnd,i+=_*(r"u"?null:document;function bd(l,t,e){var a=Oa;if(a&&typeof t=="string"&&t){var u=ht(t);u='link[rel="'+l+'"][href="'+u+'"]',typeof e=="string"&&(u+='[crossorigin="'+e+'"]'),gd.has(u)||(gd.add(u),l={rel:l,crossOrigin:e,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),Yl(t,"link",l),Cl(t),a.head.appendChild(t)))}}function hm(l){It.D(l),bd("dns-prefetch",l,null)}function ym(l,t){It.C(l,t),bd("preconnect",l,t)}function mm(l,t,e){It.L(l,t,e);var a=Oa;if(a&&l&&t){var u='link[rel="preload"][as="'+ht(t)+'"]';t==="image"&&e&&e.imageSrcSet?(u+='[imagesrcset="'+ht(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(u+='[imagesizes="'+ht(e.imageSizes)+'"]')):u+='[href="'+ht(l)+'"]';var n=u;switch(t){case"style":n=Ma(l);break;case"script":n=Da(l)}_t.has(n)||(l=q({rel:"preload",href:t==="image"&&e&&e.imageSrcSet?void 0:l,as:t},e),_t.set(n,l),a.querySelector(u)!==null||t==="style"&&a.querySelector(pu(n))||t==="script"&&a.querySelector(_u(n))||(t=a.createElement("link"),Yl(t,"link",l),Cl(t),a.head.appendChild(t)))}}function vm(l,t){It.m(l,t);var e=Oa;if(e&&l){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+ht(a)+'"][href="'+ht(l)+'"]',n=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=Da(l)}if(!_t.has(n)&&(l=q({rel:"modulepreload",href:l},t),_t.set(n,l),e.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(_u(n)))return}a=e.createElement("link"),Yl(a,"link",l),Cl(a),e.head.appendChild(a)}}}function gm(l,t,e){It.S(l,t,e);var a=Oa;if(a&&l){var u=$e(a).hoistableStyles,n=Ma(l);t=t||"default";var i=u.get(n);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(pu(n)))c.loading=5;else{l=q({rel:"stylesheet",href:l,"data-precedence":t},e),(e=_t.get(n))&&rf(l,e);var r=i=a.createElement("link");Cl(r),Yl(r,"link",l),r._p=new Promise(function(g,_){r.onload=g,r.onerror=_}),r.addEventListener("load",function(){c.loading|=1}),r.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Yn(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:c},u.set(n,i)}}}function bm(l,t){It.X(l,t);var e=Oa;if(e&&l){var a=$e(e).hoistableScripts,u=Da(l),n=a.get(u);n||(n=e.querySelector(_u(u)),n||(l=q({src:l,async:!0},t),(t=_t.get(u))&&df(l,t),n=e.createElement("script"),Cl(n),Yl(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Sm(l,t){It.M(l,t);var e=Oa;if(e&&l){var a=$e(e).hoistableScripts,u=Da(l),n=a.get(u);n||(n=e.querySelector(_u(u)),n||(l=q({src:l,async:!0,type:"module"},t),(t=_t.get(u))&&df(l,t),n=e.createElement("script"),Cl(n),Yl(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Sd(l,t,e,a){var u=(u=J.current)?qn(u):null;if(!u)throw Error(o(446));switch(l){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(t=Ma(e.href),e=$e(u).hoistableStyles,a=e.get(t),a||(a={type:"style",instance:null,count:0,state:null},e.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){l=Ma(e.href);var n=$e(u).hoistableStyles,i=n.get(l);if(i||(u=u.ownerDocument||u,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(l,i),(n=u.querySelector(pu(l)))&&!n._p&&(i.instance=n,i.state.loading=5),_t.has(l)||(e={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},_t.set(l,e),n||pm(u,l,e,i.state))),t&&a===null)throw Error(o(528,""));return i}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=e.async,e=e.src,typeof e=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Da(e),e=$e(u).hoistableScripts,a=e.get(t),a||(a={type:"script",instance:null,count:0,state:null},e.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,l))}}function Ma(l){return'href="'+ht(l)+'"'}function pu(l){return'link[rel="stylesheet"]['+l+"]"}function pd(l){return q({},l,{"data-precedence":l.precedence,precedence:null})}function pm(l,t,e,a){l.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=l.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Yl(t,"link",e),Cl(t),l.head.appendChild(t))}function Da(l){return'[src="'+ht(l)+'"]'}function _u(l){return"script[async]"+l}function _d(l,t,e){if(t.count++,t.instance===null)switch(t.type){case"style":var a=l.querySelector('style[data-href~="'+ht(e.href)+'"]');if(a)return t.instance=a,Cl(a),a;var u=q({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(l.ownerDocument||l).createElement("style"),Cl(a),Yl(a,"style",u),Yn(a,e.precedence,l),t.instance=a;case"stylesheet":u=Ma(e.href);var n=l.querySelector(pu(u));if(n)return t.state.loading|=4,t.instance=n,Cl(n),n;a=pd(e),(u=_t.get(u))&&rf(a,u),n=(l.ownerDocument||l).createElement("link"),Cl(n);var i=n;return i._p=new Promise(function(c,r){i.onload=c,i.onerror=r}),Yl(n,"link",a),t.state.loading|=4,Yn(n,e.precedence,l),t.instance=n;case"script":return n=Da(e.src),(u=l.querySelector(_u(n)))?(t.instance=u,Cl(u),u):(a=e,(u=_t.get(n))&&(a=q({},e),df(a,u)),l=l.ownerDocument||l,u=l.createElement("script"),Cl(u),Yl(u,"link",a),l.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Yn(a,e.precedence,l));return t.instance}function Yn(l,t,e){for(var a=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,n=u,i=0;i title"):null)}function _m(l,t,e){if(e===1||t.itemProp!=null)return!1;switch(l){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;return t.rel==="stylesheet"?(l=t.disabled,typeof t.precedence=="string"&&l==null):!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 Ad(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function Tm(l,t,e,a){if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var u=Ma(a.href),n=t.querySelector(pu(u));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Qn.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=n,Cl(n);return}n=t.ownerDocument||t,a=pd(a),(u=_t.get(u))&&rf(a,u),n=n.createElement("link"),Cl(n);var i=n;i._p=new Promise(function(c,r){i.onload=c,i.onerror=r}),Yl(n,"link",a),e.instance=n}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=Qn.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}var hf=0;function zm(l,t){return l.stylesheets&&l.count===0&&Ln(l,l.stylesheets),0hf?50:800)+t);return l.unsuspend=e,function(){l.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Qn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ln(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var Xn=null;function Ln(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Xn=new Map,t.forEach(Am,l),Xn=null,Qn.call(l))}function Am(l,t){if(!(t.state.loading&4)){var e=Xn.get(l);if(e)var a=e.get(null);else{e=new Map,Xn.set(l,e);for(var u=l.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(f){console.error(f)}}return s(),Af.exports=Wm(),Af.exports}var km=$m();function Fm(){return{currentState(){return M("current_state")},setPin(s){return M("set_pin",{pin:s})},acceptStay(){return M("accept_stay")},dismissCandidate(){return M("dismiss_candidate")},stopGuarding(){return M("stop_guarding")},submitPin(s){return M("submit_pin",{pin:s})},async subscribe(s){const f=await Cf("stay-state-changed",y=>{s(y.payload.view)});return()=>{f()}}}}function Df(s){return s instanceof Error?s.message:typeof s=="string"?s:"Stay could not complete that action."}function nh(s){return{zoom:"Zoom",google_meet:"Google Meet",microsoft_teams:"Microsoft Teams",facetime:"FaceTime",webex:"Webex",slack_huddle:"Slack huddle"}[s]}function xf(s){return s.title||s.app_name}function Im({meeting:s,error:f,onStop:y}){return N.jsxs("section",{className:"mode-panel mode-panel-active",children:[N.jsx("p",{className:"kicker",children:"Stay is on"}),N.jsx("h2",{children:xf(s.window)||`${nh(s.app)} is protected.`}),N.jsx("p",{className:"muted",children:"Keep the hour you agreed to."}),N.jsx("div",{className:"action-row",children:N.jsx("button",{type:"button",className:"ghost strong-ghost",onClick:y,children:"Stop"})}),N.jsx("p",{className:"error-line",role:"status",children:f})]})}const Pd=7600,Pm=1200,l0=[5,12.5,20,27.5,35,42.5,50,57.5,65,72.5,80,87.5,95],Nf=[-18,-6,6,18,30,42,54,66,78,90,102,114],t0=l0.flatMap((s,f)=>Nf.map((y,o)=>{const E=f*Nf.length+o,U=E%4===0,H=E%11===0?"accent":E%3===0?"warm":"neutral",x=3600+E%8*210,D=(o%3-1)*1.8,p=(f%4-1.5)*1.6;return{kind:U?"dot":"bar",tone:H,width:U?6+E%5*2:34+E%8*10,height:U?6+E%5*2:5+E%3,x:`${y+p}vw`,y:`${s+D}vh`,driftX:`${38+E%6*5}vw`,driftY:`${(E%7-3)*.55}vh`,delayMs:-Math.round((o+1)/Nf.length*x)+f*34,durationMs:x}})),e0=t0.map((s,f)=>({id:`signal-${f+1}`,...s})),a0=[{id:"top-left-dot",kind:"dot",tone:"neutral",placement:"top-left-dot"},{id:"top-left-bar",kind:"bar",tone:"neutral",placement:"top-left-bar"},{id:"top-center-dot",kind:"dot",tone:"neutral",placement:"top-center-dot"},{id:"top-right-bar",kind:"bar",tone:"neutral",placement:"top-right-bar"},{id:"upper-warm-left",kind:"bar",tone:"warm",placement:"upper-warm-left"},{id:"upper-warm-dot",kind:"dot",tone:"warm",placement:"upper-warm-dot"},{id:"upper-warm-right",kind:"bar",tone:"warm",placement:"upper-warm-right"},{id:"mid-left-bar",kind:"bar",tone:"neutral",placement:"mid-left-bar"},{id:"mid-right-bar",kind:"bar",tone:"neutral",placement:"mid-right-bar"},{id:"lower-left-bar",kind:"bar",tone:"neutral",placement:"lower-left-bar"},{id:"lower-left-dot",kind:"dot",tone:"neutral",placement:"lower-left-dot"},{id:"lower-right-warm",kind:"bar",tone:"warm",placement:"lower-right-warm"},{id:"lower-right-dot",kind:"dot",tone:"warm",placement:"lower-right-dot"},{id:"bottom-left-warm",kind:"bar",tone:"warm",placement:"bottom-left-warm"},{id:"bottom-neutral",kind:"bar",tone:"neutral",placement:"bottom-neutral"}];function u0({onComplete:s}){const f=wl.useMemo(c0,[])?Pm:Pd;return wl.useEffect(()=>{const y=window.setTimeout(s,f),o=f===Pd?f0():void 0;return()=>{window.clearTimeout(y),o?.()}},[f,s]),N.jsxs("section",{className:"launch-intro","aria-label":"Stay opening animation",style:n0(f),children:[N.jsx("div",{className:"launch-intro__grain","aria-hidden":"true"}),N.jsx("div",{className:"launch-intro__room","aria-hidden":"true"}),N.jsx("div",{className:"launch-intro__signals","aria-hidden":"true",children:e0.map(y=>N.jsx("span",{className:["launch-intro__signal",`launch-intro__signal-${y.kind}`,`launch-intro__signal-${y.tone}`].join(" "),style:i0(y)},y.id))}),N.jsxs("div",{className:"launch-intro__icon-stage","aria-hidden":"true",children:[N.jsx("div",{className:"launch-intro__tile"}),N.jsx("div",{className:"launch-intro__icon-pattern",children:a0.map(y=>N.jsx("span",{className:["launch-intro__icon-mark",`launch-intro__icon-mark-${y.kind}`,`launch-intro__icon-mark-${y.tone}`,`launch-intro__icon-mark--${y.placement}`].join(" ")},y.id))}),N.jsxs("div",{className:"launch-intro__connector",children:[N.jsx("span",{className:"launch-intro__connector-line"}),N.jsx("span",{className:"launch-intro__connector-dot launch-intro__connector-dot-left"}),N.jsx("span",{className:"launch-intro__connector-dot launch-intro__connector-dot-right"})]})]}),N.jsxs("div",{className:"launch-intro__copy","aria-hidden":"true",children:[N.jsx("p",{children:"Stay"}),N.jsx("span",{children:"Their hour deserves your hour."})]}),N.jsx("button",{type:"button",className:"launch-intro__skip ghost",onClick:s,children:"Skip"})]})}function n0(s){return{"--launch-duration":`${s}ms`}}function i0(s){return{"--signal-width":`${s.width}px`,"--signal-height":`${s.height}px`,"--signal-x":s.x,"--signal-y":s.y,"--signal-drift-x":s.driftX,"--signal-drift-y":s.driftY,"--signal-delay":`${s.delayMs}ms`,"--signal-duration":`${s.durationMs}ms`}}function c0(){return typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function f0(){const s=window.AudioContext??window.webkitAudioContext;if(!s)return;const f=new s,y=f.currentTime,o=f.createGain(),E=f.createBiquadFilter(),U=[];return o.gain.setValueAtTime(1e-4,y),o.gain.exponentialRampToValueAtTime(.95,y+.28),o.gain.exponentialRampToValueAtTime(.58,y+3.8),o.gain.exponentialRampToValueAtTime(1e-4,y+7.2),E.type="lowpass",E.frequency.setValueAtTime(4200,y),E.frequency.exponentialRampToValueAtTime(760,y+3.4),E.frequency.exponentialRampToValueAtTime(340,y+5.4),E.Q.setValueAtTime(.8,y),E.connect(o),o.connect(f.destination),s0(f,E,U,y),o0(f,E,U,y),r0(f,E,U,y),f.resume().catch(()=>{}),()=>{U.forEach(H=>{try{H.stop()}catch{}}),f.close().catch(()=>{})}}function s0(s,f,y,o){const E=s.createBufferSource(),U=s.createGain(),H=s.createBiquadFilter(),x=s.createBuffer(1,s.sampleRate*2,s.sampleRate),D=x.getChannelData(0);for(let p=0;p{const x=o+.18+H*.22,D=s.createOscillator(),p=s.createGain();D.type=H%3===0?"triangle":"sine",D.frequency.setValueAtTime(U,x),D.frequency.exponentialRampToValueAtTime(U*.72,x+.16),p.gain.setValueAtTime(1e-4,x),p.gain.exponentialRampToValueAtTime(.088-H*.0035,x+.03),p.gain.exponentialRampToValueAtTime(1e-4,x+.24),D.connect(p),p.connect(f),D.start(x),D.stop(x+.28),y.push(D)})}function r0(s,f,y,o){[146.83,220,293.66].forEach((U,H)=>{const x=s.createOscillator(),D=s.createGain(),p=o+2.6+H*.08;x.type="sine",x.frequency.setValueAtTime(U,p),x.detune.setValueAtTime(H===1?4:-3,p),D.gain.setValueAtTime(1e-4,p),D.gain.exponentialRampToValueAtTime(H===1?.096:.06,p+1.2),D.gain.exponentialRampToValueAtTime(1e-4,o+7.1),x.connect(D),D.connect(f),x.start(p),x.stop(o+7.3),y.push(x)})}const Uu=4;function d0(s){return s.replace(/\D/g,"").slice(0,Uu)}function li(s){return s.length===Uu}function ih({id:s,label:f,ariaLabel:y,value:o,error:E,errorId:U,onChange:H}){const x=wl.useId(),D=wl.useRef(null),p=s??x,K=Array.from({length:Uu},(pl,yl)=>o[yl]??""),q=Math.min(o.length,Uu-1);function ll(pl){H(d0(pl.currentTarget.value))}function Ul(){D.current?.focus()}return N.jsxs("div",{className:"pin-code-field",children:[f?N.jsx("label",{htmlFor:p,children:f}):null,N.jsxs("div",{className:"pin-code-input","data-invalid":!!E,onClick:Ul,children:[N.jsx("input",{ref:D,id:p,className:"pin-code-control","aria-label":y,inputMode:"numeric",maxLength:Uu,pattern:"[0-9]{4}",autoComplete:"off",value:o,"aria-invalid":!!E,"aria-describedby":E?U:void 0,onChange:ll}),N.jsx("div",{className:"pin-code-slots","aria-hidden":"true",children:K.map((pl,yl)=>{const lt=["pin-code-slot",pl?"pin-code-slot-filled":null,yl===q?"pin-code-slot-active":null].filter(Boolean).join(" ");return N.jsx("span",{className:lt},yl)})})]})]})}function h0({view:s,error:f,onSubmit:y}){const[o,E]=wl.useState(""),U=f||s.last_error;async function H(x){if(x.preventDefault(),!li(o))return;await y(o)&&E("")}return N.jsxs("section",{className:"mode-panel mode-panel-active",children:[N.jsx("p",{className:"kicker",children:"Stay with the call"}),N.jsx("h2",{children:"Enter your PIN."}),N.jsxs("p",{className:"muted",children:[s.focused.app_name,s.focused.title?`: ${xf(s.focused)}`:""]}),N.jsx("form",{className:"unlock-form",noValidate:!0,onSubmit:H,children:N.jsxs("div",{className:"control-row pin-entry-row",children:[N.jsx(ih,{ariaLabel:"Unlock PIN",value:o,error:U,errorId:"unlock-error",onChange:E}),N.jsx("button",{type:"submit",disabled:!li(o),children:"Open"})]})}),N.jsx("p",{id:"unlock-error",className:"error-line",role:"status",children:U})]})}function y0({candidate:s,canAccept:f,error:y,onAccept:o,onDismiss:E}){return N.jsxs("section",{className:"mode-panel mode-panel-active",children:[N.jsx("p",{className:"kicker",children:nh(s.app)}),N.jsx("h2",{children:"Stay with this meeting?"}),N.jsx("p",{className:"muted",children:xf(s.window)||s.reason}),N.jsxs("div",{className:"action-row",children:[N.jsx("button",{type:"button",disabled:!f,onClick:o,children:"Stay"}),N.jsx("button",{type:"button",className:"ghost",onClick:E,children:"Not now"})]}),N.jsx("p",{className:"error-line",role:"status",children:y})]})}function m0({error:s,onSave:f}){const[y,o]=wl.useState("");async function E(U){if(U.preventDefault(),!li(y))return;await f(y)&&o("")}return N.jsxs("form",{className:"pin-setup mode-panel",noValidate:!0,onSubmit:E,children:[N.jsxs("div",{className:"control-row pin-entry-row",children:[N.jsx(ih,{id:"setup-pin",label:"Set a four digit PIN",value:y,error:s,errorId:"setup-error",onChange:o}),N.jsx("button",{type:"submit",disabled:!li(y),children:"Keep"})]}),N.jsx("p",{id:"setup-error",className:"error-line",role:"status",children:s})]})}function v0({mode:s,children:f,status:y}){const o=s==="guarding",[E,U]=wl.useState(!1),H=wl.useRef(void 0);wl.useEffect(()=>(o||U(!1),()=>{Uf(H.current)}),[o]);function x(){Uf(H.current),H.current=void 0,p(!0)}function D(){Uf(H.current),H.current=window.setTimeout(()=>{H.current=void 0,p(!1)},180)}function p(ll){U(ll),Ru()&&M("set_guarding_panel_expanded",{expanded:ll}).catch(()=>{})}function K(ll){ll.currentTarget.contains(ll.relatedTarget)||D()}const q=["stay-shell",`stay-shell-${s}`,o?E?"stay-shell-revealed":"stay-shell-collapsed":null].filter(Boolean).join(" ");return N.jsxs("main",{className:q,"aria-live":"polite",tabIndex:o?0:void 0,onMouseEnter:o?x:void 0,onMouseLeave:o?D:void 0,onFocusCapture:o?x:void 0,onBlurCapture:o?K:void 0,children:[N.jsxs("header",{className:"brand-strip","data-tauri-drag-region":!0,children:[N.jsxs("div",{className:"brand-label","data-tauri-drag-region":!0,children:[N.jsx("p",{className:"eyebrow","data-tauri-drag-region":!0,children:"Stay"}),N.jsx("h1",{"data-tauri-drag-region":!0,children:"Stay focused."})]}),N.jsxs("div",{className:"brand-controls",children:[y?N.jsx("span",{className:"status-pill",children:y}):null,N.jsx("button",{type:"button",className:"window-close","aria-label":"Hide Stay window",onClick:g0,children:N.jsx("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",children:N.jsx("path",{d:"M2 2L10 10M10 2L2 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})]})]}),f]})}function g0(){Ru()&&Hf().hide().catch(()=>{})}function Uf(s){s!==void 0&&window.clearTimeout(s)}const ch="stay.launchIntro.v1.seen",b0="launchIntro",S0={mode:"idle",pin_configured:!1};function p0({client:s,showLaunchIntro:f}){const[y,o]=wl.useState(S0),[E,U]=wl.useState(!0),[H,x]=wl.useState(null),[D,p]=wl.useState(()=>f??T0());wl.useEffect(()=>{let _l=!0,Tl;return s.currentState().then(nl=>{_l&&o(nl)}).catch(nl=>{_l&&x({target:"mode",message:Df(nl)})}).finally(()=>{_l&&U(!1)}),s.subscribe(nl=>{o(nl),x(null)}).then(nl=>{_l?Tl=nl:nl()}).catch(nl=>{_l&&x({target:"mode",message:Df(nl)})}),()=>{_l=!1,Tl?.()}},[s]),wl.useEffect(()=>{if(D)return lh(!0),()=>{lh(!1)}},[D]);const K=wl.useMemo(()=>_0(y,E),[E,y]);async function q(_l,Tl="mode"){x(null);try{const nl=await _l();return o(nl.view),nl.view.mode!=="locked"||nl.view.last_error===null}catch(nl){return x({target:Tl,message:Df(nl)}),!1}}const ll=H?.target==="setup"?H.message:null,Ul=H?.target==="mode"?H.message:null,pl=!E&&!y.pin_configured,yl=!E&&y.pin_configured,lt=y.pin_configured?y.mode:"idle",Ql=wl.useCallback(()=>{z0(),p(!1)},[]);return N.jsxs(N.Fragment,{children:[N.jsxs(v0,{mode:lt,status:K,children:[E?N.jsxs("section",{className:"mode-panel quiet-state",children:[N.jsx("p",{className:"kicker",children:"Opening"}),N.jsx("h2",{children:"Stay is opening."})]}):null,pl?N.jsx(m0,{error:ll,onSave:_l=>q(()=>s.setPin(_l),"setup")}):null,yl&&y.mode==="idle"?N.jsxs("section",{className:"mode-panel quiet-state",children:[N.jsx("p",{className:"kicker",children:"Ready"}),N.jsx("h2",{children:"Stay is waiting."})]}):null,yl&&y.mode==="meeting_candidate"?N.jsx(y0,{candidate:y.candidate,canAccept:y.pin_configured,error:Ul,onAccept:()=>{q(()=>s.acceptStay())},onDismiss:()=>{q(()=>s.dismissCandidate())}}):null,yl&&y.mode==="guarding"?N.jsx(Im,{meeting:y.meeting,error:Ul,onStop:()=>{q(()=>s.stopGuarding())}}):null,yl&&y.mode==="locked"?N.jsx(h0,{view:y,error:Ul,onSubmit:_l=>q(()=>s.submitPin(_l))}):null]}),D?N.jsx(u0,{onComplete:Ql}):null]})}function _0(s,f){if(f)return"Opening";if(!s.pin_configured)return"PIN needed";switch(s.mode){case"idle":return"Ready";case"meeting_candidate":return"Meeting";case"guarding":return"On";case"locked":return"Locked"}}function T0(){if(new URLSearchParams(window.location.search).get(b0)==="1")return!0;try{return window.localStorage.getItem(ch)!=="true"}catch{return!0}}function z0(){try{window.localStorage.setItem(ch,"true")}catch{}}async function lh(s){if(Ru())try{await M("set_launch_animation_active",{active:s})}catch{}}const Ra={app:"zoom",window:fh("zoom.us","Weekly Team Sync"),reason:"Zoom foreground window"},Ca=fh("Safari","Quarterly planning notes");function A0(s){const f=new Set,y=[];let o=null,E=s??{mode:"idle",pin_configured:!1};function U(x,D=[]){E=x;const p={view:E,commands:D};return f.forEach(K=>K(E)),p}return{commandLog:y,async currentState(){return y.push("current_state"),E},async setPin(x){if(y.push("set_pin"),!/^\d{4}$/.test(x))throw new Error("PIN must be exactly four digits");return o=x,U({mode:"idle",pin_configured:!0})},async acceptStay(){if(y.push("accept_stay"),!o)throw new Error("set a four digit PIN before turning on Stay");return U({mode:"guarding",meeting:Ra,pin_configured:!0},[{type:"begin_guarding",meeting:Ra}])},async dismissCandidate(){return y.push("dismiss_candidate"),U({mode:"idle",pin_configured:!!o},[{type:"hide_prompt"}])},async stopGuarding(){return y.push("stop_guarding"),U({mode:"idle",pin_configured:!!o},[{type:"stop_guarding"}])},async submitPin(x){if(y.push("submit_pin"),E.mode!=="locked")throw new Error("Stay is not locked right now");return x===o?U({mode:"guarding",meeting:E.meeting,pin_configured:!0},[{type:"unlock"}]):U({...E,failed_attempts:E.failed_attempts+1,last_error:"That PIN did not open Stay."},[{type:"stay_locked",failed_attempts:E.failed_attempts+1}])},async subscribe(x){return f.add(x),()=>{f.delete(x)}},emitView(x){return U(x)},focusMeeting(){return U({mode:"meeting_candidate",candidate:Ra,pin_configured:!!o},[{type:"show_prompt",candidate:Ra}])},focusAway(){return U({mode:"locked",meeting:Ra,focused:{app_name:Ca.app_name,title:Ca.title,bounds:Ca.bounds},failed_attempts:0,pin_configured:!!o,last_error:null},[{type:"show_lock",meeting:Ra,focused:{app_name:Ca.app_name,title:Ca.title,bounds:Ca.bounds}}])},view(){return E}}}function fh(s,f){return{app_name:s,title:f,process_id:null,window_id:null,process_path:null,bounds:{x:96,y:88,width:680,height:420}}}const sh=document.querySelector("#root");if(!sh)throw new Error("Stay root element is missing");km.createRoot(sh).render(N.jsx(wl.StrictMode,{children:O0()==="guard-border"?N.jsx(E0,{}):N.jsx(p0,{client:M0()})}));function E0(){return N.jsx("div",{className:"guard-border-surface","aria-hidden":"true",children:N.jsx("div",{className:"guard-border-frame"})})}function O0(){if(new URLSearchParams(window.location.search).get("surface")==="guard-border")return"guard-border";if(!Ru())return"main";try{return Hf().label==="guard-border"?"guard-border":"main"}catch{return"main"}}function M0(){if(window.__STAY_CLIENT__)return window.__STAY_CLIENT__;if(Ru()||window.__TAURI__||window.__TAURI_INTERNALS__)return Fm();const s=A0();return window.__STAY_CLIENT__=s,window.__stayMock=s,s} diff --git a/apps/desktop/dist/index.html b/apps/desktop/dist/index.html index 518b4f9..709deb7 100644 --- a/apps/desktop/dist/index.html +++ b/apps/desktop/dist/index.html @@ -10,7 +10,7 @@ rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap" /> - + diff --git a/apps/desktop/src/App.test.tsx b/apps/desktop/src/App.test.tsx index f802b94..154714c 100644 --- a/apps/desktop/src/App.test.tsx +++ b/apps/desktop/src/App.test.tsx @@ -110,15 +110,17 @@ describe("Stay GUI", () => { expect(await screen.findByText("Stay with this meeting?")).toBeInTheDocument(); }); - it("waits for a complete setup PIN instead of submitting invalid input", async () => { + it("shows only PIN setup before setup and waits for a complete PIN", async () => { const user = userEvent.setup(); const client = createMockStayClient(); client.focusMeeting(); renderApp(client); - expect(await screen.findByText("Stay with this meeting?")).toBeInTheDocument(); - expect(screen.getByRole("button", { name: "Stay" })).toBeDisabled(); + expect(await screen.findByLabelText("Set a four digit PIN")).toBeInTheDocument(); + expect(screen.getByText("PIN needed")).toBeInTheDocument(); + expect(screen.queryByText("Stay with this meeting?")).not.toBeInTheDocument(); + expect(screen.queryByRole("button", { name: "Stay" })).not.toBeInTheDocument(); const pinInput = screen.getByLabelText("Set a four digit PIN"); const keepButton = screen.getByRole("button", { name: "Keep" }); @@ -129,7 +131,7 @@ describe("Stay GUI", () => { expect(client.commandLog).not.toContain("set_pin"); expect(screen.queryByText("PIN must be exactly four digits")).not.toBeInTheDocument(); - expect(screen.getByText("Stay with this meeting?")).toBeInTheDocument(); + expect(screen.queryByText("Stay with this meeting?")).not.toBeInTheDocument(); }); it("shows the first-launch intro when enabled and dismisses it", async () => { diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index 1b89b0f..7718ab7 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -114,6 +114,9 @@ export function App({ client, showLaunchIntro: showLaunchIntroOverride }: AppPro const setupError = actionError?.target === "setup" ? actionError.message : null; const modeError = actionError?.target === "mode" ? actionError.message : null; + const needsPinSetup = !isLoading && !view.pin_configured; + const canShowModePanels = !isLoading && view.pin_configured; + const shellMode = view.pin_configured ? view.mode : "idle"; const completeLaunchIntro = useCallback(() => { markLaunchIntroSeen(); setShowLaunchIntro(false); @@ -121,7 +124,7 @@ export function App({ client, showLaunchIntro: showLaunchIntroOverride }: AppPro return ( <> - + {isLoading ? (

Opening

@@ -129,18 +132,18 @@ export function App({ client, showLaunchIntro: showLaunchIntroOverride }: AppPro
) : null} - {!isLoading && !view.pin_configured ? ( + {needsPinSetup ? ( runCommand(() => client.setPin(pin), "setup")} /> ) : null} - {!isLoading && view.mode === "idle" && view.pin_configured ? ( + {canShowModePanels && view.mode === "idle" ? (

Ready

Stay is waiting.

) : null} - {!isLoading && view.mode === "meeting_candidate" ? ( + {canShowModePanels && view.mode === "meeting_candidate" ? ( ) : null} - {!isLoading && view.mode === "guarding" ? ( + {canShowModePanels && view.mode === "guarding" ? ( ) : null} - {!isLoading && view.mode === "locked" ? ( + {canShowModePanels && view.mode === "locked" ? ( runCommand(() => client.submitPin(pin))} /> ) : null}
diff --git a/docs/pr-assets/fix-pre-pin-meeting-layout/pre-pin-meeting-after.png b/docs/pr-assets/fix-pre-pin-meeting-layout/pre-pin-meeting-after.png new file mode 100644 index 0000000..d0b8e46 Binary files /dev/null and b/docs/pr-assets/fix-pre-pin-meeting-layout/pre-pin-meeting-after.png differ diff --git a/docs/pr-assets/fix-pre-pin-meeting-layout/pre-pin-meeting-before.png b/docs/pr-assets/fix-pre-pin-meeting-layout/pre-pin-meeting-before.png new file mode 100644 index 0000000..abdbaf3 Binary files /dev/null and b/docs/pr-assets/fix-pre-pin-meeting-layout/pre-pin-meeting-before.png differ