@inkeep/open-knowledge 0.19.1-beta.5 → 0.19.1-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ Error generating stack: `+e.message+`
9
9
  `+e.stack}}var oe=Object.prototype.hasOwnProperty,se=t.unstable_scheduleCallback,ce=t.unstable_cancelCallback,le=t.unstable_shouldYield,ue=t.unstable_requestPaint,de=t.unstable_now,fe=t.unstable_getCurrentPriorityLevel,pe=t.unstable_ImmediatePriority,me=t.unstable_UserBlockingPriority,he=t.unstable_NormalPriority,ge=t.unstable_LowPriority,_e=t.unstable_IdlePriority,ve=t.log,ye=t.unstable_setDisableYieldValue,be=null,xe=null;function Se(e){if(typeof ve==`function`&&ye(e),xe&&typeof xe.setStrictMode==`function`)try{xe.setStrictMode(be,e)}catch{}}var Ce=Math.clz32?Math.clz32:Ee,we=Math.log,Te=Math.LN2;function Ee(e){return e>>>=0,e===0?32:31-(we(e)/Te|0)|0}var De=256,Oe=262144,ke=4194304;function Ae(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function je(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ae(n))):i=Ae(o):i=Ae(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ae(n))):i=Ae(o)):i=Ae(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Me(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ne(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pe(){var e=ke;return ke<<=1,!(ke&62914560)&&(ke=4194304),e}function Fe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ie(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Le(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ce(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Re(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Re(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ce(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ce(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Be(e,t){var n=t&-t;return n=n&42?1:Ve(n),(n&(e.suspendedLanes|t))===0?n:0}function Ve(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function He(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ue(){var e=F.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function We(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Ge=Math.random().toString(36).slice(2),Ke=`__reactFiber$`+Ge,qe=`__reactProps$`+Ge,Je=`__reactContainer$`+Ge,Ye=`__reactEvents$`+Ge,Xe=`__reactListeners$`+Ge,Ze=`__reactHandles$`+Ge,Qe=`__reactResources$`+Ge,$e=`__reactMarker$`+Ge;function et(e){delete e[Ke],delete e[qe],delete e[Ye],delete e[Xe],delete e[Ze]}function tt(e){var t=e[Ke];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Je]||n[Ke]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[Ke])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function nt(e){if(e=e[Ke]||e[Je]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function it(e){var t=e[Qe];return t||=e[Qe]={hoistableStyles:new Map,hoistableScripts:new Map},t}function at(e){e[$e]=!0}var ot=new Set,st={};function ct(e,t){lt(e,t),lt(e+`Capture`,t)}function lt(e,t){for(st[e]=t,e=0;e<t.length;e++)ot.add(t[e])}var ut=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),dt={},ft={};function pt(e){return oe.call(ft,e)?!0:oe.call(dt,e)?!1:ut.test(e)?ft[e]=!0:(dt[e]=!0,!1)}function mt(e,t,n){if(pt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function gt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function _t(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function vt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function yt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bt(e){if(!e._valueTracker){var t=vt(e)?`checked`:`value`;e._valueTracker=yt(e,t,``+e[t])}}function xt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=vt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function St(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ct=/[\n"\\]/g;function wt(e){return e.replace(Ct,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Tt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+_t(t)):e.value!==``+_t(t)&&(e.value=``+_t(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Dt(e,o,_t(n)):Dt(e,o,_t(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+_t(s):e.removeAttribute(`name`)}function Et(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){bt(e);return}n=n==null?``:``+_t(n),t=t==null?n:``+_t(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),bt(e)}function Dt(e,t,n){t===`number`&&St(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ot(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+_t(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function kt(e,t,n){if(t!=null&&(t=``+_t(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+_t(n)}function At(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(N(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=_t(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),bt(e)}function jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Nt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Mt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Pt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Nt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Nt(e,o,t[o])}function Ft(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var It=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Lt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Rt(e){return Lt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function zt(){}var Bt=null;function Vt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ht=null,Ut=null;function Wt(e){var t=nt(e);if(t&&(e=t.stateNode)){var n=e[qe]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Tt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+wt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[qe]||null;if(!i)throw Error(a(90));Tt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&xt(r)}break a;case`textarea`:kt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ot(e,!!n.multiple,t,!1)}}}var Gt=!1;function Kt(e,t,n){if(Gt)return e(t,n);Gt=!0;try{return e(t)}finally{if(Gt=!1,(Ht!==null||Ut!==null)&&(_u(),Ht&&(t=Ht,e=Ut,Ut=Ht=null,Wt(t),e)))for(t=0;t<e.length;t++)Wt(e[t])}}function qt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[qe]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var Jt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Yt=!1;if(Jt)try{var Xt={};Object.defineProperty(Xt,`passive`,{get:function(){Yt=!0}}),window.addEventListener(`test`,Xt,Xt),window.removeEventListener(`test`,Xt,Xt)}catch{Yt=!1}var Zt=null,Qt=null,$t=null;function en(){if($t)return $t;var e,t=Qt,n=t.length,r,i=`value`in Zt?Zt.value:Zt.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return $t=i.slice(e,1<r?1-r:void 0)}function tn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?nn:rn,this.isPropagationStopped=rn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sn=an(on),cn=p({},on,{view:0,detail:0}),ln=an(cn),un,dn,fn,pn=p({},cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==fn&&(fn&&e.type===`mousemove`?(un=e.screenX-fn.screenX,dn=e.screenY-fn.screenY):dn=un=0,fn=e),un)},movementY:function(e){return`movementY`in e?e.movementY:dn}}),mn=an(pn),hn=an(p({},pn,{dataTransfer:0})),gn=an(p({},cn,{relatedTarget:0})),_n=an(p({},on,{animationName:0,elapsedTime:0,pseudoElement:0})),vn=an(p({},on,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),yn=an(p({},on,{data:0})),bn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},xn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Sn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Cn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sn[e])?!!t[e]:!1}function wn(){return Cn}var Tn=an(p({},cn,{key:function(e){if(e.key){var t=bn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=tn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wn,charCode:function(e){return e.type===`keypress`?tn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?tn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),En=an(p({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Dn=an(p({},cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wn})),On=an(p({},on,{propertyName:0,elapsedTime:0,pseudoElement:0})),kn=an(p({},pn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),An=an(p({},on,{newState:0,oldState:0})),jn=[9,13,27,32],Mn=Jt&&`CompositionEvent`in window,Nn=null;Jt&&`documentMode`in document&&(Nn=document.documentMode);var Pn=Jt&&`TextEvent`in window&&!Nn,Fn=Jt&&(!Mn||Nn&&8<Nn&&11>=Nn),In=` `,Ln=!1;function Rn(e,t){switch(e){case`keyup`:return jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Bn=!1;function Vn(e,t){switch(e){case`compositionend`:return zn(t);case`keypress`:return t.which===32?(Ln=!0,In):null;case`textInput`:return e=t.data,e===In&&Ln?null:e;default:return null}}function Hn(e,t){if(Bn)return e===`compositionend`||!Mn&&Rn(e,t)?(e=en(),$t=Qt=Zt=null,Bn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Fn&&t.locale!==`ko`?null:t.data;default:return null}}var Un={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Un[e.type]:t===`textarea`}function Gn(e,t,n,r){Ht?Ut?Ut.push(r):Ut=[r]:Ht=r,t=Td(t,`onChange`),0<t.length&&(n=new sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Kn=null,qn=null;function Jn(e){_d(e,0)}function Yn(e){if(xt(rt(e)))return e}function Xn(e,t){if(e===`change`)return t}var Zn=!1;if(Jt){var Qn;if(Jt){var $n=`oninput`in document;if(!$n){var er=document.createElement(`div`);er.setAttribute(`oninput`,`return;`),$n=typeof er.oninput==`function`}Qn=$n}else Qn=!1;Zn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Kn&&(Kn.detachEvent(`onpropertychange`,nr),qn=Kn=null)}function nr(e){if(e.propertyName===`value`&&Yn(qn)){var t=[];Gn(t,qn,e,Vt(e)),Kt(Jn,t)}}function rr(e,t,n){e===`focusin`?(tr(),Kn=t,qn=n,Kn.attachEvent(`onpropertychange`,nr)):e===`focusout`&&tr()}function ir(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Yn(qn)}function ar(e,t){if(e===`click`)return Yn(t)}function or(e,t){if(e===`input`||e===`change`)return Yn(t)}function sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var cr=typeof Object.is==`function`?Object.is:sr;function lr(e,t){if(cr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!oe.call(t,i)||!cr(e[i],t[i]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dr(e,t){var n=ur(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=ur(n)}}function fr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=St(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=St(e.document)}return t}function mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var hr=Jt&&`documentMode`in document&&11>=document.documentMode,gr=null,_r=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yr||gr==null||gr!==St(r)||(r=gr,`selectionStart`in r&&mr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),vr&&lr(vr,r)||(vr=r,r=Td(_r,`onSelect`),0<r.length&&(t=new sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Sr={animationend:xr(`Animation`,`AnimationEnd`),animationiteration:xr(`Animation`,`AnimationIteration`),animationstart:xr(`Animation`,`AnimationStart`),transitionrun:xr(`Transition`,`TransitionRun`),transitionstart:xr(`Transition`,`TransitionStart`),transitioncancel:xr(`Transition`,`TransitionCancel`),transitionend:xr(`Transition`,`TransitionEnd`)},Cr={},wr={};Jt&&(wr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),`TransitionEvent`in window||delete Sr.transitionend.transition);function Tr(e){if(Cr[e])return Cr[e];if(!Sr[e])return e;var t=Sr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wr)return Cr[e]=t[n];return e}var Er=Tr(`animationend`),Dr=Tr(`animationiteration`),Or=Tr(`animationstart`),kr=Tr(`transitionrun`),Ar=Tr(`transitionstart`),jr=Tr(`transitioncancel`),Mr=Tr(`transitionend`),Nr=new Map,Pr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Pr.push(`scrollEnd`);function Fr(e,t){Nr.set(e,t),ct(t,[e])}var Ir=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Lr=[],Rr=0,zr=0;function Br(){for(var e=Rr,t=zr=Rr=0;t<e;){var n=Lr[t];Lr[t++]=null;var r=Lr[t];Lr[t++]=null;var i=Lr[t];Lr[t++]=null;var a=Lr[t];if(Lr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Wr(n,i,a)}}function Vr(e,t,n,r){Lr[Rr++]=e,Lr[Rr++]=t,Lr[Rr++]=n,Lr[Rr++]=r,zr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Hr(e,t,n,r){return Vr(e,t,n,r),Gr(e)}function Ur(e,t){return Vr(e,null,null,t),Gr(e)}function Wr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ce(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Gr(e){if(50<cu)throw cu=0,lu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Kr={};function qr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jr(e,t,n,r){return new qr(e,t,n,r)}function Yr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xr(e,t){var n=e.alternate;return n===null?(n=Jr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Zr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Qr(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)Yr(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,H.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=Jr(31,n,t,i),e.elementType=D,e.lanes=o,e;case _:return $r(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=Jr(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case C:return e=Jr(13,n,t,i),e.elementType=C,e.lanes=o,e;case w:return e=Jr(19,n,t,i),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=Jr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function $r(e,t,n,r){return e=Jr(7,e,r,t),e.lanes=n,e}function ei(e,t,n){return e=Jr(6,e,null,t),e.lanes=n,e}function ti(e){var t=Jr(18,null,null,0);return t.stateNode=e,t}function ni(e,t,n){return t=Jr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ri=new WeakMap;function ii(e,t){if(typeof e==`object`&&e){var n=ri.get(e);return n===void 0?(t={value:e,source:t,stack:ae(t)},ri.set(e,t),t):n}return{value:e,source:t,stack:ae(t)}}var ai=[],oi=0,si=null,ci=0,li=[],ui=0,di=null,fi=1,pi=``;function mi(e,t){ai[oi++]=ci,ai[oi++]=si,si=e,ci=t}function hi(e,t,n){li[ui++]=fi,li[ui++]=pi,li[ui++]=di,di=e;var r=fi;e=pi;var i=32-Ce(r)-1;r&=~(1<<i),n+=1;var a=32-Ce(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,fi=1<<32-Ce(t)+i|n<<i|r,pi=a+e}else fi=1<<a|n<<i|r,pi=e}function gi(e){e.return!==null&&(mi(e,1),hi(e,1,0))}function _i(e){for(;e===si;)si=ai[--oi],ai[oi]=null,ci=ai[--oi],ai[oi]=null;for(;e===di;)di=li[--ui],li[ui]=null,pi=li[--ui],li[ui]=null,fi=li[--ui],li[ui]=null}function vi(e,t){li[ui++]=fi,li[ui++]=pi,li[ui++]=di,fi=t.id,pi=t.overflow,di=e}var yi=null,bi=null,xi=!1,Si=null,Ci=!1,wi=Error(a(519));function Ti(e){throw Mi(ii(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),wi}function Ei(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ke]=e,t[qe]=r,n){case`dialog`:vd(`cancel`,t),vd(`close`,t);break;case`iframe`:case`object`:case`embed`:vd(`load`,t);break;case`video`:case`audio`:for(n=0;n<hd.length;n++)vd(hd[n],t);break;case`source`:vd(`error`,t);break;case`img`:case`image`:case`link`:vd(`error`,t),vd(`load`,t);break;case`details`:vd(`toggle`,t);break;case`input`:vd(`invalid`,t),Et(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:vd(`invalid`,t);break;case`textarea`:vd(`invalid`,t),At(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&(vd(`beforetoggle`,t),vd(`toggle`,t)),r.onScroll!=null&&vd(`scroll`,t),r.onScrollEnd!=null&&vd(`scrollend`,t),r.onClick!=null&&(t.onclick=zt),t=!0):t=!1,t||Ti(e,!0)}function Oi(e){for(yi=e.return;yi;)switch(yi.tag){case 5:case 31:case 13:Ci=!1;return;case 27:case 3:Ci=!0;return;default:yi=yi.return}}function ki(e){if(e!==yi)return!1;if(!xi)return Oi(e),xi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&bi&&Ti(e),Oi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));bi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));bi=uf(e)}else t===27?(t=bi,Zd(e.type)?(e=lf,lf=null,bi=e):bi=t):bi=yi?cf(e.stateNode.nextSibling):null;return!0}function Ai(){bi=yi=null,xi=!1}function ji(){var e=Si;return e!==null&&(Jl===null?Jl=e:Jl.push.apply(Jl,e),Si=null),e}function Mi(e){Si===null?Si=[e]:Si.push(e)}var Ni=z(null),Pi=null,Fi=null;function Ii(e,t,n){V(Ni,t._currentValue),t._currentValue=n}function Li(e){e._currentValue=Ni.current,B(Ni)}function Ri(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function zi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Ri(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Ri(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function Bi(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;cr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===G.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&zi(t,e,n,r),t.flags|=262144}function Vi(e){for(e=e.firstContext;e!==null;){if(!cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Hi(e){Pi=e,Fi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ui(e){return Gi(Pi,e)}function Wi(e,t){return Pi===null&&Hi(e),Gi(e,t)}function Gi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Fi===null){if(e===null)throw Error(a(308));Fi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Fi=Fi.next=t;return n}var Ki=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},qi=t.unstable_scheduleCallback,Ji=t.unstable_NormalPriority,Yi={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xi(){return{controller:new Ki,data:new Map,refCount:0}}function Zi(e){e.refCount--,e.refCount===0&&qi(Ji,function(){e.controller.abort()})}var Qi=null,$i=0,ea=0,ta=null;function na(e,t){if(Qi===null){var n=Qi=[];$i=0,ea=ld(),ta={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return $i++,t.then(ra,ra),t}function ra(){if(--$i===0&&Qi!==null){ta!==null&&(ta.status=`fulfilled`);var e=Qi;Qi=null,ea=0,ta=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ia(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var aa=P.S;P.S=function(e,t){Zl=de(),typeof t==`object`&&t&&typeof t.then==`function`&&na(e,t),aa!==null&&aa(e,t)};var oa=z(null);function sa(){var e=oa.current;return e===null?Q.pooledCache:e}function ca(e,t){t===null?V(oa,oa.current):V(oa,t.pool)}function la(){var e=sa();return e===null?null:{parent:Yi._currentValue,pool:e}}var ua=Error(a(460)),da=Error(a(474)),fa=Error(a(542)),pa={then:function(){}};function ma(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ha(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(zt,zt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e;default:if(typeof t.status==`string`)t.then(zt,zt);else{if(e=Q,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e}throw _a=t,ua}}function ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(_a=e,ua):e}}var _a=null;function va(){if(_a===null)throw Error(a(459));var e=_a;return _a=null,e}function ya(e){if(e===ua||e===fa)throw Error(a(483))}var ba=null,xa=0;function Sa(e){var t=xa;return xa+=1,ba===null&&(ba=[]),ha(ba,e,t)}function Ca(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function wa(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ta(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Xr(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ei(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===E&&ga(a)===t.type)?(t=i(t,n.props),Ca(t,n),t.return=e,t):(t=Qr(n.type,n.key,n.props,null,e.mode,r),Ca(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ni(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=$r(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ei(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=Qr(t.type,t.key,t.props,null,e.mode,n),Ca(n,t),n.return=e,n;case g:return t=ni(t,e.mode,n),t.return=e,t;case E:return t=ga(t),f(e,t,n)}if(N(t)||A(t))return t=$r(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Sa(t),n);if(t.$$typeof===x)return f(e,Wi(e,t),n);wa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case E:return n=ga(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Sa(n),r);if(n.$$typeof===x)return p(e,t,Wi(e,n),r);wa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=ga(r),m(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Sa(r),i);if(r.$$typeof===x)return m(e,t,n,Wi(t,r),i);wa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),xi&&mi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return xi&&mi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),xi&&mi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),xi&&mi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return xi&&mi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),xi&&mi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ga(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ca(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=$r(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Qr(o.type,o.key,o.props,null,e.mode,c),Ca(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ni(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ga(o),b(e,r,o,c)}if(N(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Sa(o),c);if(o.$$typeof===x)return b(e,r,Wi(e,o),c);wa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=ei(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{xa=0;var i=b(e,t,n,r);return ba=null,i}catch(t){if(t===ua||t===fa)throw t;var a=Jr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ea=Ta(!0),Da=Ta(!1),Oa=!1;function ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Aa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Z&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Gr(e),Wr(e,null,n),t}return Vr(e,r,t,n),Gr(e)}function Na(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ze(e,n)}}function Pa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Fa=!1;function Ia(){if(Fa){var e=ta;if(e!==null)throw e}}function La(e,t,n,r){Fa=!1;var i=e.updateQueue;Oa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Fl&f)===f:(r&f)===f){f!==0&&f===ea&&(Fa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Oa=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Hl|=o,e.lanes=o,e.memoizedState=d}}function Ra(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ra(n[e],t)}var Ba=z(null),Va=z(0);function Ha(e,t){e=Bl,V(Va,e),V(Ba,t),Bl=e|t.baseLanes}function Ua(){V(Va,Bl),V(Ba,Ba.current)}function Wa(){Bl=Va.current,B(Ba),B(Va)}var Ga=z(null),Ka=null;function qa(e){var t=e.alternate;V(Qa,Qa.current&1),V(Ga,e),Ka===null&&(t===null||Ba.current!==null||t.memoizedState!==null)&&(Ka=e)}function Ja(e){V(Qa,Qa.current),V(Ga,e),Ka===null&&(Ka=e)}function Ya(e){e.tag===22?(V(Qa,Qa.current),V(Ga,e),Ka===null&&(Ka=e)):Xa(e)}function Xa(){V(Qa,Qa.current),V(Ga,Ga.current)}function Za(e){B(Ga),Ka===e&&(Ka=null),B(Qa)}var Qa=z(0);function $a(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var eo=0,to=null,no=null,ro=null,io=!1,ao=!1,oo=!1,so=0,co=0,lo=null,uo=0;function fo(){throw Error(a(321))}function po(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function mo(e,t,n,r,i,a){return eo=a,to=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?js:Ms,oo=!1,a=n(r,i),oo=!1,ao&&(a=go(t,n,r,i)),ho(e),a}function ho(e){P.H=As;var t=no!==null&&no.next!==null;if(eo=0,ro=no=to=null,io=!1,co=0,lo=null,t)throw Error(a(300));e===null||Ys||(e=e.dependencies,e!==null&&Vi(e)&&(Ys=!0))}function go(e,t,n,r){to=e;var i=0;do{if(ao&&(lo=null),co=0,ao=!1,25<=i)throw Error(a(301));if(i+=1,ro=no=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Ns,o=t(n,r)}while(ao);return o}function _o(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?wo(t):t,e=e.useState()[0],(no===null?null:no.memoizedState)!==e&&(to.flags|=1024),t}function vo(){var e=so!==0;return so=0,e}function yo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function bo(e){if(io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}io=!1}eo=0,ro=no=to=null,ao=!1,co=so=0,lo=null}function xo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ro===null?to.memoizedState=ro=e:ro=ro.next=e,ro}function So(){if(no===null){var e=to.alternate;e=e===null?null:e.memoizedState}else e=no.next;var t=ro===null?to.memoizedState:ro.next;if(t!==null)ro=t,no=e;else{if(e===null)throw to.alternate===null?Error(a(467)):Error(a(310));no=e,e={memoizedState:no.memoizedState,baseState:no.baseState,baseQueue:no.baseQueue,queue:no.queue,next:null},ro===null?to.memoizedState=ro=e:ro=ro.next=e}return ro}function Co(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wo(e){var t=co;return co+=1,lo===null&&(lo=[]),e=ha(lo,e,t),t=to,(ro===null?t.memoizedState:ro.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?js:Ms),e}function To(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return wo(e);if(e.$$typeof===x)return Ui(e)}throw Error(a(438,String(e)))}function Eo(e){var t=null,n=to.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=to.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Co(),to.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=O;return t.index++,n}function Do(e,t){return typeof t==`function`?t(e):t}function Oo(e){return ko(So(),no,e)}function ko(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(eo&f)===f:(Fl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ea&&(d=!0);else if((eo&p)===p){u=u.next,p===ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,to.lanes|=p,Hl|=p;f=u.action,oo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,to.lanes|=f,Hl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!cr(o,e.memoizedState)&&(Ys=!0,d&&(n=ta,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ao(e){var t=So(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);cr(o,t.memoizedState)||(Ys=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function jo(e,t,n){var r=to,i=So(),o=xi;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!cr((no||i).memoizedState,n);if(s&&(i.memoizedState=n,Ys=!0),i=i.queue,ns(Po.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||ro!==null&&ro.memoizedState.tag&1){if(r.flags|=2048,Zo(9,{destroy:void 0},No.bind(null,r,i,n,t),null),Q===null)throw Error(a(349));o||eo&127||Mo(r,t,n)}return n}function Mo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=to.updateQueue,t===null?(t=Co(),to.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function No(e,t,n,r){t.value=n,t.getSnapshot=r,Fo(t)&&Io(e)}function Po(e,t,n){return n(function(){Fo(t)&&Io(e)})}function Fo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cr(e,n)}catch{return!0}}function Io(e){var t=Ur(e,2);t!==null&&fu(t,e,2)}function Lo(e){var t=xo();if(typeof e==`function`){var n=e;if(e=n(),oo){Se(!0);try{n()}finally{Se(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:e},t}function Ro(e,t,n,r){return e.baseState=n,ko(e,no,typeof r==`function`?r:Do)}function zo(e,t,n,r,i){if(Ds(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Bo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Bo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Vo(e,t,s)}catch(n){Uo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Vo(e,t,a)}catch(n){Uo(e,t,n)}}function Vo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ho(e,t,n)},function(n){return Uo(e,t,n)}):Ho(e,t,n)}function Ho(e,t,n){t.status=`fulfilled`,t.value=n,Wo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Bo(e,n)))}function Uo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Wo(t),t=t.next;while(t!==r)}e.action=null}function Wo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Go(e,t){return t}function Ko(e,t){if(xi){var n=Q.formState;if(n!==null){a:{var r=to;if(xi){if(bi){b:{for(var i=bi,a=Ci;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){bi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ti(r)}r=!1}r&&(t=n[0])}}return n=xo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Go,lastRenderedState:t},n.queue=r,n=ws.bind(null,to,r),r.dispatch=n,r=Lo(!1),a=Es.bind(null,to,!1,r.queue),r=xo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=zo.bind(null,to,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function qo(e){return Jo(So(),no,e)}function Jo(e,t,n){if(t=ko(e,t,Go)[0],e=Oo(Do)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=wo(t)}catch(e){throw e===ua?fa:e}else r=t;t=So();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(to.flags|=2048,Zo(9,{destroy:void 0},Yo.bind(null,i,n),null)),[r,a,e]}function Yo(e,t){e.action=t}function Xo(e){var t=So(),n=no;if(n!==null)return Jo(t,n,e);So(),t=t.memoizedState,n=So();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Zo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=to.updateQueue,t===null&&(t=Co(),to.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Qo(){return So().memoizedState}function $o(e,t,n,r){var i=xo();to.flags|=e,i.memoizedState=Zo(1|t,{destroy:void 0},n,r===void 0?null:r)}function es(e,t,n,r){var i=So();r=r===void 0?null:r;var a=i.memoizedState.inst;no!==null&&r!==null&&po(r,no.memoizedState.deps)?i.memoizedState=Zo(t,a,n,r):(to.flags|=e,i.memoizedState=Zo(1|t,a,n,r))}function ts(e,t){$o(8390656,8,e,t)}function ns(e,t){es(2048,8,e,t)}function rs(e){to.flags|=4;var t=to.updateQueue;if(t===null)t=Co(),to.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function is(e){var t=So().memoizedState;return rs({ref:t,nextImpl:e}),function(){if(Z&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function as(e,t){return es(4,2,e,t)}function os(e,t){return es(4,4,e,t)}function ss(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function cs(e,t,n){n=n==null?null:n.concat([e]),es(4,4,ss.bind(null,t,e),n)}function ls(){}function us(e,t){var n=So();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&po(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ds(e,t){var n=So();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&po(t,r[1]))return r[0];if(r=e(),oo){Se(!0);try{e()}finally{Se(!1)}}return n.memoizedState=[r,t],r}function fs(e,t,n){return n===void 0||eo&1073741824&&!(Fl&261930)?e.memoizedState=t:(e.memoizedState=n,e=du(),to.lanes|=e,Hl|=e,n)}function ps(e,t,n,r){return cr(n,t)?n:Ba.current===null?!(eo&42)||eo&1073741824&&!(Fl&261930)?(Ys=!0,e.memoizedState=n):(e=du(),to.lanes|=e,Hl|=e,t):(e=fs(e,n,r),cr(e,t)||(Ys=!0),e)}function ms(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Es(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ts(e,t,ia(c,r),uu(e)):Ts(e,t,r,uu(e))}catch(n){Ts(e,t,{then:function(){},status:`rejected`,reason:n},uu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function hs(){}function gs(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=_s(e).queue;ms(e,i,t,I,n===null?hs:function(){return vs(e),n(r)})}function _s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Do,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vs(e){var t=_s(e);t.next===null&&(t=e.alternate.memoizedState),Ts(e,t.next.queue,{},uu())}function ys(){return Ui(Qf)}function bs(){return So().memoizedState}function xs(){return So().memoizedState}function Ss(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=uu();e=ja(n);var r=Ma(t,e,n);r!==null&&(fu(r,t,n),Na(r,t,n)),t={cache:Xi()},e.payload=t;return}t=t.return}}function Cs(e,t,n){var r=uu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ds(e)?Os(t,n):(n=Hr(e,t,n,r),n!==null&&(fu(n,e,r),ks(n,t,r)))}function ws(e,t,n){Ts(e,t,n,uu())}function Ts(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ds(e))Os(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,cr(s,o))return Vr(e,t,i,0),Q===null&&Br(),!1}catch{}if(n=Hr(e,t,i,r),n!==null)return fu(n,e,r),ks(n,t,r),!0}return!1}function Es(e,t,n,r){if(r={lane:2,revertLane:ld(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ds(e)){if(t)throw Error(a(479))}else t=Hr(e,n,r,2),t!==null&&fu(t,e,2)}function Ds(e){var t=e.alternate;return e===to||t!==null&&t===to}function Os(e,t){ao=io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ks(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ze(e,n)}}var As={readContext:Ui,use:To,useCallback:fo,useContext:fo,useEffect:fo,useImperativeHandle:fo,useLayoutEffect:fo,useInsertionEffect:fo,useMemo:fo,useReducer:fo,useRef:fo,useState:fo,useDebugValue:fo,useDeferredValue:fo,useTransition:fo,useSyncExternalStore:fo,useId:fo,useHostTransitionStatus:fo,useFormState:fo,useActionState:fo,useOptimistic:fo,useMemoCache:fo,useCacheRefresh:fo};As.useEffectEvent=fo;var js={readContext:Ui,use:To,useCallback:function(e,t){return xo().memoizedState=[e,t===void 0?null:t],e},useContext:Ui,useEffect:ts,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),$o(4194308,4,ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $o(4194308,4,e,t)},useInsertionEffect:function(e,t){$o(4,2,e,t)},useMemo:function(e,t){var n=xo();t=t===void 0?null:t;var r=e();if(oo){Se(!0);try{e()}finally{Se(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=xo();if(n!==void 0){var i=n(t);if(oo){Se(!0);try{n(t)}finally{Se(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Cs.bind(null,to,e),[r.memoizedState,e]},useRef:function(e){var t=xo();return e={current:e},t.memoizedState=e},useState:function(e){e=Lo(e);var t=e.queue,n=ws.bind(null,to,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ls,useDeferredValue:function(e,t){return fs(xo(),e,t)},useTransition:function(){var e=Lo(!1);return e=ms.bind(null,to,e.queue,!0,!1),xo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=to,i=xo();if(xi){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Q===null)throw Error(a(349));Fl&127||Mo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ts(Po.bind(null,r,o,e),[e]),r.flags|=2048,Zo(9,{destroy:void 0},No.bind(null,r,o,n,t),null),n},useId:function(){var e=xo(),t=Q.identifierPrefix;if(xi){var n=pi,r=fi;n=(r&~(1<<32-Ce(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=so++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=uo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ys,useFormState:Ko,useActionState:Ko,useOptimistic:function(e){var t=xo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Es.bind(null,to,!0,n),n.dispatch=t,[e,t]},useMemoCache:Eo,useCacheRefresh:function(){return xo().memoizedState=Ss.bind(null,to)},useEffectEvent:function(e){var t=xo(),n={impl:e};return t.memoizedState=n,function(){if(Z&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Ms={readContext:Ui,use:To,useCallback:us,useContext:Ui,useEffect:ns,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Oo,useRef:Qo,useState:function(){return Oo(Do)},useDebugValue:ls,useDeferredValue:function(e,t){return ps(So(),no.memoizedState,e,t)},useTransition:function(){var e=Oo(Do)[0],t=So().memoizedState;return[typeof e==`boolean`?e:wo(e),t]},useSyncExternalStore:jo,useId:bs,useHostTransitionStatus:ys,useFormState:qo,useActionState:qo,useOptimistic:function(e,t){return Ro(So(),no,e,t)},useMemoCache:Eo,useCacheRefresh:xs};Ms.useEffectEvent=is;var Ns={readContext:Ui,use:To,useCallback:us,useContext:Ui,useEffect:ns,useImperativeHandle:cs,useInsertionEffect:as,useLayoutEffect:os,useMemo:ds,useReducer:Ao,useRef:Qo,useState:function(){return Ao(Do)},useDebugValue:ls,useDeferredValue:function(e,t){var n=So();return no===null?fs(n,e,t):ps(n,no.memoizedState,e,t)},useTransition:function(){var e=Ao(Do)[0],t=So().memoizedState;return[typeof e==`boolean`?e:wo(e),t]},useSyncExternalStore:jo,useId:bs,useHostTransitionStatus:ys,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){var n=So();return no===null?(n.baseState=e,[e,n.queue.dispatch]):Ro(n,no,e,t)},useMemoCache:Eo,useCacheRefresh:xs};Ns.useEffectEvent=is;function Ps(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=uu(),i=ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(fu(t,e,r),Na(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=uu(),i=ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(fu(t,e,r),Na(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=uu(),r=ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ma(e,r,n),t!==null&&(fu(t,e,n),Na(t,e,n))}};function Is(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!lr(n,r)||!lr(i,a):!0}function Ls(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Fs.enqueueReplaceState(t,t.state,null)}function Rs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function zs(e){Ir(e)}function Bs(e){console.error(e)}function Vs(e){Ir(e)}function Hs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Us(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ws(e,t,n){return n=ja(n),n.tag=3,n.payload={element:null},n.callback=function(){Hs(e,t)},n}function Gs(e){return e=ja(e),e.tag=3,e}function Ks(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Us(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Us(t,n,r),typeof i!=`function`&&(eu===null?eu=new Set([this]):eu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function qs(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Bi(t,n,i,!0),n=Ga.current,n!==null){switch(n.tag){case 31:case 13:return Ka===null?wu():n.alternate===null&&Vl===0&&(Vl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Uu(e,r,i)),!1;case 22:return n.flags|=65536,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Uu(e,r,i)),!1}throw Error(a(435,n.tag))}return Uu(e,r,i),wu(),!1}if(xi)return t=Ga.current,t===null?(r!==wi&&(t=Error(a(423),{cause:r}),Mi(ii(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=ii(r,n),i=Ws(e.stateNode,r,i),Pa(e,i),Vl!==4&&(Vl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==wi&&(e=Error(a(422),{cause:r}),Mi(ii(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=ii(o,n),ql===null?ql=[o]:ql.push(o),Vl!==4&&(Vl=2),t===null)return!0;r=ii(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Ws(n.stateNode,r,e),Pa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(eu===null||!eu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Gs(i),Ks(i,e,n,r),Pa(n,i),!1}n=n.return}while(n!==null);return!1}var Js=Error(a(461)),Ys=!1;function Xs(e,t,n,r){t.child=e===null?Da(t,null,n,r):Ea(t,e.child,n,r)}function Zs(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Hi(t),r=mo(e,t,n,o,a,i),s=vo(),e!==null&&!Ys?(yo(e,t,i),xc(e,t,i)):(xi&&s&&gi(t),t.flags|=1,Xs(e,t,r,i),t.child)}function Qs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Yr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,$s(e,t,a,r,i)):(e=Qr(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Sc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?lr:n,n(o,r)&&e.ref===t.ref)return xc(e,t,i)}return t.flags|=1,e=Xr(a,r),e.ref=t.ref,e.return=t,t.child=e}function $s(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref)if(Ys=!1,t.pendingProps=r=a,Sc(e,i))e.flags&131072&&(Ys=!0);else return t.lanes=e.lanes,xc(e,t,i)}return sc(e,t,n,r,i)}function ec(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return nc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ca(t,a===null?null:a.cachePool),a===null?Ua():Ha(t,a),Ya(t);else return r=t.lanes=536870912,nc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ca(t,null),Ua(),Xa(t)):(ca(t,a.cachePool),Ha(t,a),Xa(t),t.memoizedState=null);return Xs(e,t,i,n),t.child}function tc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nc(e,t,n,r,i){var a=sa();return a=a===null?null:{parent:Yi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ca(t,null),Ua(),Ya(t),e!==null&&Bi(e,t,r,!0),t.childLanes=i,null}function rc(e,t){return t=gc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ic(e,t,n){return Ea(t,e.child,null,n),e=rc(t,t.pendingProps),e.flags|=2,Za(t),t.memoizedState=null,e}function ac(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(xi){if(r.mode===`hidden`)return e=rc(t,r),t.lanes=536870912,tc(null,e);if(Ja(t),(e=bi)?(e=rf(e,Ci),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:di===null?null:{id:fi,overflow:pi},retryLane:536870912,hydrationErrors:null},n=ti(e),n.return=t,t.child=n,yi=t,bi=null)):e=null,e===null)throw Ti(t);return t.lanes=536870912,null}return rc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ja(t),i)if(t.flags&256)t.flags&=-257,t=ic(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(Ys||Bi(e,t,n,!1),i=(n&e.childLanes)!==0,Ys||i){if(r=Q,r!==null&&(s=Be(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ur(e,s),fu(r,e,s),Js;wu(),t=ic(e,t,n)}else e=o.treeContext,bi=cf(s.nextSibling),yi=t,xi=!0,Si=null,Ci=!1,e!==null&&vi(t,e),t=rc(t,r),t.flags|=4096;return t}return e=Xr(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function oc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function sc(e,t,n,r,i){return Hi(t),n=mo(e,t,n,r,void 0,i),r=vo(),e!==null&&!Ys?(yo(e,t,i),xc(e,t,i)):(xi&&r&&gi(t),t.flags|=1,Xs(e,t,n,i),t.child)}function cc(e,t,n,r,i,a){return Hi(t),t.updateQueue=null,n=go(t,r,n,i),ho(e),r=vo(),e!==null&&!Ys?(yo(e,t,a),xc(e,t,a)):(xi&&r&&gi(t),t.flags|=1,Xs(e,t,n,a),t.child)}function lc(e,t,n,r,i){if(Hi(t),t.stateNode===null){var a=Kr,o=n.contextType;typeof o==`object`&&o&&(a=Ui(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Fs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ka(t),o=n.contextType,a.context=typeof o==`object`&&o?Ui(o):Kr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ps(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Fs.enqueueReplaceState(a,a.state,null),La(t,r,a,i),Ia(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Rs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Kr,typeof u==`object`&&u&&(o=Ui(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ls(t,a,r,o),Oa=!1;var f=t.memoizedState;a.state=f,La(t,r,a,i),Ia(),l=t.memoizedState,s||f!==l||Oa?(typeof d==`function`&&(Ps(t,n,d,r),l=t.memoizedState),(c=Oa||Is(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Aa(e,t),o=t.memoizedProps,u=Rs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Kr,typeof l==`object`&&l&&(c=Ui(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ls(t,a,r,c),Oa=!1,f=t.memoizedState,a.state=f,La(t,r,a,i),Ia();var p=t.memoizedState;o!==d||f!==p||Oa||e!==null&&e.dependencies!==null&&Vi(e.dependencies)?(typeof s==`function`&&(Ps(t,n,s,r),p=t.memoizedState),(u=Oa||Is(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Vi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,oc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ea(t,e.child,null,i),t.child=Ea(t,null,n,i)):Xs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=xc(e,t,i),e}function uc(e,t,n,r){return Ai(),t.flags|=256,Xs(e,t,n,r),t.child}var dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fc(e){return{baseLanes:e,cachePool:la()}}function pc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Gl),e}function mc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(Qa.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(xi){if(i?qa(t):Xa(t),(e=bi)?(e=rf(e,Ci),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:di===null?null:{id:fi,overflow:pi},retryLane:536870912,hydrationErrors:null},n=ti(e),n.return=t,t.child=n,yi=t,bi=null)):e=null,e===null)throw Ti(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(Xa(t),i=t.mode,c=gc({mode:`hidden`,children:c},i),r=$r(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=fc(n),r.childLanes=pc(e,s,n),t.memoizedState=dc,tc(null,r)):(qa(t),hc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(qa(t),t.flags&=-257,t=_c(e,t,n)):t.memoizedState===null?(Xa(t),c=r.fallback,i=t.mode,r=gc({mode:`visible`,children:r.children},i),c=$r(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ea(t,e.child,null,n),r=t.child,r.memoizedState=fc(n),r.childLanes=pc(e,s,n),t.memoizedState=dc,t=tc(null,r)):(Xa(t),t.child=e.child,t.flags|=128,t=null);else if(qa(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Mi({value:r,source:null,stack:null}),t=_c(e,t,n)}else if(Ys||Bi(e,t,n,!1),s=(n&e.childLanes)!==0,Ys||s){if(s=Q,s!==null&&(r=Be(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Ur(e,r),fu(s,e,r),Js;af(c)||wu(),t=_c(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,bi=cf(c.nextSibling),yi=t,xi=!0,Si=null,Ci=!1,e!==null&&vi(t,e),t=hc(t,r.children),t.flags|=4096);return t}return i?(Xa(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=Xr(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=$r(c,i,n,null),c.flags|=2):c=Xr(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,tc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=fc(n):(i=c.cachePool,i===null?i=la():(l=Yi._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=pc(e,s,n),t.memoizedState=dc,tc(e.child,r)):(qa(t),n=e.child,e=n.sibling,n=Xr(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function hc(e,t){return t=gc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function gc(e,t){return e=Jr(22,e,null,t),e.lanes=0,e}function _c(e,t,n){return Ea(t,e.child,null,n),e=hc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ri(e.return,t,n)}function yc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function bc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Qa.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,V(Qa,o),Xs(e,t,r,n),r=xi?ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vc(e,n,t);else if(e.tag===19)vc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&$a(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),yc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&$a(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}yc(t,!0,n,null,a,r);break;case`together`:yc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function xc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Bi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=Xr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Vi(e))):!0}function Cc(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Ii(t,Yi,e.memoizedState.cache),Ai();break;case 27:case 5:J(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Ii(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ja(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(qa(t),e=xc(e,t,n),e===null?null:e.sibling):mc(e,t,n):(qa(t),t.flags|=128,null);qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Bi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return bc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(Qa,Qa.current),r)break;return null;case 22:return t.lanes=0,ec(e,t,n,t.pendingProps);case 24:Ii(t,Yi,e.memoizedState.cache)}return xc(e,t,n)}function wc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ys=!0;else{if(!Sc(e,n)&&!(t.flags&128))return Ys=!1,Cc(e,t,n);Ys=!!(e.flags&131072)}else Ys=!1,xi&&t.flags&1048576&&hi(t,ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ga(t.elementType),t.type=e,typeof e==`function`)Yr(e)?(r=Rs(e,r),t.tag=1,t=lc(null,t,e,r,n)):(t.tag=0,t=sc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=Zs(null,t,e,r,n);break a}else if(i===T){t.tag=14,t=Qs(null,t,e,r,n);break a}}throw t=M(e)||e,Error(a(306,t,``))}}return t;case 0:return sc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Rs(r,t.pendingProps),lc(e,t,r,i,n);case 3:a:{if(K(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Aa(e,t),La(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ii(t,Yi,r),r!==o.cache&&zi(t,[Yi],n,!0),Ia(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=uc(e,t,r,n);break a}else if(r!==i){i=ii(Error(a(424)),t),Mi(i),t=uc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(bi=cf(e.firstChild),yi=t,xi=!0,Si=null,Ci=!0,n=Da(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ai(),r===i){t=xc(e,t,n);break a}Xs(e,t,r,n)}t=t.child}return t;case 26:return oc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:xi||(n=t.type,e=t.pendingProps,r=Bd(W.current).createElement(n),r[Ke]=t,r[qe]=e,Pd(r,n,e),at(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return J(t),e===null&&xi&&(r=t.stateNode=ff(t.type,t.pendingProps,W.current),yi=t,Ci=!0,i=bi,Zd(t.type)?(lf=i,bi=cf(r.firstChild)):bi=i),Xs(e,t,t.pendingProps.children,n),oc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&xi&&((i=r=bi)&&(r=tf(r,t.type,t.pendingProps,Ci),r===null?i=!1:(t.stateNode=r,yi=t,bi=cf(r.firstChild),Ci=!1,i=!0)),i||Ti(t)),J(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(i,o)?r=null:s!==null&&Ud(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=mo(e,t,_o,null,null,n),Qf._currentValue=i),oc(e,t),Xs(e,t,r,n),t.child;case 6:return e===null&&xi&&((e=n=bi)&&(n=nf(n,t.pendingProps,Ci),n===null?e=!1:(t.stateNode=n,yi=t,bi=null,e=!0)),e||Ti(t)),null;case 13:return mc(e,t,n);case 4:return K(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ea(t,null,r,n):Xs(e,t,r,n),t.child;case 11:return Zs(e,t,t.type,t.pendingProps,n);case 7:return Xs(e,t,t.pendingProps,n),t.child;case 8:return Xs(e,t,t.pendingProps.children,n),t.child;case 12:return Xs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ii(t,t.type,r.value),Xs(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Hi(t),i=Ui(i),r=r(i),t.flags|=1,Xs(e,t,r,n),t.child;case 14:return Qs(e,t,t.type,t.pendingProps,n);case 15:return $s(e,t,t.type,t.pendingProps,n);case 19:return bc(e,t,n);case 31:return ac(e,t,n);case 22:return ec(e,t,n,t.pendingProps);case 24:return Hi(t),r=Ui(Yi),e===null?(i=sa(),i===null&&(i=Q,o=Xi(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},ka(t),Ii(t,Yi,i)):((e.lanes&n)!==0&&(Aa(e,t),La(t,null,null,n),Ia()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Ii(t,Yi,r),r!==i.cache&&zi(t,[Yi],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ii(t,Yi,r))),Xs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Tc(e){e.flags|=4}function Ec(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(xu())e.flags|=8192;else throw _a=pa,da}else e.flags&=-16777217}function Dc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(xu())e.flags|=8192;else throw _a=pa,da}function Oc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Pe(),e.lanes|=t,Kl|=t)}function kc(e,t){if(!xi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ac(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function jc(e,t,n){var r=t.pendingProps;switch(_i(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ac(t),null;case 1:return Ac(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Li(Yi),q(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ki(t)?Tc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ji())),Ac(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Tc(t),o===null?(Ac(t),Ec(t,i,null,r,n)):(Ac(t),Dc(t,o))):o?o===e.memoizedState?(Ac(t),t.flags&=-16777217):(Tc(t),Ac(t),Dc(t,o)):(e=e.memoizedProps,e!==r&&Tc(t),Ac(t),Ec(t,i,e,r,n)),null;case 27:if(ee(t),n=W.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ac(t),null}e=H.current,ki(t)?Ei(t,e):(e=ff(i,r,n),t.stateNode=e,Tc(t))}return Ac(t),null;case 5:if(ee(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Tc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ac(t),null}if(o=H.current,ki(t))Ei(t,o);else{var s=Bd(W.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[Ke]=t,o[qe]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Tc(t)}}return Ac(t),Ec(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Tc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=W.current,ki(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=yi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ke]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Ti(t,!0)}else e=Bd(e).createTextNode(r),e[Ke]=t,t.stateNode=e}return Ac(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ki(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[Ke]=t}else Ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ac(t),e=!1}else n=ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Za(t),t):(Za(t),null);if(t.flags&128)throw Error(a(558))}return Ac(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ki(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[Ke]=t}else Ai(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ac(t),i=!1}else i=ji(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Za(t),t):(Za(t),null)}return Za(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Oc(t,t.updateQueue),Ac(t),null);case 4:return q(),e===null&&xd(t.stateNode.containerInfo),Ac(t),null;case 10:return Li(t.type),Ac(t),null;case 19:if(B(Qa),r=t.memoizedState,r===null)return Ac(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)kc(r,!1);else{if(Vl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=$a(e),o!==null){for(t.flags|=128,kc(r,!1),e=o.updateQueue,t.updateQueue=e,Oc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Zr(n,e),n=n.sibling;return V(Qa,Qa.current&1|2),xi&&mi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&de()>Ql&&(t.flags|=128,i=!0,kc(r,!1),t.lanes=4194304)}else{if(!i)if(e=$a(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Oc(t,e),kc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!xi)return Ac(t),null}else 2*de()-r.renderingStartTime>Ql&&n!==536870912&&(t.flags|=128,i=!0,kc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ac(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=de(),e.sibling=null,n=Qa.current,V(Qa,i?n&1|2:n&1),xi&&mi(t,r.treeForkCount),e);case 22:case 23:return Za(t),Wa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ac(t),t.subtreeFlags&6&&(t.flags|=8192)):Ac(t),n=t.updateQueue,n!==null&&Oc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&B(oa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Li(Yi),Ac(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Mc(e,t){switch(_i(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Li(Yi),q(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ee(t),null;case 31:if(t.memoizedState!==null){if(Za(t),t.alternate===null)throw Error(a(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Za(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Ai()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Qa),null;case 4:return q(),null;case 10:return Li(t.type),null;case 22:case 23:return Za(t),Wa(),e!==null&&B(oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Li(Yi),null;case 25:return null;default:return null}}function Nc(e,t){switch(_i(t),t.tag){case 3:Li(Yi),q();break;case 26:case 27:case 5:ee(t);break;case 4:q();break;case 31:t.memoizedState!==null&&Za(t);break;case 13:Za(t);break;case 19:B(Qa);break;case 10:Li(t.type);break;case 22:case 23:Za(t),Wa(),e!==null&&B(oa);break;case 24:Li(Yi)}}function Pc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Hu(t,t.return,e)}}function Fc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Hu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Hu(t,t.return,e)}}function Ic(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{za(t,n)}catch(t){Hu(e,e.return,t)}}}function Lc(e,t,n){n.props=Rs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Hu(e,t,n)}}function Rc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Hu(e,t,n)}}function zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Hu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Hu(e,t,n)}else n.current=null}function Bc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Hu(e,e.return,t)}}function Vc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[qe]=t}catch(t){Hu(e,e.return,t)}}function Hc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Uc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Hc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=zt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Wc(e,t,n),e=e.sibling;e!==null;)Wc(e,t,n),e=e.sibling}function Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[Ke]=e,t[qe]=n}catch(t){Hu(e,e.return,t)}}var qc=!1,Jc=!1,Yc=!1,Xc=typeof WeakSet==`function`?WeakSet:Set,Zc=null;function Qc(e,t){if(e=e.containerInfo,Rd=sp,e=pr(e),mr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,Zc=t;Zc!==null;)if(t=Zc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Zc=e;else for(;Zc!==null;){switch(t=Zc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Rs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Hu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,Zc=e;break}Zc=t.return}}function $c(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ml(e,n),r&4&&Pc(5,n);break;case 1:if(ml(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Hu(n,n.return,e)}else{var i=Rs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Hu(n,n.return,e)}}r&64&&Ic(n),r&512&&Rc(n,n.return);break;case 3:if(ml(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{za(e,t)}catch(e){Hu(n,n.return,e)}}break;case 27:t===null&&r&4&&Kc(n);case 26:case 5:ml(e,n),t===null&&r&4&&Bc(n),r&512&&Rc(n,n.return);break;case 12:ml(e,n);break;case 31:ml(e,n),r&4&&al(e,n);break;case 13:ml(e,n),r&4&&ol(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ku.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||qc,!r){t=t!==null&&t.memoizedState!==null||Jc,i=qc;var a=Jc;qc=r,(Jc=t)&&!a?gl(e,n,(n.subtreeFlags&8772)!=0):ml(e,n),qc=i,Jc=a}break;case 30:break;default:ml(e,n)}}function el(e){var t=e.alternate;t!==null&&(e.alternate=null,el(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&et(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var tl=null,nl=!1;function rl(e,t,n){for(n=n.child;n!==null;)il(e,t,n),n=n.sibling}function il(e,t,n){if(xe&&typeof xe.onCommitFiberUnmount==`function`)try{xe.onCommitFiberUnmount(be,n)}catch{}switch(n.tag){case 26:Jc||zc(n,t),rl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Jc||zc(n,t);var r=tl,i=nl;Zd(n.type)&&(tl=n.stateNode,nl=!1),rl(e,t,n),pf(n.stateNode),tl=r,nl=i;break;case 5:Jc||zc(n,t);case 6:if(r=tl,i=nl,tl=null,rl(e,t,n),tl=r,nl=i,tl!==null)if(nl)try{(tl.nodeType===9?tl.body:tl.nodeName===`HTML`?tl.ownerDocument.body:tl).removeChild(n.stateNode)}catch(e){Hu(n,t,e)}else try{tl.removeChild(n.stateNode)}catch(e){Hu(n,t,e)}break;case 18:tl!==null&&(nl?(e=tl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(tl,n.stateNode));break;case 4:r=tl,i=nl,tl=n.stateNode.containerInfo,nl=!0,rl(e,t,n),tl=r,nl=i;break;case 0:case 11:case 14:case 15:Fc(2,n,t),Jc||Fc(4,n,t),rl(e,t,n);break;case 1:Jc||(zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Lc(n,t,r)),rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:Jc=(r=Jc)||n.memoizedState!==null,rl(e,t,n),Jc=r;break;default:rl(e,t,n)}}function al(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Hu(t,t.return,e)}}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Hu(t,t.return,e)}}function sl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Xc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Xc),t;default:throw Error(a(435,e.tag))}}function cl(e,t){var n=sl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=qu.bind(null,e,t);t.then(r,r)}})}function ll(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){tl=c.stateNode,nl=!1;break a}break;case 5:tl=c.stateNode,nl=!1;break a;case 3:case 4:tl=c.stateNode.containerInfo,nl=!0;break a}c=c.return}if(tl===null)throw Error(a(160));il(o,s,i),tl=null,nl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)dl(t,e),t=t.sibling}var ul=null;function dl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ll(t,e),fl(e),r&4&&(Fc(3,e,e.return),Pc(3,e),Fc(5,e,e.return));break;case 1:ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),r&64&&qc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=ul;if(ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[$e]||o[Ke]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Pd(o,r,n),o[Ke]=e,at(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[Ke]=e,at(o),r=o}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Vc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),n!==null&&r&4&&Vc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ll(t,e),fl(e),r&512&&(Jc||n===null||zc(n,n.return)),e.flags&32){i=e.stateNode;try{jt(i,``)}catch(t){Hu(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Vc(e,i,n===null?i:n.memoizedProps)),r&1024&&(Yc=!0);break;case 6:if(ll(t,e),fl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Hu(e,e.return,t)}}break;case 3:if(Bf=null,i=ul,ul=gf(t.containerInfo),ll(t,e),ul=i,fl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Hu(e,e.return,t)}Yc&&(Yc=!1,pl(e));break;case 4:r=ul,ul=gf(e.stateNode.containerInfo),ll(t,e),fl(e),ul=r;break;case 12:ll(t,e),fl(e);break;case 31:ll(t,e),fl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,cl(e,r)));break;case 13:ll(t,e),fl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Xl=de()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,cl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=qc,d=Jc;if(qc=u||i,Jc=d||l,ll(t,e),Jc=d,qc=u,fl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||qc||Jc||hl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Hu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Hu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Hu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,cl(e,n))));break;case 19:ll(t,e),fl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,cl(e,r)));break;case 30:break;case 21:break;default:ll(t,e),fl(e)}}function fl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Hc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Gc(e,Uc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(jt(o,``),n.flags&=-33),Gc(e,Uc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Wc(e,Uc(e),s);break;default:throw Error(a(161))}}catch(t){Hu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function pl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;pl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ml(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$c(e,t.alternate,t),t=t.sibling}function hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fc(4,t,t.return),hl(t);break;case 1:zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Lc(t,t.return,n),hl(t);break;case 27:pf(t.stateNode);case 26:case 5:zc(t,t.return),hl(t);break;case 22:t.memoizedState===null&&hl(t);break;case 30:hl(t);break;default:hl(t)}e=e.sibling}}function gl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:gl(i,a,n),Pc(4,a);break;case 1:if(gl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Hu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ra(c[i],s)}catch(e){Hu(r,r.return,e)}}n&&o&64&&Ic(a),Rc(a,a.return);break;case 27:Kc(a);case 26:case 5:gl(i,a,n),n&&r===null&&o&4&&Bc(a),Rc(a,a.return);break;case 12:gl(i,a,n);break;case 31:gl(i,a,n),n&&o&4&&al(i,a);break;case 13:gl(i,a,n),n&&o&4&&ol(i,a);break;case 22:a.memoizedState===null&&gl(i,a,n),Rc(a,a.return);break;case 30:break;default:gl(i,a,n)}t=t.sibling}}function _l(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Zi(n))}function vl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e))}function yl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)bl(e,t,n,r),t=t.sibling}function bl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:yl(e,t,n,r),i&2048&&Pc(9,t);break;case 1:yl(e,t,n,r);break;case 3:yl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e)));break;case 12:if(i&2048){yl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Hu(t,t.return,e)}}else yl(e,t,n,r);break;case 31:yl(e,t,n,r);break;case 13:yl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?yl(e,t,n,r):(a._visibility|=2,xl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?yl(e,t,n,r):Sl(e,t),i&2048&&_l(o,t);break;case 24:yl(e,t,n,r),i&2048&&vl(t.alternate,t);break;default:yl(e,t,n,r)}}function xl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:xl(a,o,s,c,i),Pc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,xl(a,o,s,c,i)):u._visibility&2?xl(a,o,s,c,i):Sl(a,o),i&&l&2048&&_l(o.alternate,o);break;case 24:xl(a,o,s,c,i),i&&l&2048&&vl(o.alternate,o);break;default:xl(a,o,s,c,i)}t=t.sibling}}function Sl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Sl(n,r),i&2048&&_l(r.alternate,r);break;case 24:Sl(n,r),i&2048&&vl(r.alternate,r);break;default:Sl(n,r)}t=t.sibling}}var Cl=8192;function wl(e,t,n){if(e.subtreeFlags&Cl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:wl(e,t,n),e.flags&Cl&&e.memoizedState!==null&&Gf(n,ul,e.memoizedState,e.memoizedProps);break;case 5:wl(e,t,n);break;case 3:case 4:var r=ul;ul=gf(e.stateNode.containerInfo),wl(e,t,n),ul=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Cl,Cl=16777216,wl(e,t,n),Cl=r):wl(e,t,n));break;default:wl(e,t,n)}}function Dl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Zc=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Fc(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Zc=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fc(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;Zc!==null;){var n=Zc;switch(n.tag){case 0:case 11:case 15:Fc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Zi(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Zc=r;else a:for(n=e;Zc!==null;){r=Zc;var i=r.sibling,a=r.return;if(el(r),r===n){Zc=null;break a}if(i!==null){i.return=a,Zc=i;break a}Zc=a}}}var Ml={getCacheForType:function(e){var t=Ui(Yi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ui(Yi).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Z=0,Q=null,Pl=null,Fl=0,$=0,Il=null,Ll=!1,Rl=!1,zl=!1,Bl=0,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=null,Jl=null,Yl=!1,Xl=0,Zl=0,Ql=1/0,$l=null,eu=null,tu=0,nu=null,ru=null,iu=0,au=0,ou=null,su=null,cu=0,lu=null;function uu(){return Z&2&&Fl!==0?Fl&-Fl:P.T===null?Ue():ld()}function du(){if(Gl===0)if(!(Fl&536870912)||xi){var e=Oe;Oe<<=1,!(Oe&3932160)&&(Oe=262144),Gl=e}else Gl=536870912;return e=Ga.current,e!==null&&(e.flags|=32),Gl}function fu(e,t,n){(e===Q&&($===2||$===9)||e.cancelPendingCommit!==null)&&(yu(e,0),gu(e,Fl,Gl,!1)),Ie(e,n),(!(Z&2)||e!==Q)&&(e===Q&&(!(Z&2)&&(Ul|=n),Vl===4&&gu(e,Fl,Gl,!1)),td(e))}function pu(e,t,n){if(Z&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Me(e,t),i=r?Du(e,t):Tu(e,t,!0),o=r;do{if(i===0){Rl&&!r&&gu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!hu(n)){i=Tu(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=ql;var l=c.current.memoizedState.isDehydrated;if(l&&(yu(c,s).flags|=256),s=Tu(c,s,!1),s!==2){if(zl&&!l){c.errorRecoveryDisabledLanes|=o,Ul|=o,i=4;break a}o=Jl,Jl=i,o!==null&&(Jl===null?Jl=o:Jl.push.apply(Jl,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){yu(e,0),gu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:gu(r,t,Gl,!Ll);break a;case 2:Jl=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=Xl+300-de(),10<i)){if(gu(r,t,Gl,!Ll),je(r,0,!0)!==0)break a;iu=t,r.timeoutHandle=Kd(mu.bind(null,r,n,Jl,$l,Yl,t,Gl,Ul,Kl,Ll,o,`Throttled`,-0,0),i);break a}mu(r,n,Jl,$l,Yl,t,Gl,Ul,Kl,Ll,o,null,-0,0)}}break}while(1);td(e)}function mu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:zt},El(t,a,d);var m=(a&62914560)===a?Xl-de():(a&4194048)===a?Zl-de():0;if(m=qf(d,m),m!==null){iu=a,e.cancelPendingCommit=m(Pu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),gu(e,a,o,!l);return}}Pu(e,t,a,n,r,i,o,s,c)}function hu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!cr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function gu(e,t,n,r){t&=~Wl,t&=~Ul,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ce(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Re(e,n,t)}function _u(){return Z&6?!0:(nd(0,!1),!1)}function vu(){if(Pl!==null){if($===0)var e=Pl.return;else e=Pl,Fi=Pi=null,bo(e),ba=null,xa=0,e=Pl;for(;e!==null;)Nc(e.alternate,e),e=e.return;Pl=null}}function yu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),iu=0,vu(),Q=e,Pl=n=Xr(e.current,null),Fl=t,$=0,Il=null,Ll=!1,Rl=Me(e,t),zl=!1,Kl=Gl=Wl=Ul=Hl=Vl=0,Jl=ql=null,Yl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ce(r),a=1<<i;t|=e[i],r&=~a}return Bl=t,Br(),n}function bu(e,t){to=null,P.H=As,t===ua||t===fa?(t=va(),$=3):t===da?(t=va(),$=4):$=t===Js?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Il=t,Pl===null&&(Vl=1,Hs(e,ii(t,e.current)))}function xu(){var e=Ga.current;return e===null?!0:(Fl&4194048)===Fl?Ka===null:(Fl&62914560)===Fl||Fl&536870912?e===Ka:!1}function Su(){var e=P.H;return P.H=As,e===null?As:e}function Cu(){var e=P.A;return P.A=Ml,e}function wu(){Vl=4,Ll||(Fl&4194048)!==Fl&&Ga.current!==null||(Rl=!0),!(Hl&134217727)&&!(Ul&134217727)||Q===null||gu(Q,Fl,Gl,!1)}function Tu(e,t,n){var r=Z;Z|=2;var i=Su(),a=Cu();(Q!==e||Fl!==t)&&($l=null,yu(e,t)),t=!1;var o=Vl;a:do try{if($!==0&&Pl!==null){var s=Pl,c=Il;switch($){case 8:vu(),o=6;break a;case 3:case 2:case 9:case 6:Ga.current===null&&(t=!0);var l=$;if($=0,Il=null,ju(e,s,c,l),n&&Rl){o=0;break a}break;default:l=$,$=0,Il=null,ju(e,s,c,l)}}Eu(),o=Vl;break}catch(t){bu(e,t)}while(1);return t&&e.shellSuspendCounter++,Fi=Pi=null,Z=r,P.H=i,P.A=a,Pl===null&&(Q=null,Fl=0,Br()),o}function Eu(){for(;Pl!==null;)ku(Pl)}function Du(e,t){var n=Z;Z|=2;var r=Su(),i=Cu();Q!==e||Fl!==t?($l=null,Ql=de()+500,yu(e,t)):Rl=Me(e,t);a:do try{if($!==0&&Pl!==null){t=Pl;var o=Il;b:switch($){case 1:$=0,Il=null,ju(e,t,o,1);break;case 2:case 9:if(ma(o)){$=0,Il=null,Au(t);break}t=function(){$!==2&&$!==9||Q!==e||($=7),td(e)},o.then(t,t);break a;case 3:$=7;break a;case 4:$=5;break a;case 7:ma(o)?($=0,Il=null,Au(t)):($=0,Il=null,ju(e,t,o,7));break;case 5:var s=null;switch(Pl.tag){case 26:s=Pl.memoizedState;case 5:case 27:var c=Pl;if(s?Wf(s):c.stateNode.complete){$=0,Il=null;var l=c.sibling;if(l!==null)Pl=l;else{var u=c.return;u===null?Pl=null:(Pl=u,Mu(u))}break b}}$=0,Il=null,ju(e,t,o,5);break;case 6:$=0,Il=null,ju(e,t,o,6);break;case 8:vu(),Vl=6;break a;default:throw Error(a(462))}}Ou();break}catch(t){bu(e,t)}while(1);return Fi=Pi=null,P.H=r,P.A=i,Z=n,Pl===null?(Q=null,Fl=0,Br(),Vl):0}function Ou(){for(;Pl!==null&&!le();)ku(Pl)}function ku(e){var t=wc(e.alternate,e,Bl);e.memoizedProps=e.pendingProps,t===null?Mu(e):Pl=t}function Au(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=cc(n,t,t.pendingProps,t.type,void 0,Fl);break;case 11:t=cc(n,t,t.pendingProps,t.type.render,t.ref,Fl);break;case 5:bo(t);default:Nc(n,t),t=Pl=Zr(t,Bl),t=wc(n,t,Bl)}e.memoizedProps=e.pendingProps,t===null?Mu(e):Pl=t}function ju(e,t,n,r){Fi=Pi=null,bo(t),ba=null,xa=0;var i=t.return;try{if(qs(e,i,t,n,Fl)){Vl=1,Hs(e,ii(n,e.current)),Pl=null;return}}catch(t){if(i!==null)throw Pl=i,t;Vl=1,Hs(e,ii(n,e.current)),Pl=null;return}t.flags&32768?(xi||r===1?e=!0:Rl||Fl&536870912?e=!1:(Ll=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ga.current,r!==null&&r.tag===13&&(r.flags|=16384))),Nu(t,e)):Mu(t)}function Mu(e){var t=e;do{if(t.flags&32768){Nu(t,Ll);return}e=t.return;var n=jc(t.alternate,t,Bl);if(n!==null){Pl=n;return}if(t=t.sibling,t!==null){Pl=t;return}Pl=t=e}while(t!==null);Vl===0&&(Vl=5)}function Nu(e,t){do{var n=Mc(e.alternate,e);if(n!==null){n.flags&=32767,Pl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Pl=e;return}Pl=e=n}while(e!==null);Vl=6,Pl=null}function Pu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do zu();while(tu!==0);if(Z&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=zr,Le(e,n,o,s,c,l),e===Q&&(Pl=Q=null,Fl=0),ru=t,nu=e,iu=n,au=o,ou=i,su=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Ju(he,function(){return Bu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=Z,Z|=4;try{Qc(e,t,n)}finally{Z=s,F.p=i,P.T=r}}tu=1,Fu(),Iu(),Lu()}}function Fu(){if(tu===1){tu=0;var e=nu,t=ru,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Z;Z|=4;try{dl(t,e);var a=zd,o=pr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&fr(s.ownerDocument.documentElement,s)){if(c!==null&&mr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=dr(s,h),v=dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{Z=i,F.p=r,P.T=n}}e.current=t,tu=2}}function Iu(){if(tu===2){tu=0;var e=nu,t=ru,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Z;Z|=4;try{$c(e,t.alternate,t)}finally{Z=i,F.p=r,P.T=n}}tu=3}}function Lu(){if(tu===4||tu===3){tu=0,ue();var e=nu,t=ru,n=iu,r=su;t.subtreeFlags&10256||t.flags&10256?tu=5:(tu=0,ru=nu=null,Ru(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(eu=null),He(n),t=t.stateNode,xe&&typeof xe.onCommitFiberRoot==`function`)try{xe.onCommitFiberRoot(be,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}iu&3&&zu(),td(e),i=e.pendingLanes,n&261930&&i&42?e===lu?cu++:(cu=0,lu=e):cu=0,nd(0,!1)}}function Ru(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zi(t)))}function zu(){return Fu(),Iu(),Lu(),Bu()}function Bu(){if(tu!==5)return!1;var e=nu,t=au;au=0;var n=He(iu),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=ou,ou=null;var o=nu,s=iu;if(tu=0,ru=nu=null,iu=0,Z&6)throw Error(a(331));var c=Z;if(Z|=4,kl(o.current),bl(o,o.current,s,n),Z=c,nd(0,!1),xe&&typeof xe.onPostCommitFiberRoot==`function`)try{xe.onPostCommitFiberRoot(be,o)}catch{}return!0}finally{F.p=i,P.T=r,Ru(e,t)}}function Vu(e,t,n){t=ii(n,t),t=Ws(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(Ie(e,2),td(e))}function Hu(e,t,n){if(e.tag===3)Vu(e,e,n);else for(;t!==null;){if(t.tag===3){Vu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(eu===null||!eu.has(r))){e=ii(n,e),n=Gs(2),r=Ma(t,n,2),r!==null&&(Ks(n,r,t,e),Ie(r,2),td(r));break}}t=t.return}}function Uu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(zl=!0,i.add(n),e=Wu.bind(null,e,t,n),t.then(e,e))}function Wu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Q===e&&(Fl&n)===n&&(Vl===4||Vl===3&&(Fl&62914560)===Fl&&300>de()-Xl?!(Z&2)&&yu(e,0):Wl|=n,Kl===Fl&&(Kl=0)),td(e)}function Gu(e,t){t===0&&(t=Pe()),e=Ur(e,t),e!==null&&(Ie(e,t),td(e))}function Ku(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Gu(e,n)}function qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Gu(e,n)}function Ju(e,t){return se(e,t)}var Yu=null,Xu=null,Zu=!1,Qu=!1,$u=!1,ed=0;function td(e){e!==Xu&&e.next===null&&(Xu===null?Yu=Xu=e:Xu=Xu.next=e),Qu=!0,Zu||(Zu=!0,cd())}function nd(e,t){if(!$u&&Qu){$u=!0;do for(var n=!1,r=Yu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ce(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,sd(r,a))}else a=Fl,a=je(r,r===Q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Me(r,a)||(n=!0,sd(r,a));r=r.next}while(n);$u=!1}}function rd(){id()}function id(){Qu=Zu=!1;var e=0;ed!==0&&Gd()&&(e=ed);for(var t=de(),n=null,r=Yu;r!==null;){var i=r.next,a=ad(r,t);a===0?(r.next=null,n===null?Yu=i:n.next=i,i===null&&(Xu=n)):(n=r,(e!==0||a&3)&&(Qu=!0)),r=i}tu!==0&&tu!==5||nd(e,!1),ed!==0&&(ed=0)}function ad(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ce(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ne(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Q,n=Fl,n=je(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&($===2||$===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Me(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ce(r),He(n)){case 2:case 8:n=me;break;case 32:n=he;break;case 268435456:n=_e;break;default:n=he}return r=od.bind(null,e),n=se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ce(r),e.callbackPriority=2,e.callbackNode=null,2}function od(e,t){if(tu!==0&&tu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(zu()&&e.callbackNode!==n)return null;var r=Fl;return r=je(e,e===Q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(pu(e,r,t),ad(e,de()),e.callbackNode!=null&&e.callbackNode===n?od.bind(null,e):null)}function sd(e,t){if(zu())return null;pu(e,t,!0)}function cd(){Yd(function(){Z&6?se(pe,rd):id()})}function ld(){if(ed===0){var e=ea;e===0&&(e=De,De<<=1,!(De&261888)&&(De=256)),ed=e}return ed}function ud(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Rt(``+e)}function dd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function fd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=ud((i[qe]||null).action),o=r.submitter;o&&(t=(t=o[qe]||null)?ud(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ed!==0){var e=o?dd(i,o):new FormData(i);gs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?dd(i,o):new FormData(i),gs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var pd=0;pd<Pr.length;pd++){var md=Pr[pd];Fr(md.toLowerCase(),`on`+(md[0].toUpperCase()+md.slice(1)))}Fr(Er,`onAnimationEnd`),Fr(Dr,`onAnimationIteration`),Fr(Or,`onAnimationStart`),Fr(`dblclick`,`onDoubleClick`),Fr(`focusin`,`onFocus`),Fr(`focusout`,`onBlur`),Fr(kr,`onTransitionRun`),Fr(Ar,`onTransitionStart`),Fr(jr,`onTransitionCancel`),Fr(Mr,`onTransitionEnd`),lt(`onMouseEnter`,[`mouseout`,`mouseover`]),lt(`onMouseLeave`,[`mouseout`,`mouseover`]),lt(`onPointerEnter`,[`pointerout`,`pointerover`]),lt(`onPointerLeave`,[`pointerout`,`pointerover`]),ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ct(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var hd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),gd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(hd));function _d(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ir(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ir(e)}i.currentTarget=null,a=c}}}}function vd(e,t){var n=t[Ye];n===void 0&&(n=t[Ye]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,ot.forEach(function(t){t!==`selectionchange`&&(gd.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!Yt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=tt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}Kt(function(){var r=a,i=Vt(n),o=[];a:{var c=Nr.get(e);if(c!==void 0){var l=sn,u=e;switch(e){case`keypress`:if(tn(n)===0)break a;case`keydown`:case`keyup`:l=Tn;break;case`focusin`:u=`focus`,l=gn;break;case`focusout`:u=`blur`,l=gn;break;case`beforeblur`:case`afterblur`:l=gn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=mn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Dn;break;case Er:case Dr:case Or:l=_n;break;case Mr:l=On;break;case`scroll`:case`scrollend`:l=ln;break;case`wheel`:l=kn;break;case`copy`:case`cut`:case`paste`:l=vn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=En;break;case`toggle`:case`beforetoggle`:l=An}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=qt(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Bt&&(u=n.relatedTarget||n.fromElement)&&(tt(u)||u[Je]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?tt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=mn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=En,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:rt(l),h=u==null?c:rt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,tt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(o,c,l,d,!1),u!==null&&f!==null&&Dd(o,f,u,d,!0)}}a:{if(c=r?rt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Xn;else if(Wn(c))if(Zn)v=or;else{v=ir;var y=rr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ft(r.elementType)&&(v=Xn):v=ar;if(v&&=v(e,r)){Gn(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Dt(c,`number`,c.value)}switch(y=r?rt(r):window,e){case`focusin`:(Wn(y)||y.contentEditable===`true`)&&(gr=y,_r=r,vr=null);break;case`focusout`:vr=_r=gr=null;break;case`mousedown`:yr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:yr=!1,br(o,n,i);break;case`selectionchange`:if(hr)break;case`keydown`:case`keyup`:br(o,n,i)}var b;if(Mn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Bn?Rn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Fn&&n.locale!==`ko`&&(Bn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Bn&&(b=en()):(Zt=i,Qt=`value`in Zt?Zt.value:Zt.textContent,Bn=!0)),y=Td(r,x),0<y.length&&(x=new yn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=zn(n),b!==null&&(x.data=b)))),(b=Pn?Vn(e,n):Hn(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new yn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),fd(o,e,r,n,i)}_d(o,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=qt(e,n),i!=null&&r.unshift(wd(e,i,a)),i=qt(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=qt(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=qt(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
10
10
  `).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&jt(e,``+r);break;case`className`:ht(e,`class`,r);break;case`tabIndex`:ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:ht(e,n,r);break;case`style`:Pt(e,r,o);break;case`data`:if(t!==`object`){ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Rt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,i.name,i,null),Md(e,t,`formEncType`,i.formEncType,i,null),Md(e,t,`formMethod`,i.formMethod,i,null),Md(e,t,`formTarget`,i.formTarget,i,null)):(Md(e,t,`encType`,i.encType,i,null),Md(e,t,`method`,i.method,i,null),Md(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Rt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=zt);break;case`onScroll`:r!=null&&vd(`scroll`,e);break;case`onScrollEnd`:r!=null&&vd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Rt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:vd(`beforetoggle`,e),vd(`toggle`,e),mt(e,`popover`,r);break;case`xlinkActuate`:gt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:gt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:gt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:gt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:gt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:gt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:gt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:gt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:gt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:mt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=It.get(n)||n,mt(e,n,r))}}function Nd(e,t,n,r,i,o){switch(n){case`style`:Pt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&jt(e,``+r);break;case`onScroll`:r!=null&&vd(`scroll`,e);break;case`onScrollEnd`:r!=null&&vd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=zt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!st.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[qe]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):mt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:vd(`error`,e),vd(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Md(e,t,o,s,n,null)}}i&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:vd(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Md(e,t,r,d,n,null)}}Et(e,o,c,l,u,s,i,!1);return;case`select`:for(i in vd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ot(e,!!r,n,!0):Ot(e,!!r,t,!1);return;case`textarea`:for(s in vd(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Md(e,t,s,c,n,null)}At(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:vd(`beforetoggle`,e),vd(`toggle`,e),vd(`cancel`,e),vd(`close`,e);break;case`iframe`:case`object`:vd(`load`,e);break;case`video`:case`audio`:for(r=0;r<hd.length;r++)vd(hd[r],e);break;case`image`:vd(`error`,e),vd(`load`,e);break;case`details`:vd(`toggle`,e);break;case`embed`:case`source`:case`link`:vd(`error`,e),vd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Ft(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Tt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ot(e,!!n,n?[]:``,!1):Ot(e,!!n,t,!0)):Ot(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Md(e,t,s,i,r,o)}kt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Ft(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[$e]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),et(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[$e])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);et(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=F.d;F.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=_u();return e||t}function yf(e){var t=nt(e);t!==null&&t.tag===5&&t.type===`form`?vs(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=wt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),at(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+wt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+wt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+wt(n.imageSizes)+`"]`)):i+=`[href="`+wt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),at(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+wt(r)+`"][href="`+wt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),at(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=it(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);at(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=it(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),at(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=it(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),at(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=W.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=it(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=it(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=it(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+wt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),at(t),e.head.appendChild(t))}function Pf(e){return`[src="`+wt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+wt(n.href)+`"]`);if(r)return t.instance=r,at(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),at(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,at(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),at(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,at(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),at(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[$e]||a[Ke]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,at(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),at(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Fe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fe(0),this.hiddenUpdates=Fe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Jr(3,null,null,t),e.current=a,a.stateNode=e,t=Xi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ka(a),e}function tp(e){return e?(e=Kr,e):Kr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ma(e,r,t),n!==null&&(fu(n,e,t),Na(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=Ur(e,67108864);t!==null&&fu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=uu();t=Ve(t);var n=Ur(e,t);n!==null&&fu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,up(e,t,n,r)}finally{F.p=a,P.T=i}}function lp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,up(e,t,n,r)}finally{F.p=a,P.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=nt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ae(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ce(o);s.entanglements[1]|=c,o&=~c}td(a),!(Z&6)&&(Ql=de()+500,nd(0,!1))}}break;case 31:case 13:s=Ur(a,2),s!==null&&fu(s,a,2),_u(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=Vt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=tt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(fe()){case pe:return 2;case me:return 8;case he:case ge:return 32;case _e:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=nt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=tt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,We(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,We(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Bt=r,n.target.dispatchEvent(r),Bt=null}else return t=nt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=nt(n);a!==null&&(e.splice(t,3),t-=3,gs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[qe]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[qe]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,uu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),_u(),t[Je]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ue();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(a(527,Lp,`19.2.5`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{be=zp.inject(Rp),xe=zp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=zs,s=Bs,c=Vs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,s,c,Pp),e[Je]=t.current,xd(e),new Fp(t)}})),Dl=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=El()})),Ol=ji(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),kl=ji(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),Al=ji(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),jl=ji(`bird`,[[`path`,{d:`M16 7h.01`,key:`1kdx03`}],[`path`,{d:`M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20`,key:`oj1oa8`}],[`path`,{d:`m20 7 2 .5-2 .5`,key:`12nv4d`}],[`path`,{d:`M10 18v3`,key:`1yea0a`}],[`path`,{d:`M14 17.75V21`,key:`1pymcb`}],[`path`,{d:`M7 18a6 6 0 0 0 3.84-10.61`,key:`1npnn0`}]]),Ml=ji(`bold`,[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`,key:`mg9rjx`}]]),Nl=ji(`book-marked`,[[`path`,{d:`M10 2v8l3-3 3 3V2`,key:`sqw3rj`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),Z=o(),Q=e(r(),1),Pl=e(Di(),1),Fl=Dl(),$=c(),Il=[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]];ji(`bot`,Il);var Ll=ji(`case-sensitive`,[[`path`,{d:`m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16`,key:`d5nyq2`}],[`path`,{d:`M22 9v7`,key:`pvm9v3`}],[`path`,{d:`M3.304 13h6.392`,key:`1q3zxz`}],[`circle`,{cx:`18.5`,cy:`12.5`,r:`3.5`,key:`z97x68`}]]),Rl=ji(`cat`,[[`path`,{d:`M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z`,key:`x6xyqk`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M11.25 16.25h1.5L12 17l-.75-.75Z`,key:`12kq1m`}]]),zl=ji(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Bl=ji(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Vl=ji(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),Hl=ji(`columns-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Ul=ji(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),Wl=ji(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),Gl=ji(`dog`,[[`path`,{d:`M11.25 16.25h1.5L12 17z`,key:`w7jh35`}],[`path`,{d:`M16 14v.5`,key:`1lajdz`}],[`path`,{d:`M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309`,key:`u7s9ue`}],[`path`,{d:`M8 14v.5`,key:`1nzgdb`}],[`path`,{d:`M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5`,key:`v8hric`}]]),Kl=ji(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),ql=ji(`file-check`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]),Jl=ji(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),Yl=ji(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Xl=ji(`fish`,[[`path`,{d:`M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z`,key:`15baut`}],[`path`,{d:`M18 12v.5`,key:`18hhni`}],[`path`,{d:`M16 17.93a9.77 9.77 0 0 1 0-11.86`,key:`16dt7o`}],[`path`,{d:`M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33`,key:`l9di03`}],[`path`,{d:`M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4`,key:`1kjonw`}],[`path`,{d:`m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98`,key:`1zlm23`}]]),Zl=ji(`fold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3-3-3 3`,key:`e37ymu`}],[`path`,{d:`m15 5-3 3-3-3`,key:`19d6lf`}]]),Ql=ji(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),$l=ji(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),eu=ji(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),tu=ji(`grid-2x2-x`,[[`path`,{d:`M12 3v17a1 1 0 0 1-1 1H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1H3`,key:`11za1p`}],[`path`,{d:`m16 16 5 5`,key:`8tpb07`}],[`path`,{d:`m16 21 5-5`,key:`193jll`}]]),nu=ji(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),ru=ji(`highlighter`,[[`path`,{d:`m9 11-6 6v3h9l3-3`,key:`1a3l36`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`,key:`14a9rk`}]]),iu=ji(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),au=ji(`italic`,[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]),ou=ji(`library`,[[`path`,{d:`m16 6 4 14`,key:`ji33uf`}],[`path`,{d:`M12 6v14`,key:`1n7gus`}],[`path`,{d:`M8 8v12`,key:`1gg7y9`}],[`path`,{d:`M4 4v16`,key:`6qkkli`}]]),su=ji(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),cu=ji(`list-collapse`,[[`path`,{d:`M10 5h11`,key:`1hkqpe`}],[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 19h11`,key:`14g2nv`}],[`path`,{d:`m3 10 3-3-3-3`,key:`i7pm08`}],[`path`,{d:`m3 20 3-3-3-3`,key:`20gx1n`}]]),lu=ji(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),uu=ji(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),du=ji(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),fu=ji(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),pu=ji(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),mu=ji(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),hu=ji(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),gu=ji(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),_u=ji(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),vu=ji(`panel-right-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m10 15-3-3 3-3`,key:`1pgupc`}]]),yu=ji(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),bu=ji(`pilcrow`,[[`path`,{d:`M13 4v16`,key:`8vvj80`}],[`path`,{d:`M17 4v16`,key:`7dpous`}],[`path`,{d:`M19 4H9.5a4.5 4.5 0 0 0 0 9H13`,key:`sh4n9v`}]]),xu=ji(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Su=ji(`rabbit`,[[`path`,{d:`M13 16a3 3 0 0 1 2.24 5`,key:`1epib5`}],[`path`,{d:`M18 12h.01`,key:`yjnet6`}],[`path`,{d:`M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3`,key:`ue9ozu`}],[`path`,{d:`M20 8.54V4a2 2 0 1 0-4 0v3`,key:`49iql8`}],[`path`,{d:`M7.612 12.524a3 3 0 1 0-1.6 4.3`,key:`1e33i0`}]]),Cu=ji(`rat`,[[`path`,{d:`M13 22H4a2 2 0 0 1 0-4h12`,key:`bt3f23`}],[`path`,{d:`M13.236 18a3 3 0 0 0-2.2-5`,key:`1tbvmo`}],[`path`,{d:`M16 9h.01`,key:`1bdo4e`}],[`path`,{d:`M16.82 3.94a3 3 0 1 1 3.237 4.868l1.815 2.587a1.5 1.5 0 0 1-1.5 2.1l-2.872-.453a3 3 0 0 0-3.5 3`,key:`9ch7kn`}],[`path`,{d:`M17 4.988a3 3 0 1 0-5.2 2.052A7 7 0 0 0 4 14.015 4 4 0 0 0 8 18`,key:`3s7e9i`}]]),wu=ji(`replace-all`,[[`path`,{d:`M14 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`zg1ipl`}],[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M19 14a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1`,key:`txt6k4`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Tu=ji(`replace`,[[`path`,{d:`M14 4a1 1 0 0 1 1-1`,key:`dhj8ez`}],[`path`,{d:`M15 10a1 1 0 0 1-1-1`,key:`1mnyi5`}],[`path`,{d:`M21 4a1 1 0 0 0-1-1`,key:`sfs9ap`}],[`path`,{d:`M21 9a1 1 0 0 1-1 1`,key:`mp6qeo`}],[`path`,{d:`m3 7 3 3 3-3`,key:`x25e72`}],[`path`,{d:`M6 10V5a2 2 0 0 1 2-2h2`,key:`15xut4`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}]]),Eu=ji(`rows-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}]]),Du=ji(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Ou=ji(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),ku=ji(`shrimp`,[[`path`,{d:`M11 12h.01`,key:`1lr4k6`}],[`path`,{d:`M13 22c.5-.5 1.12-1 2.5-1-1.38 0-2-.5-2.5-1`,key:`fatpdi`}],[`path`,{d:`M14 2a3.28 3.28 0 0 1-3.227 1.798l-6.17-.561A2.387 2.387 0 1 0 4.387 8H15.5a1 1 0 0 1 0 13 1 1 0 0 0 0-5H12a7 7 0 0 1-7-7V8`,key:`kehrqe`}],[`path`,{d:`M14 8a8.5 8.5 0 0 1 0 8`,key:`1imjx2`}],[`path`,{d:`M16 16c2 0 4.5-4 4-6`,key:`z0nejz`}]]),Au=ji(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),ju=ji(`square-code`,[[`path`,{d:`m10 9-3 3 3 3`,key:`1oro0q`}],[`path`,{d:`m14 15 3-3-3-3`,key:`bz13h7`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),Mu=ji(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Nu=ji(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),Pu=ji(`squirrel`,[[`path`,{d:`M15.236 22a3 3 0 0 0-2.2-5`,key:`21bitc`}],[`path`,{d:`M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4`,key:`oh0fg0`}],[`path`,{d:`M18 13h.01`,key:`9veqaj`}],[`path`,{d:`M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10`,key:`980v8a`}]]),Fu=ji(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),Iu=ji(`strikethrough`,[[`path`,{d:`M16 4H9a3 3 0 0 0-2.83 4`,key:`43sutm`}],[`path`,{d:`M14 12a4 4 0 0 1 0 8H6`,key:`nlfj13`}],[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}]]),Lu=ji(`table-properties`,[[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),Ru=ji(`telescope`,[[`path`,{d:`m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44`,key:`k4qptu`}],[`path`,{d:`m13.56 11.747 4.332-.924`,key:`19l80z`}],[`path`,{d:`m16 21-3.105-6.21`,key:`7oh9d`}],[`path`,{d:`M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z`,key:`m7xp4m`}],[`path`,{d:`m6.158 8.633 1.114 4.456`,key:`74o979`}],[`path`,{d:`m8 21 3.105-6.21`,key:`1fvxut`}],[`circle`,{cx:`12`,cy:`13`,r:`2`,key:`1c1ljs`}]]),zu=ji(`text-align-center`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M17 12H7`,key:`16if0g`}],[`path`,{d:`M19 19H5`,key:`vjpgq2`}]]),Bu=ji(`text-align-end`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M21 19H7`,key:`4cu937`}]]),Vu=ji(`text-align-start`,[[`path`,{d:`M21 5H3`,key:`1fi0y6`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M17 19H3`,key:`z6ezky`}]]),Hu=ji(`text-quote`,[[`path`,{d:`M17 5H3`,key:`1cn7zz`}],[`path`,{d:`M21 12H8`,key:`scolzb`}],[`path`,{d:`M21 19H8`,key:`13qgcb`}],[`path`,{d:`M3 12v7`,key:`1ri8j3`}]]),Uu=ji(`turtle`,[[`path`,{d:`m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z`,key:`1lbbv7`}],[`path`,{d:`M4.82 7.9 8 10`,key:`m9wose`}],[`path`,{d:`M15.18 7.9 12 10`,key:`p8dp2u`}],[`path`,{d:`M16.93 10H20a2 2 0 0 1 0 4H2`,key:`12nsm7`}]]),Wu=ji(`underline`,[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]),Gu=ji(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),Ku=ji(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),qu=ji(`whole-word`,[[`circle`,{cx:`7`,cy:`12`,r:`3`,key:`12clwm`}],[`path`,{d:`M10 9v6`,key:`17i7lo`}],[`circle`,{cx:`17`,cy:`12`,r:`3`,key:`gl7c2s`}],[`path`,{d:`M14 7v8`,key:`dl84cr`}],[`path`,{d:`M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1`,key:`lt2kga`}]]);function Ju(e,t){return e instanceof Error&&e.message?e.message:t}async function Yu(e,t,n,r=`action`){try{n(null),await e()}catch(e){console.error(`[${r}] action failed:`,e),n(Ju(e,t))}}async function Xu(e,t,n=Ls,r=`action`){await Yu(e,t,e=>{e!==null&&n.error(e)},r)}function Zu(e){return Gn(e)}function Qu(e,t){switch(e.kind){case`ok`:return null;case`not-git`:return`This folder doesn't contain a git repository. Pick a different folder?`;case`wrong-repo`:return`This folder is a clone of ${e.actualOwner}/${e.actualRepo}, not ${t.owner}/${t.repo}. Pick a different folder?`;case`no-origin`:case`non-github`:case`symlink-escape`:return`This folder isn't a clone of ${t.owner}/${t.repo}. Pick a different folder?`}}function $u(e){return e.kind===`unsupported-version`?{kind:`unsupported-version`,message:`Update OpenKnowledge to open this share.`}:e.kind===`invalid`?{kind:`invalid`,message:`Invalid share URL.`}:null}function ed(e){let t=e.split(`
11
11
  `).map(e=>e.trim()).filter(e=>e.length>0&&!/^Cloning into /i.test(e)),n=t.filter(e=>/^remote:/i.test(e)),r=n[n.length-1];if(r)return r.replace(/^remote:\s*/i,``).trim();let i=t.find(e=>/^fatal:/i.test(e));return i?i.replace(/^fatal:\s*/i,``).trim():t[0]??``}function td(e){let t=[`[receive]`];return e.q2_path!==void 0&&t.push(`q2_path=${e.q2_path}`),e.folder_validate!==void 0&&t.push(`folder_validate=${e.folder_validate}`),e.branch_action!==void 0&&t.push(`branch_action=${e.branch_action}`),e.branch!==void 0&&t.push(`branch=${e.branch}`),e.doc_check!==void 0&&t.push(`doc_check=${e.doc_check}`),e.branch_dialog_action!==void 0&&t.push(`branch_dialog_action=${e.branch_dialog_action}`),t.join(` `)}function nd(e){let t=/\/([^/]+?)(?:\.git)?\/?$/.exec(e);return t?t[1]:`repo`}function rd(e){return{async getAuthStatus(){return e.authQueryTransport.status()},async startSignIn(){return e.openSignIn()},async runClone({url:t,branch:n}){let r=await e.bridge.dialog.openFolder();if(!r)return{kind:`cancelled`};let i=nd(t),a=`${r.replace(/\/$/,``)}/${i}`,o=Ls.loading(Is._({id:`GXf9hG`,values:{repoName:i}}),{duration:1/0}),s=typeof n==`string`&&n.length>0?n:null;try{let n=e.cloneTransport.start({url:t,dir:a,branch:s});for await(let e of n.events){if(e.type===`progress`){let t=e.phase,n=Math.round(e.pct);Ls.loading(Is._({id:`GXf9hG`,values:{repoName:i}}),{id:o,description:Is._({id:`SCzAbA`,values:{phase:t,pct:n}}),duration:1/0});continue}if(e.type===`branch-fallback`){console.log(td({branch_action:`fallback`,branch:e.branch})),Ls.info(Is._({id:`3JYy1p`,values:{0:e.branch}}),{duration:8e3});continue}if(e.type===`complete`)return Ls.success(Is._({id:`IRv9cH`,values:{repoName:i}}),{id:o,duration:4e3}),{kind:`ok`,dir:e.dir};if(e.type===`error`)return Ls.dismiss(o),{kind:`error`,detail:e.message}}return Ls.dismiss(o),{kind:`error`,detail:`Clone ended unexpectedly.`}}catch(e){console.warn(`[clone-controller] clone transport threw`,e);let t=e instanceof Error?e.message:`Unknown error`;return Ls.dismiss(o),{kind:`error`,detail:t}}}}}function id(){return{start(e){return $a((t,n)=>{(async()=>{try{let r=await fetch(`/api/local-op/clone`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e.url,dir:e.dir||void 0,branch:typeof e.branch==`string`&&e.branch.length>0?e.branch:void 0}),signal:n});if(!r.ok){let e=`Clone failed — check the URL and try again (${r.status})`;try{let t=await r.json(),n=Or.safeParse(t);n.success&&(e=`Clone failed: ${n.data.title}`)}catch{}t({type:`error`,message:e});return}if(!r.body){t({type:`error`,message:`Clone failed — empty response body`});return}let i=r.body.getReader(),a=new TextDecoder,o=``;for(;;){let{done:e,value:r}=await i.read();if(e)break;o+=a.decode(r,{stream:!0});let s=o.split(`
12
- `);o=s.pop()??``;for(let e of s){if(!e.trim())continue;let n;try{n=JSON.parse(e)}catch{console.warn(`[clone-transport] Dropped unparseable NDJSON line:`,e.slice(0,100));continue}if(n&&typeof n==`object`&&n.type===`error`&&`problem`in n){let e=n.problem;t({type:`error`,message:e?.detail||e?.title||`Unknown error`});break}t(n)}if(n.aborted)break}n.aborted||t({type:`error`,message:`Clone stream ended unexpectedly — check if the clone completed`})}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;t({type:`error`,message:`Clone failed — connection error`})}})()})}}}function ad(e){return{start(t){let n=typeof t.branch==`string`&&t.branch.length>0?t.branch:null;return e.localOp.clone.start({url:t.url,dir:t.dir,branch:n})}}}var od=`ContextMenu`,[sd,cd]=Vs(od,[Da]),ld=Da(),[ud,dd]=sd(od),fd=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=Q.useState(!1),c=ld(t),l=Us(r),u=Q.useCallback(e=>{s(e),l(e)},[l]);return(0,Z.jsx)(ud,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,Z.jsx)(yo,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};fd.displayName=od;var pd=`ContextMenuTrigger`,md=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=dd(pd,n),o=ld(n),s=Q.useRef({x:0,y:0}),c=Q.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=Q.useRef(0),u=Q.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return Q.useEffect(()=>u,[u]),Q.useEffect(()=>void(r&&u()),[r,u]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(da,{...o,virtualRef:c}),(0,Z.jsx)(Hs.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:Ws(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:Ws(e.onPointerDown,Ud(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:Ws(e.onPointerMove,Ud(u)),onPointerCancel:r?e.onPointerCancel:Ws(e.onPointerCancel,Ud(u)),onPointerUp:r?e.onPointerUp:Ws(e.onPointerUp,Ud(u))})]})});md.displayName=pd;var hd=`ContextMenuPortal`,gd=e=>{let{__scopeContextMenu:t,...n}=e,r=ld(t);return(0,Z.jsx)(za,{...r,...n})};gd.displayName=hd;var _d=`ContextMenuContent`,vd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=dd(_d,n),a=ld(n),o=Q.useRef(!1);return(0,Z.jsx)(Ro,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});vd.displayName=_d;var yd=`ContextMenuGroup`,bd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(Zi,{...i,...r,ref:t})});bd.displayName=yd;var xd=`ContextMenuLabel`,Sd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(Fa,{...i,...r,ref:t})});Sd.displayName=xd;var Cd=`ContextMenuItem`,wd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(La,{...i,...r,ref:t})});wd.displayName=Cd;var Td=`ContextMenuCheckboxItem`,Ed=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(ka,{...i,...r,ref:t})});Ed.displayName=Td;var Dd=`ContextMenuRadioGroup`,Od=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(sa,{...i,...r,ref:t})});Od.displayName=Dd;var kd=`ContextMenuRadioItem`,Ad=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(ha,{...i,...r,ref:t})});Ad.displayName=kd;var jd=`ContextMenuItemIndicator`,Md=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(la,{...i,...r,ref:t})});Md.displayName=jd;var Nd=`ContextMenuSeparator`,Pd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(pa,{...i,...r,ref:t})});Pd.displayName=Nd;var Fd=`ContextMenuArrow`,Id=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(_a,{...i,...r,ref:t})});Id.displayName=Fd;var Ld=`ContextMenuSub`,Rd=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=ld(t),[s,c]=Ks({prop:i,defaultProp:a??!1,onChange:r,caller:Ld});return(0,Z.jsx)(Ua,{...o,open:s,onOpenChange:c,children:n})};Rd.displayName=Ld;var zd=`ContextMenuSubTrigger`,Bd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(Ga,{...i,...r,ref:t})});Bd.displayName=zd;var Vd=`ContextMenuSubContent`,Hd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(Va,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Hd.displayName=Vd;function Ud(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Wd=fd,Gd=md,Kd=gd,qd=vd,Jd=bd,Yd=Sd,Xd=wd,Zd=Ed,Qd=Md,$d=Pd,ef=Rd,tf=Bd,nf=Hd,rf=`Tabs`,[af,of]=Vs(rf,[dc]),sf=dc(),[cf,lf]=af(rf),uf=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Js(s),[d,f]=Ks({prop:r,onChange:i,defaultProp:a??``,caller:rf});return(0,Z.jsx)(cf,{scope:n,baseId:Bs(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,Z.jsx)(Hs.div,{dir:u,"data-orientation":o,...l,ref:t})})});uf.displayName=rf;var df=`TabsList`,ff=Q.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=lf(df,n),o=sf(n);return(0,Z.jsx)(uc,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,Z.jsx)(Hs.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});ff.displayName=df;var pf=`TabsTrigger`,mf=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=lf(pf,n),s=sf(n),c=_f(o.baseId,r),l=vf(o.baseId,r),u=r===o.value;return(0,Z.jsx)(fc,{asChild:!0,...s,focusable:!i,active:u,children:(0,Z.jsx)(Hs.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Ws(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:Ws(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:Ws(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});mf.displayName=pf;var hf=`TabsContent`,gf=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=lf(hf,n),c=_f(s.baseId,r),l=vf(s.baseId,r),u=r===s.value,d=Q.useRef(u);return Q.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,Z.jsx)(Gs,{present:i||u,children:({present:n})=>(0,Z.jsx)(Hs.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});gf.displayName=hf;function _f(e,t){return`${e}-trigger-${t}`}function vf(e,t){return`${e}-content-${t}`}var yf=uf,bf=ff,xf=mf,Sf=gf;function Cf(){let e=(0,$.c)(4),[t,n]=(0,Q.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.okDesktop;if(!e)return;let t=!1;return e.state.query().then(e=>{t||n(e.channel)}).catch(wf),()=>{t=!0}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={channel:t},e[2]=t,e[3]=a),a}function wf(e){console.warn(`[use-update-channel] bridge.state.query() failed`,e)}function Tf(e){let t=(0,$.c)(6),{className:n}=e,{_:r}=i(),{channel:a}=Cf();if(a!==`beta`)return null;let o;t[0]===r?o=t[1]:(o=r({id:`9fhQRL`}),t[0]=r,t[1]=o);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(s,{id:`cSCbv3`}),t[2]=c):c=t[2];let l;return t[3]!==n||t[4]!==o?(l=(0,Z.jsx)(le,{variant:`secondary`,"aria-label":o,"data-testid":`beta-badge`,className:n,children:c}),t[3]=n,t[4]=o,t[5]=l):l=t[5],l}function Ef(e){switch(e){case`receiving`:return{id:`qbfj1f`};case`resolving`:return{id:`adsMWO`};case`checking`:return{id:`1HBhDS`};case`init`:return{id:`LlHqdU`};case`done`:return{id:`bD8I7O`};default:return{id:`25Pw6a`}}}function Df(e){let t=e.trim();if(/^[\w.-]+\/[\w.-]+$/.test(t))return t.split(`/`)[1];try{return new URL(t.replace(/^git@([^:]+):/,`https://$1/`)).pathname.replace(/\.git$/,``).split(`/`).pop()??`repo`}catch{return t.split(`/`).pop()?.replace(/\.git$/,``)??`repo`}}function Of(e){let t=(0,$.c)(100),{open:n,onOpenChange:r,onSignIn:a,onCloneComplete:o,transport:c,authQueryTransport:l,pickParentFolder:u,initialUrl:d}=e,{_:f}=i(),p;t[0]===c?p=t[1]:(p=c??id(),t[0]=c,t[1]=p);let m=p,h;t[2]===l?h=t[3]:(h=l??Eo(),t[2]=l,t[3]=h);let g=h,_=u!==void 0,[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(``),[S,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(!1),E;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=xa(),t[4]=E):E=t[4];let[D,k]=(0,Q.useState)(E),[A,j]=(0,Q.useState)(!1),[M,N]=(0,Q.useState)(!1),[P,I]=(0,Q.useState)(-1),L=(0,Q.useRef)(null),R=(0,Q.useRef)(null),z=(0,Q.useRef)(null),B=(0,Q.useId)(),V;t[5]!==n||t[6]!==g?(V=()=>{if(!n)return;let e=!1;return g.status().then(t=>{Ta(t.authenticated),e||k(t.authenticated)}).catch(()=>{e||k(!1)}),()=>{e=!0}},t[5]=n,t[6]=g,t[7]=V):V=t[7];let H;t[8]===n?H=t[9]:(H=[n],t[8]=n,t[9]=H),(0,Q.useEffect)(V,H);let U;t[10]!==D||t[11]!==n||t[12]!==g?(U=()=>{if(!D||!n)return;let e=!1;return T(!0),g.repos().then(t=>{e||(C(t.ok?t.repos:[]),T(!1))}).catch(()=>{e||(C([]),T(!1))}),()=>{e=!0}},t[10]=D,t[11]=n,t[12]=g,t[13]=U):U=t[13];let W;t[14]!==D||t[15]!==n?(W=[D,n],t[14]=D,t[15]=n,t[16]=W):W=t[16],(0,Q.useEffect)(U,W);let G,K;t[17]!==d||t[18]!==n||t[19]!==_?(G=()=>{if(!n||!d||(y(d),_))return;let e=Df(d);e&&x(`~/Documents/${e}`)},K=[n,d,_],t[17]=d,t[18]=n,t[19]=_,t[20]=G,t[21]=K):(G=t[20],K=t[21]),(0,Q.useEffect)(G,K);let q,J;t[22]!==P||t[23]!==B?(q=()=>{P<0||document.getElementById(`${B}-opt-${P}`)?.scrollIntoView({block:`nearest`})},J=[P,B],t[22]=P,t[23]=B,t[24]=q,t[25]=J):(q=t[24],J=t[25]),(0,Q.useEffect)(q,J);let ee;t[26]===_?ee=t[27]:(ee=function(e){if(y(e),N(!0),I(-1),_)return;let t=Df(e);t&&x(`~/Documents/${t}`)},t[26]=_,t[27]=ee);let Y=ee,te;t[28]===_?te=t[29]:(te=function(e){if(y(e.clone_url),_)return;let t=e.full_name.split(`/`)[1];x(`~/Documents/${t}`)},t[28]=_,t[29]=te);let X=te,ne;t[30]!==f||t[31]!==b||t[32]!==o||t[33]!==r||t[34]!==u||t[35]!==m||t[36]!==v?(ne=async function(){let e=v.trim();if(!e){Ls.error(f({id:`FTUGgh`}));return}let t=b||``;if(u){j(!0);let n=await u();if(!n){j(!1);return}let r=Df(e);t=`${n.replace(/\/$/,``)}/${r}`}else j(!0);let n=Ls.loading(f({id:`2tgFCe`}),{duration:1/0});R.current=n;let i=m.start({url:e,dir:t});L.current=i.cancel;try{let e=i.events[Symbol.asyncIterator](),t=await e.next();for(;!t.done;){let i=t.value;if(i.type===`progress`){let e=f(Ef(i.phase));Ls.loading(`${e} — ${i.pct}%`,{id:n})}else if(i.type===`complete`){Ls.success(f({id:`u_lS4C`}),{id:n}),r(!1),j(!1),L.current=null;let e=`port`in i?i.port:void 0;o?o({port:e,dir:i.dir}):e!==void 0&&(window.location.href=`http://localhost:${e}`);return}else if(i.type===`error`){let e=i.message;Ls.error(f({id:`eFJkVt`,values:{cloneError:e}}),{id:n}),j(!1),L.current=null;return}t=await e.next()}Ls.error(f({id:`Tz9pJB`}),{id:n}),j(!1),L.current=null}catch(e){console.error(`[CloneDialog] clone iteration failed:`,e),Ls.error(f({id:`K9J00P`}),{id:n}),j(!1),L.current=null}},t[30]=f,t[31]=b,t[32]=o,t[33]=r,t[34]=u,t[35]=m,t[36]=v,t[37]=ne):ne=t[37];let ie=ne,ae;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(ae=function(){L.current?.(),L.current=null,j(!1),Ls.dismiss(R.current??void 0)},t[38]=ae):ae=t[38];let oe=ae,se;t[39]!==A||t[40]!==r||t[41]!==_?(se=function(e){A||(r(e),e||(y(``),_||x(``),N(!1),I(-1)))},t[39]=A,t[40]=r,t[41]=_,t[42]=se):se=t[42];let ce=se,le;t[43]===X?le=t[44]:(le=function(e){X(e),N(!1),I(-1),z.current?.focus()},t[43]=X,t[44]=le);let ue=le,de=D===null||w&&S===null,fe;if(t[45]!==S||t[46]!==v){let e=v.trim().toLowerCase(),n;t[48]===S?n=t[49]:(n=S??[],t[48]=S,t[49]=n),fe=n.filter(t=>`${t.full_name} ${t.clone_url}`.toLowerCase().includes(e)),t[45]=S,t[46]=v,t[47]=fe}else fe=t[47];let pe=fe,me;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(me=/:\/\/|^git@|\.git$/i,t[50]=me):me=t[50];let he;t[51]===v?he=t[52]:(he=me.test(v.trim()),t[51]=v,t[52]=he);let ge=he,_e=D===!0&&S!==null&&pe.length===0&&!ge,ve=M&&D!==!1&&!A&&(de||pe.length>0||_e),ye=pe.length,be=`${B}-loading`,xe,Se;t[53]===ye?(xe=t[54],Se=t[55]):(xe=()=>{I(e=>e>=ye?ye-1:e)},Se=[ye],t[53]=ye,t[54]=xe,t[55]=Se),(0,Q.useEffect)(xe,Se);let Ce;t[56]!==P||t[57]!==A||t[58]!==ve||t[59]!==ue||t[60]!==pe?(Ce=function(e){if(!A)if(e.key===`ArrowDown`){if(e.preventDefault(),!ve){N(!0);return}I(e=>Math.min(e+1,pe.length-1))}else e.key===`ArrowUp`?(e.preventDefault(),I(Pf)):e.key===`Enter`?ve&&P>=0&&P<pe.length&&(e.preventDefault(),ue(pe[P])):e.key===`Escape`&&ve&&(e.preventDefault(),e.stopPropagation(),N(!1),I(-1))},t[56]=P,t[57]=A,t[58]=ve,t[59]=ue,t[60]=pe,t[61]=Ce):Ce=t[61];let we=Ce,Te;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Z.jsx)(Yo,{children:(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`VdXv4D`})})}),t[62]=Te):Te=t[62];let Ee;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,Z.jsx)(`label`,{htmlFor:`clone-source`,className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`IreQBq`})}),t[63]=Ee):Ee=t[63];let De;t[64]!==f||t[65]!==P||t[66]!==A||t[67]!==we||t[68]!==Y||t[69]!==D||t[70]!==B||t[71]!==be||t[72]!==a||t[73]!==ve||t[74]!==de||t[75]!==S||t[76]!==ue||t[77]!==pe||t[78]!==v?(De=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ee,D===!1?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)($o,{id:`clone-source`,placeholder:f({id:`Xv_ijG`}),value:v,onChange:e=>Y(e.target.value),disabled:A}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-1sm text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`9oE4C3`})}),(0,Z.jsx)(Ai,{variant:`link`,className:`h-auto p-0`,onClick:()=>a?.(),disabled:A,children:(0,Z.jsx)(s,{id:`3jod3l`})})]})]}):(0,Z.jsxs)(re,{open:ve,onOpenChange:N,children:[(0,Z.jsx)(O,{asChild:!0,children:(0,Z.jsx)($o,{id:`clone-source`,ref:z,role:`combobox`,"aria-expanded":ve,"aria-controls":ve?de?be:B:void 0,"aria-activedescendant":P>=0?`${B}-opt-${P}`:void 0,"aria-autocomplete":`list`,autoComplete:`off`,placeholder:f({id:`R0jJzV`}),value:v,onChange:e=>Y(e.target.value),onFocus:()=>N(!0),onKeyDown:we,disabled:A})}),(0,Z.jsx)(F,{align:`start`,sideOffset:4,className:`w-(--radix-popover-trigger-width) max-h-56 overflow-y-auto overscroll-y-contain subtle-scrollbar p-0`,onOpenAutoFocus:Nf,onCloseAutoFocus:Mf,onInteractOutside:e=>{z.current?.contains(e.target)&&e.preventDefault()},onWheel:jf,onTouchMove:Af,children:de?(0,Z.jsxs)(`output`,{id:be,className:`flex flex-col gap-1.5 px-3 py-2`,"aria-label":f({id:`8XQRON`}),children:[(0,Z.jsx)(ya,{className:`h-4 w-2/3`}),(0,Z.jsx)(ya,{className:`h-4 w-1/2`}),(0,Z.jsx)(ya,{className:`h-4 w-3/4`}),(0,Z.jsx)(ya,{className:`h-4 w-2/5`})]}):(0,Z.jsx)(`div`,{id:B,role:`listbox`,"aria-label":f({id:`KX1MZR`}),className:`py-1`,children:pe.length===0?(0,Z.jsx)(`div`,{role:`presentation`,className:`px-3 py-2 text-xs text-muted-foreground`,children:S&&S.length===0?(0,Z.jsx)(s,{id:`cOSAfL`}):(0,Z.jsx)(s,{id:`8eW0WQ`})}):pe.map((e,t)=>(0,Z.jsxs)(`div`,{id:`${B}-opt-${t}`,role:`option`,tabIndex:-1,"aria-selected":t===P,onMouseDown:kf,onMouseEnter:()=>I(t),onClick:()=>ue(e),className:Oi(`flex cursor-default items-center gap-2 px-3 py-1.5 text-sm`,t===P&&`bg-accent text-accent-foreground`),children:[e.private?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(du,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`n5n_vi`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(bs,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`NuH1jp`})})]}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.full_name})]},e.full_name))})})]})]}),t[64]=f,t[65]=P,t[66]=A,t[67]=we,t[68]=Y,t[69]=D,t[70]=B,t[71]=be,t[72]=a,t[73]=ve,t[74]=de,t[75]=S,t[76]=ue,t[77]=pe,t[78]=v,t[79]=De):De=t[79];let Oe;t[80]!==A||t[81]!==b||t[82]!==_?(Oe=!_&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{htmlFor:`clone-path`,className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`Gp_twO`})}),(0,Z.jsx)($o,{id:`clone-path`,placeholder:`~/Documents/repo-name`,value:b,onChange:e=>x(e.target.value),disabled:A})]}),t[80]=A,t[81]=b,t[82]=_,t[83]=Oe):Oe=t[83];let ke;t[84]!==De||t[85]!==Oe?(ke=(0,Z.jsx)(qo,{children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[De,Oe]})}),t[84]=De,t[85]=Oe,t[86]=ke):ke=t[86];let Ae;t[87]!==A||t[88]!==ie||t[89]!==ce||t[90]!==v||t[91]!==_?(Ae=(0,Z.jsx)(Jo,{children:A?(0,Z.jsx)(Ai,{variant:`outline`,className:`font-mono uppercase`,onClick:oe,children:(0,Z.jsx)(s,{id:`dEgA5A`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ai,{variant:`outline`,className:`font-mono uppercase`,onClick:()=>ce(!1),children:(0,Z.jsx)(s,{id:`dEgA5A`})}),(0,Z.jsx)(Ai,{onClick:()=>void ie(),disabled:!v.trim(),"aria-describedby":_?`clone-picker-hint`:void 0,children:(0,Z.jsx)(s,{id:`9UQ730`})}),_&&(0,Z.jsx)(`span`,{id:`clone-picker-hint`,className:`sr-only`,children:(0,Z.jsx)(s,{id:`EvPX7f`})})]})}),t[87]=A,t[88]=ie,t[89]=ce,t[90]=v,t[91]=_,t[92]=Ae):Ae=t[92];let je;t[93]!==ke||t[94]!==Ae?(je=(0,Z.jsxs)(Ko,{className:`sm:max-w-lg`,children:[Te,ke,Ae]}),t[93]=ke,t[94]=Ae,t[95]=je):je=t[95];let Me;return t[96]!==ce||t[97]!==n||t[98]!==je?(Me=(0,Z.jsx)(Xo,{open:n,onOpenChange:ce,children:je}),t[96]=ce,t[97]=n,t[98]=je,t[99]=Me):Me=t[99],Me}function kf(e){return e.preventDefault()}function Af(e){return e.stopPropagation()}function jf(e){return e.stopPropagation()}function Mf(e){return e.preventDefault()}function Nf(e){return e.preventDefault()}function Pf(e){return Math.max(e-1,-1)}var Ff=(0,Q.lazy)(()=>n(()=>import(`./ConsentDialogBody-CPn5k8Yj.js`),__vite__mapDeps([5,1,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url));function If(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(gc.subscribe,Rf,Lf))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(Ff,{})}),e[0]=t):t=e[0],t}function Lf(){return!1}function Rf(){return gc.getSnapshot()!==null}var zf=180,Bf=5e3;function Vf(e,t){if(e===``||t===``)return``;let n=e.includes(`\\`)&&!e.includes(`/`)?`\\`:`/`;return`${e.replace(/[/\\]+$/,``)}${n}${t}`}function Hf(e){if(e===``)return``;let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}function Uf(e){let{parent:t,sanitizedName:n,enclosingProject:r,enclosingGit:i,targetState:a}=e;return t===``||n===``?{kind:`idle`}:r===null?i===null?a===`exists-nonempty`?{kind:`block-nonempty`}:{kind:`free`}:{kind:`confirm-git`,gitRoot:i.gitRoot}:{kind:`block-nested`,rootPath:r.rootPath}}function Wf(e){let t=e instanceof Error?e.message:String(e);for(let e of kr)if(t.startsWith(`${e}:`)||t.includes(`${e}: `))return e===`nested-project`||e===`target-not-empty`?{reason:e}:{reason:e,message:t};return{reason:`unknown`,message:t}}function Gf(e){switch(e.reason){case`nested-project`:return{id:`ScwcF2`};case`target-not-empty`:return{id:`e8L17t`};case`invalid-args`:return{id:`6bTTAN`};case`mkdir-failed`:return{id:`gJR87V`};case`git-init-failed`:return{id:`4CfgPM`};case`init-failed`:return{id:`l17ab4`};case`discovery-failed`:return{id:`ThmUrC`};case`unknown`:return{id:`AddR83`}}}function Kf(e){let t=(0,$.c)(180),{open:n,onOpenChange:r,bridge:a}=e,{_:o}=i(),c=(0,Q.useId)(),l=(0,Q.useId)(),u=(0,Q.useId)(),d=(0,Q.useId)(),[f,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)($f),[b,x]=(0,Q.useState)(`shared`),[S,C]=(0,Q.useState)(!1),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w={kind:`idle`},t[0]=w):w=t[0];let[T,E]=(0,Q.useState)(w),[D,O]=(0,Q.useState)(`idle`),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(null),N;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(N={kind:`idle`},t[1]=N):N=t[1];let[P,F]=(0,Q.useState)(N),[I,L]=(0,Q.useState)(0),R;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(R=new Set,t[2]=R):R=t[2];let z=(0,Q.useRef)(R),B=(0,Q.useRef)(null),V=(0,Q.useRef)(null),H=(0,Q.useRef)(null),U=(0,Q.useRef)(0),W,G;t[3]!==a||t[4]!==n?(W=()=>{if(!n)return;z.current.clear(),M(null),E({kind:`idle`}),O(`idle`),A(!1),_(``),y(new Set(Hr)),x(`shared`),C(!1),F({kind:`idle`}),U.current+=1;let e=!1;p(``),h(!0),a.fs.defaultProjectsRoot().then(t=>{e||p(t)}).catch(Qf).finally(()=>{e||h(!1)});let t=requestAnimationFrame(()=>{H.current?.focus()});return()=>{e=!0,cancelAnimationFrame(t)}},G=[n,a],t[3]=a,t[4]=n,t[5]=W,t[6]=G):(W=t[5],G=t[6]),(0,Q.useEffect)(W,G);let K;t[7]!==a||t[8]!==f||t[9]!==g||t[10]!==n?(K=()=>{if(!n)return;V.current!==null&&clearTimeout(V.current),B.current!==null&&B.current.abort();let e=Fr(g);if(f===``||e===``){E({kind:`idle`}),O(`idle`);return}let t=f,r=Vf(t,e),i=new AbortController;return B.current=i,V.current=setTimeout(()=>{O(`in-flight`),Promise.all([a.fs.findEnclosingProjectRoot(t),a.fs.findEnclosingGitRoot(t),a.fs.folderState(r)]).then(n=>{let[r,a,o]=n;i.signal.aborted||(O(`idle`),E(Uf({parent:t,sanitizedName:e,enclosingProject:r,enclosingGit:a,targetState:o})))}).catch(e=>{i.signal.aborted||(console.warn(`[CreateProjectDialog] cascade probe failed:`,e),O(`idle`),E({kind:`free`}))})},zf),()=>{V.current!==null&&clearTimeout(V.current),i.abort()}},t[7]=a,t[8]=f,t[9]=g,t[10]=n,t[11]=K):K=t[11];let q;t[12]!==a||t[13]!==f||t[14]!==g||t[15]!==n||t[16]!==I?(q=[n,f,g,a,I],t[12]=a,t[13]=f,t[14]=g,t[15]=n,t[16]=I,t[17]=q):q=t[17],(0,Q.useEffect)(K,q);let J,ee;t[18]===n?(J=t[19],ee=t[20]):(J=()=>{if(!n)return;let e=()=>L(Zf);return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},ee=[n],t[18]=n,t[19]=J,t[20]=ee),(0,Q.useEffect)(J,ee);let Y=(0,Q.useRef)(`idle`),te,X;t[21]===D?(te=t[22],X=t[23]):(te=()=>{Y.current=D},X=[D],t[21]=D,t[22]=te,t[23]=X),(0,Q.useEffect)(te,X);let ne,re;t[24]!==T.kind||t[25]!==n?(ne=()=>{if(!n||T.kind!==`confirm-git`)return;let e=setInterval(()=>{Y.current!==`in-flight`&&L(Xf)},Bf);return()=>clearInterval(e)},re=[n,T.kind],t[24]=T.kind,t[25]=n,t[26]=ne,t[27]=re):(ne=t[26],re=t[27]),(0,Q.useEffect)(ne,re);let ie;t[28]!==T.gitRoot||t[29]!==T.kind||t[30]!==P.gitRoot||t[31]!==P.kind?(ie=()=>{if(T.kind!==`confirm-git`){P.kind!==`idle`&&(U.current+=1,F({kind:`idle`}));return}P.kind===`confirming`&&P.gitRoot!==T.gitRoot&&F({kind:`idle`}),P.kind===`pending`&&P.gitRoot!==T.gitRoot&&(U.current+=1,F({kind:`idle`}))},t[28]=T.gitRoot,t[29]=T.kind,t[30]=P.gitRoot,t[31]=P.kind,t[32]=ie):ie=t[32];let ae;t[33]!==T||t[34]!==P?(ae=[T,P],t[33]=T,t[34]=P,t[35]=ae):ae=t[35],(0,Q.useEffect)(ie,ae);let oe;t[36]!==a||t[37]!==T.kind||t[38]!==n?(oe=()=>{if(!n)return;let e=null;T.kind===`block-nested`?e=`nested`:T.kind===`block-nonempty`?e=`nonempty`:T.kind===`confirm-git`&&(e=`git-confirm`),e!==null&&(z.current.has(e)||(z.current.add(e),a.project.recordCreateNewBannerShown(e).catch(Yf)))},t[36]=a,t[37]=T.kind,t[38]=n,t[39]=oe):oe=t[39];let se;t[40]!==a||t[41]!==T||t[42]!==n?(se=[n,T,a],t[40]=a,t[41]=T,t[42]=n,t[43]=se):se=t[43],(0,Q.useEffect)(oe,se);let ce=g,le,ue,de,fe,pe;t[44]!==T.kind||t[45]!==f||t[46]!==ce?(fe=ce===``?``:Fr(ce),ue=ce!==``&&fe!==ce&&fe!==``,de=ce!==``&&fe===``,le=T.kind===`block-nonempty`,pe=f!==``&&fe!==``?Vf(f,fe):``,t[44]=T.kind,t[45]=f,t[46]=ce,t[47]=le,t[48]=ue,t[49]=de,t[50]=fe,t[51]=pe):(le=t[47],ue=t[48],de=t[49],fe=t[50],pe=t[51]);let me=pe,he=!k&&f!==``&&ce!==``&&fe!==``&&D===`idle`&&(T.kind===`free`||T.kind===`confirm-git`),ge=k||ce!==``&&!he,_e;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(_e=function(e){y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[52]=_e):_e=t[52];let ve=_e,ye;t[53]!==a||t[54]!==f?(ye=async function(){try{let e=await a.dialog.openFolder(f===``?void 0:{defaultPath:f});if(e===null)return;p(e),L(Jf),M(null)}catch(e){console.warn(`[CreateProjectDialog] dialog.openFolder failed:`,e)}},t[53]=a,t[54]=f,t[55]=ye):ye=t[55];let be=ye,xe;t[56]!==o||t[57]!==a||t[58]!==k||t[59]!==he||t[60]!==v||t[61]!==f||t[62]!==r||t[63]!==ce||t[64]!==fe||t[65]!==b?(xe=async function(e){if(e.preventDefault(),!k){if(ce.trim()===``){Ls.error(o({id:`5OqaJi`})),H.current?.focus();return}if(he){A(!0),M(null);try{await a.project.createNew({parent:f,name:fe,editors:Array.from(v),sharing:b}),r(!1)}catch(e){M(Wf(e)),A(!1)}}}},t[56]=o,t[57]=a,t[58]=k,t[59]=he,t[60]=v,t[61]=f,t[62]=r,t[63]=ce,t[64]=fe,t[65]=b,t[66]=xe):xe=t[66];let Se=xe,Ce;t[67]!==k||t[68]!==r?(Ce=function(e){k||r(e)},t[67]=k,t[68]=r,t[69]=Ce):Ce=t[69];let we=Ce,Te;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(Te=async function(e){F({kind:`confirming`,gitRoot:e})},t[70]=Te):Te=t[70];let Ee=Te,De;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(De=async function(){F({kind:`idle`})},t[71]=De):De=t[71];let Oe=De,ke;t[72]===a?ke=t[73]:(ke=async function(e){let t=U.current+1;U.current=t,F({kind:`pending`,gitRoot:e});try{if(await a.fs.removeGitFolder(e),U.current!==t)return;L(qf),F({kind:`idle`})}catch(e){let n=e;if(U.current!==t)return;let r=n instanceof Error?n.message:String(n);console.error(`[CreateProjectDialog] bridge.fs.removeGitFolder failed:`,n),F({kind:`error`,message:r})}},t[72]=a,t[73]=ke);let Ae=ke,je;t[74]!==a||t[75]!==r?(je=async function(e){r(!1);try{await a.project.open({path:e,target:`new-window`,entryPoint:`create-new-nested-redirect`})}catch(e){console.warn(`[CreateProjectDialog] project.open failed:`,e)}},t[74]=a,t[75]=r,t[76]=je):je=t[76];let Me=je,Ne=de||le||ue?`${u} ${d}`:u,Pe;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`wbv9xO`})}),t[77]=Pe):Pe=t[77];let Fe;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,Z.jsxs)(Yo,{children:[Pe,(0,Z.jsx)(Wo,{children:(0,Z.jsx)(s,{id:`O6yEPk`})})]}),t[78]=Fe):Fe=t[78];let Ie;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,Z.jsx)(s,{id:`OyIC0Q`}),t[79]=Ie):Ie=t[79];let Le;t[80]===l?Le=t[81]:(Le=(0,Z.jsx)(cc,{htmlFor:l,children:Ie}),t[80]=l,t[81]=Le);let Re;t[82]===o?Re=t[83]:(Re=o({id:`cV7LOw`}),t[82]=o,t[83]=Re);let ze;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(ze=e=>_(e.target.value),t[84]=ze):ze=t[84];let Be=de||le,Ve;t[85]!==k||t[86]!==g||t[87]!==Ne||t[88]!==l||t[89]!==Re||t[90]!==Be?(Ve=(0,Z.jsx)($o,{id:l,ref:H,value:g,placeholder:Re,onChange:ze,disabled:k,autoComplete:`off`,"aria-invalid":Be,"aria-describedby":Ne,"data-testid":`create-name`}),t[85]=k,t[86]=g,t[87]=Ne,t[88]=l,t[89]=Re,t[90]=Be,t[91]=Ve):Ve=t[91];let He;t[92]!==d||t[93]!==le||t[94]!==ue||t[95]!==de||t[96]!==fe?(He=de?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-erased`,children:(0,Z.jsx)(s,{id:`_PBJRl`})}):le?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-taken`,children:(0,Z.jsx)(s,{id:`7apDiJ`,values:{sanitized:fe},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):ue?(0,Z.jsx)(`p`,{id:d,role:`status`,"aria-live":`polite`,className:`text-1sm text-muted-foreground`,"data-testid":`create-name-hint-diverged`,children:(0,Z.jsx)(s,{id:`KnoB--`,values:{sanitized:fe},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):null,t[92]=d,t[93]=le,t[94]=ue,t[95]=de,t[96]=fe,t[97]=He):He=t[97];let Ue;t[98]!==Le||t[99]!==Ve||t[100]!==He?(Ue=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Le,Ve,He]}),t[98]=Le,t[99]=Ve,t[100]=He,t[101]=Ue):Ue=t[101];let We;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,Z.jsx)(cc,{children:(0,Z.jsx)(s,{id:`wJijgU`})}),t[102]=We):We=t[102];let Ge;t[103]!==f||t[104]!==m?(Ge=f===``?m?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`iHAJDj`})}):(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`8m8diM`})}):f,t[103]=f,t[104]=m,t[105]=Ge):Ge=t[105];let Ke;t[106]===Ge?Ke=t[107]:(Ke=(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 rounded-md border border-input bg-muted/50 px-2.5 py-1 text-sm text-foreground wrap-break-word`,"data-testid":`create-location-display`,children:Ge}),t[106]=Ge,t[107]=Ke);let qe;t[108]===be?qe=t[109]:(qe=()=>void be(),t[108]=be,t[109]=qe);let Je;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,Z.jsx)(s,{id:`O2UpM1`}),t[110]=Je):Je=t[110];let Ye;t[111]!==k||t[112]!==qe?(Ye=(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,className:`shrink-0`,disabled:k,onClick:qe,"data-testid":`create-browse`,children:Je}),t[111]=k,t[112]=qe,t[113]=Ye):Ye=t[113];let Xe;t[114]!==Ke||t[115]!==Ye?(Xe=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Ke,Ye]}),t[114]=Ke,t[115]=Ye,t[116]=Xe):Xe=t[116];let Ze;t[117]===me?Ze=t[118]:(Ze=me===``?null:(0,Z.jsx)(s,{id:`k_yIIc`,values:{targetPreview:me},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}}),t[117]=me,t[118]=Ze);let Qe;t[119]!==u||t[120]!==Ze?(Qe=(0,Z.jsx)(`p`,{id:u,className:`text-1sm text-muted-foreground wrap-break-word`,"aria-live":`polite`,"data-testid":`create-target-caption`,children:Ze}),t[119]=u,t[120]=Ze,t[121]=Qe):Qe=t[121];let $e;t[122]!==Xe||t[123]!==Qe?($e=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[We,Xe,Qe]}),t[122]=Xe,t[123]=Qe,t[124]=$e):$e=t[124];let et;t[125]!==T||t[126]!==Ae||t[127]!==Me||t[128]!==P?(et=(0,Z.jsx)(ep,{cascade:T,onOpenNested:Me,removeGitState:P,onRequestRemoveGit:Ee,onCancelRemoveGit:Oe,onConfirmRemoveGit:Ae}),t[125]=T,t[126]=Ae,t[127]=Me,t[128]=P,t[129]=et):et=t[129];let tt;t[130]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,Z.jsxs)(ns,{className:`group flex w-full items-center justify-between gap-2 px-3 py-2 text-sm font-medium hover:bg-muted/50`,"data-testid":`create-advanced-trigger`,children:[(0,Z.jsx)(s,{id:`VNgKZz`}),(0,Z.jsx)(ts,{className:`size-4 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`,"aria-hidden":!0})]}),t[130]=tt):tt=t[130];let nt;t[131]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,Z.jsx)(`legend`,{className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`0YEbfk`})}),t[131]=nt):nt=t[131];let rt;t[132]===Symbol.for(`react.memo_cache_sentinel`)?(rt=(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`8IP5jY`})}),t[132]=rt):rt=t[132];let it;t[133]!==k||t[134]!==v?(it=Hr.map(e=>{let t=`create-editor-${e}`;return(0,Z.jsxs)(cc,{htmlFor:t,className:`text-sm font-normal`,children:[(0,Z.jsx)(lc,{id:t,checked:v.has(e),onCheckedChange:()=>ve(e),disabled:k,"data-testid":`create-editor-${e}`}),(0,Z.jsx)(`span`,{children:lr[e]})]},e)}),t[133]=k,t[134]=v,t[135]=it):it=t[135];let at;t[136]===it?at=t[137]:(at=(0,Z.jsxs)(`fieldset`,{className:`flex flex-col space-y-2 pb-2`,children:[nt,rt,it]}),t[136]=it,t[137]=at);let ot;t[138]!==k||t[139]!==b?(ot=(0,Z.jsx)(vc,{idPrefix:`create`,testIdPrefix:`create-sharing`,value:b,onValueChange:x,disabled:k}),t[138]=k,t[139]=b,t[140]=ot):ot=t[140];let st;t[141]!==at||t[142]!==ot?(st=(0,Z.jsxs)(es,{className:`space-y-6 border-t border-border px-3 py-4`,children:[at,ot]}),t[141]=at,t[142]=ot,t[143]=st):st=t[143];let ct;t[144]!==S||t[145]!==st?(ct=(0,Z.jsxs)(rs,{open:S,onOpenChange:C,className:`rounded-md border border-border`,"data-testid":`create-advanced`,children:[tt,st]}),t[144]=S,t[145]=st,t[146]=ct):ct=t[146];let lt;t[147]!==o||t[148]!==j?(lt=j===null?null:(0,Z.jsx)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-submit-error`,children:o(Gf(j))}),t[147]=o,t[148]=j,t[149]=lt):lt=t[149];let ut;t[150]!==c||t[151]!==Se||t[152]!==Ue||t[153]!==$e||t[154]!==et||t[155]!==ct||t[156]!==lt?(ut=(0,Z.jsx)(qo,{className:`space-y-6`,children:(0,Z.jsxs)(`form`,{id:c,onSubmit:Se,"data-testid":`create-project-form`,className:`space-y-6`,children:[Ue,$e,et,ct,lt]})}),t[150]=c,t[151]=Se,t[152]=Ue,t[153]=$e,t[154]=et,t[155]=ct,t[156]=lt,t[157]=ut):ut=t[157];let dt;t[158]===r?dt=t[159]:(dt=()=>r(!1),t[158]=r,t[159]=dt);let ft;t[160]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,Z.jsx)(s,{id:`dEgA5A`}),t[160]=ft):ft=t[160];let pt;t[161]!==k||t[162]!==dt?(pt=(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:dt,disabled:k,"data-testid":`create-cancel`,children:ft}),t[161]=k,t[162]=dt,t[163]=pt):pt=t[163];let mt;t[164]===k?mt=t[165]:(mt=k?(0,Z.jsx)(s,{id:`E9bKSA`}):(0,Z.jsx)(s,{id:`hYgDIe`}),t[164]=k,t[165]=mt);let ht;t[166]!==c||t[167]!==ge||t[168]!==mt?(ht=(0,Z.jsx)(Ai,{type:`submit`,form:c,disabled:ge,"data-testid":`create-submit`,children:mt}),t[166]=c,t[167]=ge,t[168]=mt,t[169]=ht):ht=t[169];let gt;t[170]!==pt||t[171]!==ht?(gt=(0,Z.jsxs)(Jo,{children:[pt,ht]}),t[170]=pt,t[171]=ht,t[172]=gt):gt=t[172];let _t;t[173]!==ut||t[174]!==gt?(_t=(0,Z.jsxs)(Ko,{className:`sm:max-w-lg`,"data-testid":`create-project-dialog`,children:[Fe,ut,gt]}),t[173]=ut,t[174]=gt,t[175]=_t):_t=t[175];let vt;return t[176]!==we||t[177]!==n||t[178]!==_t?(vt=(0,Z.jsx)(Xo,{open:n,onOpenChange:we,children:_t}),t[176]=we,t[177]=n,t[178]=_t,t[179]=vt):vt=t[179],vt}function qf(e){return e+1}function Jf(e){return e+1}function Yf(){}function Xf(e){return e+1}function Zf(e){return e+1}function Qf(e){console.warn(`[CreateProjectDialog] defaultProjectsRoot probe failed:`,e)}function $f(){return new Set(Hr)}function ep(e){let t=(0,$.c)(37),{cascade:n,onOpenNested:r,removeGitState:i,onRequestRemoveGit:a,onCancelRemoveGit:o,onConfirmRemoveGit:c}=e;if(n.kind===`idle`||n.kind===`free`||n.kind===`block-nonempty`)return null;if(n.kind===`block-nested`){let{rootPath:e}=n,i;t[0]===e?i=t[1]:(i=Hf(e),t[0]=e,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o={rootPath:e},t[2]=e,t[3]=o);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c={0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})},t[4]=c):c=t[4];let l;t[5]===o?l=t[6]:(l=(0,Z.jsx)(`p`,{className:`mb-2`,children:(0,Z.jsx)(s,{id:`W7XJN4`,values:o,components:c})}),t[5]=o,t[6]=l);let u;t[7]!==r||t[8]!==e?(u=()=>r(e),t[7]=r,t[8]=e,t[9]=u):u=t[9];let d;t[10]===a?d=t[11]:(d=(0,Z.jsx)(s,{id:`1Ta7Fd`,values:{basename:a}}),t[10]=a,t[11]=d);let f;t[12]!==u||t[13]!==d?(f=(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,size:`sm`,onClick:u,"data-testid":`create-banner-nested-open`,children:d}),t[12]=u,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==l||t[16]!==f?(p=(0,Z.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-banner-nested`,children:[l,f]}),t[15]=l,t[16]=f,t[17]=p):p=t[17],p}if(n.kind===`confirm-git`){let{gitRoot:e}=n,r;if(t[18]!==e){let n;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=/\/+$/,t[20]=n):n=t[20],r=e.replace(n,``),t[18]=e,t[19]=r}else r=t[19];let l=`${r}/.git`,u=i.kind===`error`?i.message:null,d;t[21]===e?d=t[22]:(d={gitRoot:e},t[21]=e,t[22]=d);let f;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(f={0:(0,Z.jsx)(`code`,{}),1:(0,Z.jsx)(`code`,{})},t[23]=f):f=t[23];let p;t[24]===d?p=t[25]:(p=(0,Z.jsx)(`p`,{children:(0,Z.jsx)(s,{id:`FEK4oC`,values:d,components:f})}),t[24]=d,t[25]=p);let m;t[26]!==e||t[27]!==o||t[28]!==c||t[29]!==a||t[30]!==u||t[31]!==i.kind||t[32]!==l?(m=i.kind===`idle`||i.kind===`error`?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1`,children:[(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(e),"data-testid":`create-banner-git-remove`,children:(0,Z.jsx)(s,{id:`YTLmTM`,components:{0:(0,Z.jsx)(`code`,{})}})}),i.kind===`error`?(0,Z.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,"data-testid":`create-banner-git-remove-error`,children:(0,Z.jsx)(s,{id:`SkMZlS`,values:{targetGitPath:l,removeGitError:u},components:{0:(0,Z.jsx)(`code`,{})}})}):null]}):(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 rounded border border-blue-400/60 bg-white/40 p-2 dark:border-blue-600/60 dark:bg-black/20`,"data-testid":`create-banner-git-remove-confirm`,children:[(0,Z.jsx)(`p`,{className:`text-xs`,children:(0,Z.jsx)(s,{id:`WZ-vBy`,values:{targetGitPath:l},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsx)(Ai,{type:`button`,variant:`destructive`,size:`sm`,disabled:i.kind===`pending`,onClick:()=>c(e),"data-testid":`create-banner-git-remove-confirm-button`,children:i.kind===`pending`?(0,Z.jsx)(s,{id:`0-31GV`}):(0,Z.jsx)(s,{id:`v-h2hx`,values:{targetGitPath:l}})}),(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,size:`sm`,disabled:i.kind===`pending`,onClick:o,"data-testid":`create-banner-git-remove-cancel`,children:(0,Z.jsx)(s,{id:`dEgA5A`})})]})]}),t[26]=e,t[27]=o,t[28]=c,t[29]=a,t[30]=u,t[31]=i.kind,t[32]=l,t[33]=m):m=t[33];let h;return t[34]!==p||t[35]!==m?(h=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border border-blue-300 bg-blue-50 px-3 py-2 text-sm text-blue-900 dark:border-blue-700 dark:bg-blue-950 dark:text-blue-200`,"data-testid":`create-banner-git-confirm`,children:[p,m]}),t[34]=p,t[35]=m,t[36]=h):h=t[36],h}return null}function tp(e){let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`GitHub`}),r=(0,Z.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function np(e){let t=(0,$.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`OpenKnowledge icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`g`,{filter:`url(#filter0_d_ok)`,children:[(0,Z.jsx)(`path`,{d:`M66.8902 16.1017C58.2694 3.86669 46.1739 -0.690239 29.9182 2.17749C21.3995 3.67813 13.4602 9.555 8.67934 17.9009C3.93974 26.1701 2.98514 35.6533 6.05714 43.9166C9.31574 52.6868 16.7168 58.4752 24.2299 63.4231C25.7973 64.4562 26.1351 65.7172 26.3551 68.9896C26.5221 71.4625 26.799 75.6011 30.6842 77.7204C31.8176 78.3372 33.0648 78.6515 34.3946 78.6515C37.0796 78.6515 39.4033 77.3649 40.5189 76.7482C47.1049 73.1046 68.8878 59.7147 72.6453 40.4027C74.3444 31.6679 70.9797 21.9019 66.8922 16.1017H66.8902Z`,fill:`white`}),(0,Z.jsx)(`path`,{d:`M37.4214 71.154C28.7888 75.929 36.787 64.0397 27.7458 58.0843C21.6372 54.0616 14.788 49.0568 12.0499 41.6911C6.74463 27.4192 17.5438 10.8473 31.028 8.47262C45.1977 5.97613 54.6946 9.8947 61.6635 19.7844C65.2089 24.8167 67.6013 32.8365 66.3658 39.1828C63.6906 52.9341 49.073 64.7075 37.4214 71.154Z`,fill:`#69A3FF`}),(0,Z.jsx)(`path`,{d:`M52.7244 29.2638C53.4665 28.5217 54.6697 28.5217 55.4119 29.2638V29.2638C56.154 30.0059 56.154 31.2091 55.4119 31.9513L49.2589 38.1042L46.5715 35.4167L52.7244 29.2638Z`,fill:`#D5E5FF`}),(0,Z.jsx)(`path`,{d:`M55.4119 38.8821C56.154 39.6242 56.154 40.8274 55.4119 41.5696V41.5696C54.6698 42.3117 53.4665 42.3117 52.7244 41.5696L46.5715 35.4166L49.259 32.7292L55.4119 38.8821Z`,fill:`#D5E5FF`})]}),t[1]=r):r=t[1];let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`defs`,{children:(0,Z.jsxs)(`filter`,{id:`filter0_d_ok`,x:`-9.53674e-07`,y:`-0.0799994`,width:`77.3817`,height:`85.8743`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,Z.jsx)(`feFlood`,{floodOpacity:`0`,result:`BackgroundImageFix`}),(0,Z.jsx)(`feColorMatrix`,{in:`SourceAlpha`,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0`,result:`hardAlpha`}),(0,Z.jsx)(`feOffset`,{dy:`2.85714`}),(0,Z.jsx)(`feGaussianBlur`,{stdDeviation:`2.14286`}),(0,Z.jsx)(`feComposite`,{in2:`hardAlpha`,operator:`out`}),(0,Z.jsx)(`feColorMatrix`,{type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in2:`BackgroundImageFix`,result:`effect1_dropShadow_ok`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in:`SourceGraphic`,in2:`effect1_dropShadow_ok`,result:`shape`})]})}),t[2]=i):i=t[2];let a;return t[3]===e?a=t[4]:(a=(0,Z.jsxs)(`svg`,{role:`img`,"aria-label":`OpenKnowledge icon`,fill:`none`,height:24,width:24,viewBox:`0 0 78 80`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var rp=(0,Q.lazy)(()=>n(()=>import(`./McpConsentDialogBody-_slAuRpY.js`),__vite__mapDeps([17,1,6,7,8,9,10,11,18]),import.meta.url));function ip(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(yc.subscribe,op,ap))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(rp,{})}),e[0]=t):t=e[0],t}function ap(){return!1}function op(){return yc.getSnapshot()!==null}var sp=new Set([`main`,`master`]);function cp(e){let t=(0,$.c)(19),{owner:n,repo:r,path:i,branch:a,kind:o,testId:c,branchTestId:l}=e,u=o===void 0?`doc`:o,d;t[0]===a?d=t[1]:(d=a!==``&&!sp.has(a),t[0]=a,t[1]=d);let f=d,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(s,{id:`IreQBq`}),t[2]=p):p=t[2];let m;t[3]!==n||t[4]!==r?(m=(0,Z.jsx)(lp,{label:p,children:(0,Z.jsxs)(`span`,{children:[n,`/`,r]})}),t[3]=n,t[4]=r,t[5]=m):m=t[5];let h;t[6]!==u||t[7]!==i||t[8]!==c?(h=i?(0,Z.jsx)(lp,{label:u===`folder`?(0,Z.jsx)(s,{id:`kNqMMd`}):(0,Z.jsx)(s,{id:`J2eKUI`}),children:(0,Z.jsx)(`span`,{className:`font-mono`,"data-testid":`${c}-target`,children:i})}):null,t[6]=u,t[7]=i,t[8]=c,t[9]=h):h=t[9];let g;t[10]!==a||t[11]!==l||t[12]!==f?(g=f?(0,Z.jsx)(lp,{label:(0,Z.jsx)(s,{id:`ssuwjF`}),children:(0,Z.jsx)(`span`,{className:`font-mono`,"data-testid":l,children:a})}):null,t[10]=a,t[11]=l,t[12]=f,t[13]=g):g=t[13];let _;return t[14]!==m||t[15]!==h||t[16]!==g||t[17]!==c?(_=(0,Z.jsxs)(`dl`,{className:`space-y-2 text-1sm text-muted-foreground`,"data-testid":c,children:[m,h,g]}),t[14]=m,t[15]=h,t[16]=g,t[17]=c,t[18]=_):_=t[18],_}function lp(e){let t=(0,$.c)(7),{label:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,Z.jsx)(`dt`,{className:`w-20 shrink-0 font-mono uppercase tracking-wide text-xs`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,Z.jsx)(`dd`,{className:`min-w-0 flex-1 break-all text-foreground`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Z.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}var up=e=>({phase:`ready`,seed:e});function dp(e){return e.phase===`ready`?{phase:`initializing`,seed:e.seed}:e}function fp(e,t){return e.phase===`initializing`?t.ok?{phase:`opening`,seed:e.seed}:{phase:`error`,seed:e.seed,reason:t.reason,message:t.message}:e}function pp(e,t){return e.phase===`opening`?t.ok?{phase:`done`,seed:e.seed}:{phase:`error`,seed:e.seed,reason:`network-error`,message:t.message}:e}function mp(e){return e.phase===`done`||e.phase===`cancelled`||e.phase===`error`?e:{phase:`cancelled`,seed:e.seed}}function hp(){let e=null,t=new Set,n=!1,r=null;function i(){for(let e of t)e()}function a(){e!==null&&(e=null,i())}return{install({bridge:t}){if(t)return n?r??void 0:(n=!0,r=t.onShareReceived(t=>{e=t,i()}),()=>{r?.(),r=null,n=!1,a()})},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dismiss(){a()}}}var gp=hp();function _p(e){return gp.install(e)}function vp(e){return e!==null&&e.kind===`launcher-consent`}function yp(e){return e!==null&&e.kind===`launcher-miss`}function bp(e){let t=(0,$.c)(14),{bridge:n,cloneController:r,store:i}=e,a=i===void 0?gp:i,o=(0,Q.useSyncExternalStore)(a.subscribe,a.getSnapshot,Sp),[s,c]=(0,Q.useState)(0),[l,u]=(0,Q.useState)(o);o!==l&&(u(o),c(xp));let d,f;t[0]!==o||t[1]!==a?(d=()=>{if(!o)return;let e=$u(o);e&&(Ls.error(e.message),a.dismiss())},f=[o,a],t[0]=o,t[1]=a,t[2]=d,t[3]=f):(d=t[2],f=t[3]),(0,Q.useEffect)(d,f);let p;t[4]===o?p=t[5]:(p=yp(o)?o:null,t[4]=o,t[5]=p);let m=p,h;t[6]===o?h=t[7]:(h=vp(o)?o:null,t[6]=o,t[7]=h);let g=h??m;if(!g)return null;let _;return t[8]!==g||t[9]!==n||t[10]!==r||t[11]!==s||t[12]!==a?(_=(0,Z.jsx)(Cp,{payload:g,bridge:n,cloneController:r,store:a},s),t[8]=g,t[9]=n,t[10]=r,t[11]=s,t[12]=a,t[13]=_):_=t[13],_}function xp(e){return e+1}function Sp(){return null}function Cp(e){let t=(0,$.c)(169),{payload:n,bridge:r,cloneController:a,store:o}=e,{_:c}=i(),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(null),[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(null),[y,b]=(0,Q.useState)(null),x=(0,Q.useRef)(!1),S=(0,Q.useRef)(null),C,w;t[0]===_?(C=t[1],w=t[2]):(C=()=>{_&&S.current?.focus()},w=[_],t[0]=_,t[1]=C,t[2]=w),(0,Q.useEffect)(C,w);let T;t[3]!==y||t[4]!==n?(T=()=>{vp(n)&&y===null&&(console.warn(`[receive] q1_hit=true selection=branch_match_non_ok candidate=${n.candidatePath}`),b(up({candidatePath:n.candidatePath,branch:n.share.branch,targetPath:sn(n.share.target),targetKind:n.share.target.kind,parentProjectName:n.parentProjectName})))},t[3]=y,t[4]=n,t[5]=T):T=t[5];let E;t[6]===n?E=t[7]:(E=[n],t[6]=n,t[7]=E),(0,Q.useEffect)(T,E);let D;t[8]!==d||t[9]!==a||t[10]!==n?(D=()=>{a&&yp(n)&&d===null&&(x.current||(x.current=!0,m(!0),a.getAuthStatus().then(e=>{f(e)}).catch(e=>{console.warn(`[receive] auth pre-flight probe failed`,e instanceof Error?e.message:e),f({authenticated:!1,host:`github.com`})}).finally(()=>{m(!1)})))},t[8]=d,t[9]=a,t[10]=n,t[11]=D):D=t[11];let O;t[12]!==d||t[13]!==n?(O=[n,d],t[12]=d,t[13]=n,t[14]=O):O=t[14],(0,Q.useEffect)(D,O);let k=yp(n)?n:null,A=vp(n)?n:null,j=k?.share??A?.share??null,M,N,P,F,I,L,R,z,B,V;if(t[15]!==c||t[16]!==p||t[17]!==r||t[18]!==a||t[19]!==h||t[20]!==y||t[21]!==k||t[22]!==l||t[23]!==j||t[24]!==o){B=Symbol.for(`react.early_return_sentinel`);bb0:{let e=j?{owner:j.owner,repo:j.repo}:null,n;t[35]!==c||t[36]!==j?.target.kind?(n=j?.target.kind===`folder`?c({id:`ugoTXs`}):c({id:`XH30C4`}),t[35]=c,t[36]=j?.target.kind,t[37]=n):n=t[37],V=n,P=async function(){if(!k||!e)return;if(console.log(td({q2_path:`clone`})),!a){Ls.info(c({id:`27XW26`}),{action:{label:c({id:`B3NAZC`}),onClick:()=>{r.navigator.open()}},duration:8e3});return}if(h)return;v(null),g(!0);let t=Zu(e),n;try{n=await a.runClone({url:t,branch:k.share.branch})}catch(e){let t=e;console.warn(`[receive] runClone threw unexpectedly`,t),g(!1),v({detail:t instanceof Error?t.message:String(t)});return}if(g(!1),n.kind===`error`){v({detail:n.detail??null});return}if(n.kind===`ok`){try{await r.project.open({path:n.dir,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:k.share.target.kind,path:sn(k.share.target)}}),o.dismiss()}catch(e){let t=e;console.warn(`[receive] project open after clone failed`,t instanceof Error?t.message:t),Ls.error(c({id:`438Fca`}))}return}};let i;t[38]!==c||t[39]!==p||t[40]!==a?(i=async function(){if(!(!a||p)){m(!0);try{let e=await a.startSignIn();m(!1),e!==null&&f(e)}catch(e){let t=e;m(!1),console.warn(`[receive] startSignIn failed`,t instanceof Error?t.message:t),Ls.error(c({id:`lzwo7p`}))}}},t[38]=c,t[39]=p,t[40]=a,t[41]=i):i=t[41],I=i,F=async function(){if(!(!k||!e||l)){v(null),u(!0),console.log(td({q2_path:`local`}));try{for(;;){let t=await r.dialog.openFolder();if(!t)break;let n=await r.share.validateLocalFolder({folderPath:t,owner:e.owner,repo:e.repo});if(console.log(td({folder_validate:n.kind})),n.kind===`ok`){let e=k.share.branch,n={currentBranch:null,headSha:null,detached:!1};try{n=await r.project.readHeadBranch(t)}catch(e){let t=e;console.warn(`[receive] local-folder readHeadBranch failed`,t instanceof Error?t.message:t)}let i=er(e,n)!==`true`;try{await r.project.open({path:t,target:`new-window`,entryPoint:`share-receive`,...i?{pendingShareBranchSwitch:{share:k.share,projectPath:t,currentBranch:n.currentBranch}}:{pendingDeepLinkTarget:{kind:k.share.target.kind,path:sn(k.share.target)}}}),o.dismiss()}catch(e){let t=e;console.warn(`[receive] local-folder-open failed`,t instanceof Error?t.message:t),Ls.error(c({id:`phM8Kh`}))}break}let i=Qu(n,e);i&&Ls.error(i)}}catch(e){let t=e;console.warn(`[receive] local-folder-validate failed`,t instanceof Error?t.message:t),Ls.error(c({id:`rlUzXK`}))}u(!1)}};let d;t[42]!==c||t[43]!==r||t[44]!==y||t[45]!==o?(d=function(){if(y===null||y.phase!==`ready`)return;let e=y.seed;console.warn(`[receive] consent_dialog action=initialize worktree=${e.candidatePath}`),b(Op),r.project.okInit({projectPath:e.candidatePath}).then(async t=>{if(t.ok===!0){b(e=>e===null?e:fp(e,{ok:!0,projectPath:t.projectPath}));try{await r.project.open({path:t.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:e.targetKind,path:e.targetPath},pendingBranch:e.branch}),b(Dp),o.dismiss()}catch(t){let n=t,r=n instanceof Error?n.message:String(n);b(e=>e===null?e:pp(e,{ok:!1,message:r})),Ls.error(c({id:`nDT8qt`,values:{0:e.candidatePath}}))}return}let n=t.reason,i=t.message||`Initialization failed.`;b(e=>e===null?e:fp(e,{ok:!1,reason:n,message:i})),Ls.error(i)}).catch(t=>{let n=t instanceof Error?t.message:String(t);b(e=>e===null?e:fp(e,{ok:!1,reason:`network-error`,message:n})),Ls.error(c({id:`3Mwaly`,values:{0:e.candidatePath}}))})},t[42]=c,t[43]=r,t[44]=y,t[45]=o,t[46]=d):d=t[46];let _=d,x;t[47]!==y||t[48]!==o?(x=function(){y!==null&&console.warn(`[receive] consent_dialog action=cancel worktree=${y.seed.candidatePath}`),b(Ep),o.dismiss()},t[47]=y,t[48]=o,t[49]=x):x=t[49];let S=x;if(y!==null&&y.phase!==`cancelled`&&y.phase!==`done`&&j!==null){let e=y.seed,n=y.phase===`initializing`||y.phase===`opening`,r;t[50]===S?r=t[51]:(r=e=>{e||S()},t[50]=S,t[51]=r);let i;t[52]===V?i=t[53]:(i=(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`RY6Bq1`,values:{targetNoun:V}})}),t[52]=V,t[53]=i);let a;t[54]===j.target?a=t[55]:(a=sn(j.target)?`— ${sn(j.target)}`:``,t[54]=j.target,t[55]=a);let o;t[56]!==j.owner||t[57]!==j.repo||t[58]!==a?(o=(0,Z.jsx)(Wo,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`pgq_xf`,values:{0:j.owner,1:j.repo,2:a}})}),t[56]=j.owner,t[57]=j.repo,t[58]=a,t[59]=o):o=t[59];let c=j.owner,l=j.repo,u;t[60]===j.target?u=t[61]:(u=sn(j.target),t[60]=j.target,t[61]=u);let d;t[62]!==j.branch||t[63]!==j.owner||t[64]!==j.repo||t[65]!==j.target.kind||t[66]!==u?(d=(0,Z.jsx)(cp,{owner:c,repo:l,path:u,kind:j.target.kind,branch:j.branch,testId:`share-receive-metadata`,branchTestId:`share-receive-metadata-branch`}),t[62]=j.branch,t[63]=j.owner,t[64]=j.repo,t[65]=j.target.kind,t[66]=u,t[67]=d):d=t[67];let f;t[68]!==i||t[69]!==o||t[70]!==d?(f=(0,Z.jsxs)(Yo,{children:[i,o,d]}),t[68]=i,t[69]=o,t[70]=d,t[71]=f):f=t[71];let p;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`KsAPaB`})}),t[72]=p):p=t[72];let m;t[73]===e.candidatePath?m=t[74]:(m=(0,Z.jsx)(`p`,{className:`mt-2 break-all rounded bg-muted px-2 py-1 font-mono text-xs text-foreground/80`,"data-testid":`share-receive-consent-path`,children:e.candidatePath}),t[73]=e.candidatePath,t[74]=m);let h;t[75]===e.parentProjectName?h=t[76]:(h=e.parentProjectName===null?null:(0,Z.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,"data-testid":`share-receive-consent-parent`,children:(0,Z.jsx)(s,{id:`JmfgFc`,values:{0:e.parentProjectName}})}),t[75]=e.parentProjectName,t[76]=h);let g;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`w7SsvI`})}),t[77]=g):g=t[77];let v;t[78]!==y.message||t[79]!==y.phase?(v=y.phase===`error`?(0,Z.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,"data-testid":`share-receive-consent-error`,role:`alert`,children:y.message}):null,t[78]=y.message,t[79]=y.phase,t[80]=v):v=t[80];let b;t[81]!==m||t[82]!==h||t[83]!==v?(b=(0,Z.jsxs)(qo,{children:[p,m,h,g,v]}),t[81]=m,t[82]=h,t[83]=v,t[84]=b):b=t[84];let x;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(s,{id:`dEgA5A`}),t[85]=x):x=t[85];let C;t[86]===S?C=t[87]:(C=(0,Z.jsx)(Ai,{variant:`ghost`,onClick:S,"data-testid":`share-receive-consent-cancel`,children:x}),t[86]=S,t[87]=C);let w=n||y.phase===`error`,T=n||y.phase===`error`,E;t[88]===n?E=t[89]:(E=n?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Te,{className:`mr-2 h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`NKkZXl`})]}):(0,Z.jsx)(s,{id:`NKkZXl`}),t[88]=n,t[89]=E);let D;t[90]!==_||t[91]!==w||t[92]!==T||t[93]!==E?(D=(0,Z.jsx)(Ai,{onClick:_,disabled:w,"aria-disabled":T,"data-testid":`share-receive-consent-initialize`,children:E}),t[90]=_,t[91]=w,t[92]=T,t[93]=E,t[94]=D):D=t[94];let O;t[95]!==C||t[96]!==D?(O=(0,Z.jsxs)(Jo,{children:[C,D]}),t[95]=C,t[96]=D,t[97]=O):O=t[97];let k;t[98]!==f||t[99]!==b||t[100]!==O?(k=(0,Z.jsxs)(Ko,{className:`sm:max-w-xl`,"data-testid":`share-receive-consent-dialog`,onInteractOutside:Tp,onPointerDownOutside:wp,children:[f,b,O]}),t[98]=f,t[99]=b,t[100]=O,t[101]=k):k=t[101];let A;t[102]!==r||t[103]!==k?(A=(0,Z.jsx)(Xo,{open:!0,onOpenChange:r,children:k}),t[102]=r,t[103]=k,t[104]=A):A=t[104],B=A;break bb0}if(!k||!j||!e){B=null;break bb0}M=a!==void 0&&!h;let C;t[105]!==c||t[106]!==h?(C=c(h?{id:`YjhKI5`}:{id:`LE7t79`}),t[105]=c,t[106]=h,t[107]=C):C=t[107],N=C,L=j.owner,R=j.repo,z=Gn(e)}t[15]=c,t[16]=p,t[17]=r,t[18]=a,t[19]=h,t[20]=y,t[21]=k,t[22]=l,t[23]=j,t[24]=o,t[25]=M,t[26]=N,t[27]=P,t[28]=F,t[29]=I,t[30]=L,t[31]=R,t[32]=z,t[33]=B,t[34]=V}else M=t[25],N=t[26],P=t[27],F=t[28],I=t[29],L=t[30],R=t[31],z=t[32],B=t[33],V=t[34];if(B!==Symbol.for(`react.early_return_sentinel`))return B;let H=z,U=d?.authenticated?d.login:void 0,W;t[108]===_?W=t[109]:(W=_?.detail?ed(_.detail):``,t[108]=_,t[109]=W);let G=W,K;t[110]===o?K=t[111]:(K=e=>{e||o.dismiss()},t[110]=o,t[111]=K);let q;t[112]===V?q=t[113]:(q=(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`RY6Bq1`,values:{targetNoun:V}})}),t[112]=V,t[113]=q);let J;t[114]===j.target?J=t[115]:(J=sn(j.target)?` — ${sn(j.target)}`:null,t[114]=j.target,t[115]=J);let ee;t[116]!==j.owner||t[117]!==j.repo||t[118]!==J?(ee=(0,Z.jsxs)(Wo,{className:`sr-only`,children:[j.owner,`/`,j.repo,J]}),t[116]=j.owner,t[117]=j.repo,t[118]=J,t[119]=ee):ee=t[119];let Y=j.owner,te=j.repo,X;t[120]===j.target?X=t[121]:(X=sn(j.target),t[120]=j.target,t[121]=X);let ne;t[122]!==j.branch||t[123]!==j.owner||t[124]!==j.repo||t[125]!==j.target.kind||t[126]!==X?(ne=(0,Z.jsx)(cp,{owner:Y,repo:te,path:X,kind:j.target.kind,branch:j.branch,testId:`share-receive-metadata`,branchTestId:`share-receive-metadata-branch`}),t[122]=j.branch,t[123]=j.owner,t[124]=j.repo,t[125]=j.target.kind,t[126]=X,t[127]=ne):ne=t[127];let re;t[128]!==q||t[129]!==ee||t[130]!==ne?(re=(0,Z.jsxs)(Yo,{children:[q,ee,ne]}),t[128]=q,t[129]=ee,t[130]=ne,t[131]=re):re=t[131];let ie;t[132]!==a||t[133]!==M||t[134]!==_||t[135]!==G||t[136]!==N||t[137]!==h||t[138]!==P||t[139]!==F||t[140]!==l||t[141]!==L||t[142]!==R?(ie=_?(0,Z.jsxs)(`div`,{ref:S,tabIndex:-1,className:`rounded-lg border border-destructive/40 bg-destructive/5 p-4 outline-none`,"data-testid":`share-receive-clone-error`,children:[(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,role:`alert`,children:(0,Z.jsx)(s,{id:`aiArms`})}),G?(0,Z.jsxs)(`p`,{className:`mt-2 break-words text-xs text-destructive`,"data-testid":`share-receive-clone-error-message`,children:[(0,Z.jsx)(s,{id:`4BITzH`}),` `,(0,Z.jsxs)(`span`,{className:`font-mono text-foreground/80`,children:[`"`,G,`"`]})]}):null,(0,Z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`Llyqvo`})}),(0,Z.jsxs)(`ul`,{className:`mt-1 list-disc space-y-1 pl-5 text-sm text-muted-foreground`,"data-testid":`share-receive-clone-error-reasons`,children:[(0,Z.jsx)(`li`,{children:(0,Z.jsx)(s,{id:`6LbUG7`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(s,{id:`_pY_Vq`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(s,{id:`J6mxC1`})})]}),(0,Z.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,Z.jsx)(Ai,{onClick:()=>{P()},"data-testid":`share-receive-clone-retry`,children:(0,Z.jsx)(s,{id:`KDw4GX`})}),(0,Z.jsx)(Ai,{variant:`outline`,onClick:()=>{F()},disabled:l||h,"data-testid":`share-receive-error-local`,children:(0,Z.jsx)(s,{id:`xFQRu4`})})]})]}):(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-clone`,className:`flex flex-col items-start gap-2 rounded-lg border-2 border-primary/40 bg-card p-4 text-left transition hover:border-primary hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-primary/40 disabled:hover:bg-card`,onClick:()=>{P()},disabled:a!==void 0&&!M,"aria-disabled":a!==void 0&&!M,children:[(0,Z.jsx)(`span`,{className:`text-sm font-semibold`,children:N}),(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`jGJy-9`,values:{shareOwner:L,shareRepo:R}})})]}),(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-local`,className:`flex flex-col items-start gap-2 rounded-lg border border-border bg-card p-4 text-left transition hover:border-foreground/50 hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>{F()},disabled:l||h,children:[(0,Z.jsx)(`span`,{className:`text-sm font-semibold`,children:(0,Z.jsx)(s,{id:`HfI1dR`})}),(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`_qD6mn`})})]})]}),t[132]=a,t[133]=M,t[134]=_,t[135]=G,t[136]=N,t[137]=h,t[138]=P,t[139]=F,t[140]=l,t[141]=L,t[142]=R,t[143]=ie):ie=t[143];let ae;t[144]!==p||t[145]!==d||t[146]!==a||t[147]!==I||t[148]!==U?(ae=a?(0,Z.jsx)(`div`,{className:`mt-3 flex items-center justify-between rounded-md border border-border bg-muted/30 px-3 py-2 text-xs`,"data-testid":`share-receive-auth-banner`,role:`status`,"aria-live":`polite`,children:d===null?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`UDFrWm`})}):d.authenticated?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`VAHWL_`,values:{signedInLogin:U},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground/90`})}})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`SgKLfA`})}),(0,Z.jsx)(`button`,{type:`button`,"data-testid":`share-receive-signin`,className:`font-medium text-primary underline-offset-2 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded`,onClick:()=>{I()},disabled:p,children:p?(0,Z.jsx)(s,{id:`PKLY-1`}):(0,Z.jsx)(s,{id:`3jod3l`})})]})}):null,t[144]=p,t[145]=d,t[146]=a,t[147]=I,t[148]=U,t[149]=ae):ae=t[149];let oe;t[150]!==_||t[151]!==H?(oe=_?null:(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`RJ3a8Z`,values:{lookingForUrl:H},components:{0:(0,Z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),t[150]=_,t[151]=H,t[152]=oe):oe=t[152];let se;t[153]!==ie||t[154]!==ae||t[155]!==oe?(se=(0,Z.jsxs)(qo,{children:[ie,ae,oe]}),t[153]=ie,t[154]=ae,t[155]=oe,t[156]=se):se=t[156];let ce;t[157]===o?ce=t[158]:(ce=()=>o.dismiss(),t[157]=o,t[158]=ce);let le;t[159]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,Z.jsx)(s,{id:`dEgA5A`}),t[159]=le):le=t[159];let ue;t[160]===ce?ue=t[161]:(ue=(0,Z.jsx)(Jo,{children:(0,Z.jsx)(Ai,{variant:`outline`,className:`font-mono uppercase`,onClick:ce,children:le})}),t[160]=ce,t[161]=ue);let de;t[162]!==re||t[163]!==se||t[164]!==ue?(de=(0,Z.jsxs)(Ko,{className:`sm:max-w-xl`,"data-testid":`share-receive-dialog`,children:[re,se,ue]}),t[162]=re,t[163]=se,t[164]=ue,t[165]=de):de=t[165];let fe;return t[166]!==K||t[167]!==de?(fe=(0,Z.jsx)(Xo,{open:!0,onOpenChange:K,children:de}),t[166]=K,t[167]=de,t[168]=fe):fe=t[168],fe}function wp(e){return e.preventDefault()}function Tp(e){return e.preventDefault()}function Ep(e){return e===null?e:mp(e)}function Dp(e){return e===null?e:pp(e,{ok:!0})}function Op(e){return e===null?e:dp(e)}var kp=(e,t,n)=>Yu(e,t,n,`NavigatorApp`);function Ap(e,t){return e.filter(e=>e.path!==t)}function jp(e){let t=(0,$.c)(116),{bridge:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[a,o]=(0,Q.useState)(r),c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=new Map,t[1]=c):c=t[1];let[l,u]=(0,Q.useState)(c),[d,f]=(0,Q.useState)(!0),[p,m]=(0,Q.useState)(null),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(!1),[w,T]=(0,Q.useState)(null),E=typeof window<`u`&&window.okDesktop!=null,[D,O]=(0,Q.useState)(`auth`),{theme:k}=Ar(),{_:A}=i();h(n,k??`system`);let j;t[2]!==A||t[3]!==n.project?(j=()=>{let e=!1;return n.project.listRecent().then(async t=>{if(e)return;o(t);let r=t.filter(Mp),i=await Promise.all(r.map(async e=>{try{let{currentBranch:t}=await n.project.readHeadBranch(e.path);return[e.path,t]}catch{return[e.path,null]}}));e||u(e=>{let t=new Map(e);for(let[e,n]of i)t.set(e,n);return t})}).catch(t=>{console.error(`[NavigatorApp] listRecent failed:`,t),e||m(t instanceof Error?t.message:A({id:`fYKgzG`}))}).finally(()=>{e||f(!1)}),()=>{e=!0}},t[2]=A,t[3]=n.project,t[4]=j):j=t[4];let M;t[5]!==A||t[6]!==n?(M=[n,A],t[5]=A,t[6]=n,t[7]=M):M=t[7],(0,Q.useEffect)(j,M);let N,P;t[8]===n?(N=t[9],P=t[10]):(N=()=>n.onMenuAction(e=>{e===`new-project`&&y(!0),e===`close-active-tab-or-window`&&window.close()}),P=[n],t[8]=n,t[9]=N,t[10]=P),(0,Q.useEffect)(N,P);let F;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(F=(e,t)=>kp(e,t,m),t[11]=F):F=t[11];let I=F,L;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>_(!0),t[12]=L):L=t[12];let R=L,z;t[13]!==A||t[14]!==n?(z=()=>I(async()=>{let e=await n.dialog.openFolder();e&&await Fp(n,e,`pick-existing`)},A({id:`gmJ0An`})),t[13]=A,t[14]=n,t[15]=z):z=t[15];let B=z,V;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>y(!0),t[16]=V):V=t[16];let H=V,U;t[17]!==A||t[18]!==n?(U=e=>I(async()=>{await Fp(n,e,`recents`)},A({id:`SUOoXn`})),t[17]=A,t[18]=n,t[19]=U):U=t[19];let W=U,G;t[20]!==A||t[21]!==n.project?(G=e=>I(async()=>{await n.project.removeRecent(e),o(t=>Ap(t,e)),u(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},A({id:`viwC-K`})),t[20]=A,t[21]=n.project,t[22]=G):G=t[22];let K=G,q;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-0 z-10 h-9 ${E?`[-webkit-app-region:drag]`:``}`,"data-electron-drag":E?``:void 0,"data-testid":`nav-chrome-row`}),t[23]=q):q=t[23];let J;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,Z.jsx)(np,{className:`size-12 shrink-0`}),t[24]=J):J=t[24];let ee;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`h1`,{className:`font-medium text-xl tracking-tight`,children:`OpenKnowledge`}),(0,Z.jsx)(Tf,{})]}),t[25]=ee):ee=t[25];let Y;t[26]===n.appVersion?Y=t[27]:(Y=(0,Z.jsxs)(`header`,{className:`shrink-0 flex-wrap flex items-center gap-2.5`,children:[J,(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[ee,(0,Z.jsxs)(`p`,{className:`text-muted-foreground text-xs font-mono`,children:[`v`,n.appVersion]})]})]}),t[26]=n.appVersion,t[27]=Y);let te;t[28]===A?te=t[29]:(te=A({id:`wbv9xO`}),t[28]=A,t[29]=te);let X;t[30]===A?X=t[31]:(X=A({id:`0uTHCg`}),t[30]=A,t[31]=X);let ne;t[32]!==te||t[33]!==X?(ne=(0,Z.jsx)(Np,{title:te,description:X,onClick:H,dataTestId:`nav-create-new`,Icon:At}),t[32]=te,t[33]=X,t[34]=ne):ne=t[34];let re;t[35]===A?re=t[36]:(re=A({id:`WPwDin`}),t[35]=A,t[36]=re);let ie;t[37]===A?ie=t[38]:(ie=A({id:`tUvUfp`}),t[37]=A,t[38]=ie);let ae;t[39]!==B||t[40]!==re||t[41]!==ie?(ae=(0,Z.jsx)(Np,{title:re,description:ie,onClick:B,dataTestId:`nav-open`,Icon:ht}),t[39]=B,t[40]=re,t[41]=ie,t[42]=ae):ae=t[42];let oe;t[43]===A?oe=t[44]:(oe=A({id:`VdXv4D`}),t[43]=A,t[44]=oe);let se;t[45]===A?se=t[46]:(se=A({id:`JOcPqH`}),t[45]=A,t[46]=se);let ce;t[47]!==oe||t[48]!==se?(ce=(0,Z.jsx)(Np,{title:oe,description:se,onClick:R,dataTestId:`nav-clone`,Icon:tp}),t[47]=oe,t[48]=se,t[49]=ce):ce=t[49];let le;t[50]!==ne||t[51]!==ae||t[52]!==ce?(le=(0,Z.jsxs)(`section`,{className:`grid shrink-0 sm:grid-cols-3 gap-3`,children:[ne,ae,ce]}),t[50]=ne,t[51]=ae,t[52]=ce,t[53]=le):le=t[53];let ue;t[54]===p?ue=t[55]:(ue=p===null?null:(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3 rounded-md border border-red-500/30 bg-red-500/10 px-3 py-2`,"data-testid":`nav-error-banner`,role:`alert`,children:[(0,Z.jsx)(`span`,{className:`text-red-700 text-xs dark:text-red-300`,children:p}),(0,Z.jsx)(Ai,{type:`button`,variant:`link`,size:`sm`,onClick:()=>m(null),className:`h-auto p-0 text-red-700 text-xs dark:text-red-300`,"data-testid":`nav-error-dismiss`,children:(0,Z.jsx)(s,{id:`1QfxQT`})})]}),t[54]=p,t[55]=ue);let de;t[56]!==d||t[57]!==W||t[58]!==K||t[59]!==l||t[60]!==a?(de=d?(0,Z.jsx)(`section`,{className:`flex shrink-0 flex-col items-center`,children:(0,Z.jsx)(Te,{className:`size-4 animate-spin text-muted-foreground/60`})}):a.length>0?(0,Z.jsxs)(`section`,{className:`flex min-h-0 flex-col`,children:[(0,Z.jsx)(`h2`,{className:`mb-2 shrink-0 font-medium text-muted-foreground font-mono text-xs uppercase tracking-wide`,children:(0,Z.jsx)(s,{id:`CCTop_`})}),(0,Z.jsx)(`ul`,{className:`min-h-0 max-h-48 subtle-scrollbar scroll-fade-mask overflow-y-auto space-y-0.5 -mx-4`,"data-testid":`nav-recent-list`,children:a.map(e=>(0,Z.jsx)(Pp,{project:e,branch:l.get(e.path)??null,onOpen:()=>W(e.path),onRemove:()=>K(e.path)},e.path))})]}):null,t[56]=d,t[57]=W,t[58]=K,t[59]=l,t[60]=a,t[61]=de):de=t[61];let fe;t[62]!==Y||t[63]!==le||t[64]!==ue||t[65]!==de?(fe=(0,Z.jsx)(`div`,{className:`mx-auto flex h-full w-full max-w-5xl flex-col overflow-hidden px-12 py-12`,children:(0,Z.jsxs)(`div`,{className:`my-auto flex min-h-0 flex-col space-y-10`,children:[Y,le,ue,de]})}),t[62]=Y,t[63]=le,t[64]=ue,t[65]=de,t[66]=fe):fe=t[66];let pe,me;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Z.jsx)(ip,{}),me=(0,Z.jsx)(If,{}),t[67]=pe,t[68]=me):(pe=t[67],me=t[68]);let he;t[69]!==n||t[70]!==v?(he=(0,Z.jsx)(Kf,{open:v,onOpenChange:y,bridge:n}),t[69]=n,t[70]=v,t[71]=he):he=t[71];let ge;t[72]===w?ge=t[73]:(ge=e=>{x(e),e||(C(!1),w&&(w(null),T(null)))},t[72]=w,t[73]=ge);let _e;t[74]===n?_e=t[75]:(_e=qi(n),t[74]=n,t[75]=_e);let ve;t[76]===n?ve=t[77]:(ve=uo(n),t[76]=n,t[77]=ve);let ye=D===`identity`,be;t[78]!==S||t[79]!==w?(be=e=>{x(!1),S&&(C(!1),_(!0)),w&&(w({authenticated:!0,host:`github.com`,login:e.login}),T(null))},t[78]=S,t[79]=w,t[80]=be):be=t[80];let xe;t[81]!==b||t[82]!==ge||t[83]!==_e||t[84]!==ve||t[85]!==ye||t[86]!==be?(xe=(0,Z.jsx)(aa,{open:b,onOpenChange:ge,transport:_e,queryTransport:ve,identityPrompt:ye,onSuccess:be}),t[81]=b,t[82]=ge,t[83]=_e,t[84]=ve,t[85]=ye,t[86]=be,t[87]=xe):xe=t[87];let Se;t[88]===n?Se=t[89]:(Se=ad(n),t[88]=n,t[89]=Se);let Ce;t[90]===n?Ce=t[91]:(Ce=uo(n),t[90]=n,t[91]=Ce);let we;t[92]===n.dialog?we=t[93]:(we=()=>n.dialog.openFolder(),t[92]=n.dialog,t[93]=we);let Ee;t[94]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=()=>{_(!1),O(`auth`),C(!0),x(!0)},t[94]=Ee):Ee=t[94];let De;t[95]!==A||t[96]!==n?(De=e=>{let{dir:t}=e;I(()=>Fp(n,t,`pick-existing`),A({id:`iSnkwB`}))},t[95]=A,t[96]=n,t[97]=De):De=t[97];let Oe;t[98]!==g||t[99]!==Se||t[100]!==Ce||t[101]!==we||t[102]!==De?(Oe=(0,Z.jsx)(Of,{open:g,onOpenChange:_,transport:Se,authQueryTransport:Ce,pickParentFolder:we,onSignIn:Ee,onCloneComplete:De}),t[98]=g,t[99]=Se,t[100]=Ce,t[101]=we,t[102]=De,t[103]=Oe):Oe=t[103];let ke;if(t[104]!==n){let e;t[106]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>new Promise(e=>{T(()=>e),x(!0)}),t[106]=e):e=t[106],ke=rd({bridge:n,authQueryTransport:uo(n),cloneTransport:ad(n),openSignIn:e}),t[104]=n,t[105]=ke}else ke=t[105];let Ae;t[107]!==n||t[108]!==ke?(Ae=(0,Z.jsx)(bp,{bridge:n,cloneController:ke}),t[107]=n,t[108]=ke,t[109]=Ae):Ae=t[109];let je;return t[110]!==fe||t[111]!==he||t[112]!==xe||t[113]!==Oe||t[114]!==Ae?(je=(0,Z.jsxs)(`div`,{className:`relative flex h-screen w-screen flex-col overflow-hidden bg-primary-foreground dark:bg-background text-foreground`,children:[q,fe,pe,me,he,xe,Oe,Ae]}),t[110]=fe,t[111]=he,t[112]=xe,t[113]=Oe,t[114]=Ae,t[115]=je):je=t[115],je}function Mp(e){return!e.missing}function Np(e){let t=(0,$.c)(14),{title:n,description:r,onClick:i,dataTestId:a,Icon:o}=e,s;t[0]===o?s=t[1]:(s=o?(0,Z.jsx)(o,{className:`size-4 shrink-0 text-muted-foreground`}):null,t[0]=o,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,Z.jsx)(`span`,{className:`font-medium text-gray-700 dark:text-foreground text-sm`,children:n}),t[2]=n,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs leading-snug`,children:r}),t[7]=r,t[8]=u);let d;return t[9]!==a||t[10]!==i||t[11]!==l||t[12]!==u?(d=(0,Z.jsxs)(Ai,{type:`button`,variant:`outline`,onClick:i,"data-testid":a,className:`h-auto flex-col items-start justify-start gap-1.5 whitespace-normal bg-card px-4 py-3.5 text-left`,children:[l,u]}),t[9]=a,t[10]=i,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function Pp(e){let t=(0,$.c)(33),{project:n,branch:r,onOpen:a,onRemove:o}=e,{_:c}=i(),{name:l}=n,u=n.missing,d=n.missing&&`opacity-50`,f;t[0]===d?f=t[1]:(f=Oi(`h-auto min-w-0 flex-1 justify-between gap-2 py-3.5 pl-4 pr-2 text-left hover:bg-transparent`,d),t[0]=d,t[1]=f);let p;t[2]===n.name?p=t[3]:(p=(0,Z.jsx)(`span`,{className:`font-medium text-sm text-gray-700 dark:text-foreground`,children:n.name}),t[2]=n.name,t[3]=p);let m;t[4]===n.path?m=t[5]:(m=(0,Z.jsx)(`span`,{className:`truncate w-full text-muted-foreground text-xs`,children:n.path}),t[4]=n.path,t[5]=m);let h;t[6]!==p||t[7]!==m?(h=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1 truncate`,children:[p,m]}),t[6]=p,t[7]=m,t[8]=h):h=t[8];let g;t[9]!==r||t[10]!==n.missing||t[11]!==n.path?(g=n.missing?(0,Z.jsx)(le,{className:`text-2xs rounded-sm`,variant:`warning`,children:(0,Z.jsx)(s,{id:`VU3Nrn`})}):r===null?null:(0,Z.jsxs)(`span`,{className:`flex max-w-[40%] items-center gap-1 text-muted-foreground text-xs`,"data-testid":`nav-recent-branch-${n.path}`,children:[(0,Z.jsx)(He,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Z.jsx)(`span`,{className:`truncate`,children:r})]}),t[9]=r,t[10]=n.missing,t[11]=n.path,t[12]=g):g=t[12];let _;t[13]!==a||t[14]!==n.missing||t[15]!==f||t[16]!==h||t[17]!==g?(_=(0,Z.jsxs)(Ai,{type:`button`,variant:`ghost`,onClick:a,disabled:u,className:f,children:[h,g]}),t[13]=a,t[14]=n.missing,t[15]=f,t[16]=h,t[17]=g,t[18]=_):_=t[18];let v;t[19]!==c||t[20]!==l?(v=c({id:`hDoLrm`,values:{projectName:l}}),t[19]=c,t[20]=l,t[21]=v):v=t[21];let y;t[22]===c?y=t[23]:(y=c({id:`Es-eZU`}),t[22]=c,t[23]=y);let b=`nav-recent-remove-${n.path}`,x;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(Rs,{"aria-hidden":`true`}),t[24]=x):x=t[24];let S;t[25]!==o||t[26]!==y||t[27]!==b||t[28]!==v?(S=(0,Z.jsx)(Ai,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:o,"aria-label":v,title:y,className:`pointer-events-none mr-2 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100`,"data-testid":b,children:x}),t[25]=o,t[26]=y,t[27]=b,t[28]=v,t[29]=S):S=t[29];let C;return t[30]!==S||t[31]!==_?(C=(0,Z.jsxs)(`li`,{className:`group flex items-center justify-between rounded-lg hover:bg-accent`,children:[_,S]}),t[30]=S,t[31]=_,t[32]=C):C=t[32],C}async function Fp(e,t,n){await e.project.open({path:t,target:`new-window`,entryPoint:n})}var Ip=e=>{let t=(0,$.c)(8),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{theme:r}=Ar(),i=r===void 0?`system`:r,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={success:(0,Z.jsx)(us,{className:`size-4`}),info:(0,Z.jsx)(Qo,{className:`size-4`}),warning:(0,Z.jsx)(as,{className:`size-4`}),error:(0,Z.jsx)(mu,{className:`size-4`}),loading:(0,Z.jsx)(Te,{className:`size-4 animate-spin`})},o={"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={classNames:{toast:`cn-toast`}},t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,Z.jsx)(zs,{theme:i,className:`toaster group`,icons:a,style:o,toastOptions:s,...n}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c},Lp=Symbol.for(`ok.client.fetchWrapper`);function Rp(e={}){if(typeof window>`u`)return;let t=e.apiOrigin&&e.apiOrigin.length>0?e.apiOrigin:void 0;if(window.fetch[Lp])return;let n=window.fetch.bind(window),r=J(),i=((e,i)=>{let a=Bp(e,t);if(!a.isApi)return n(e,i);if(e instanceof Request){let t=zp(e.headers,r);return n(new Request(a.url,e),{headers:t})}let o=zp(i?.headers,r);return n(a.url,{...i,headers:o})});i[Lp]=!0,window.fetch=i}function zp(e,t){let n=new Headers(e);for(let[e,r]of Object.entries(t))n.set(e,r);return n}function Bp(e,t){if(typeof e==`string`){if(e.startsWith(`/api/`))return{isApi:!0,url:t?t+e:e};let n=Vp(e);return n&&Hp(n,t)?{isApi:!0,url:e}:{isApi:!1,url:e}}let n=e instanceof URL?e:Vp(e.url,window.location.origin);if(n&&Hp(n,t)){let r=e instanceof URL?e.href:e.url;return t&&(n.origin===window.location.origin||n.protocol===`file:`)?{isApi:!0,url:t+n.pathname+n.search+n.hash}:{isApi:!0,url:r}}return{isApi:!1,url:e instanceof URL?e.href:e.url}}function Vp(e,t){try{return new URL(e,t)}catch{return null}}function Hp(e,t){if(!e.pathname.startsWith(`/api/`))return!1;if(e.origin===window.location.origin||e.protocol===`file:`)return!0;if(t){let n=Vp(t);if(n&&e.origin===n.origin)return!0}return!1}var Up={messages:JSON.parse(`{"-3Qbv7":[["count","plural",{"one":["matches ","#"," file"],"other":["matches ","#"," files"]}]],"-3ois8":["Hard break"],"-8PP0T":["Match case"],"-K0AvT":["Disconnect"],"-KCZ6n":["Mark a block as the source of truth. Mirror references elsewhere render this content read-only and update live as you edit here."],"-LHLx7":["edited template"],"-QCLWk":["Templates available"],"-Qw-1t":["GitHub authentication failed. Try signing in again."],"-WFFG2":["Default properties"],"-YV1Uo":["Pattern ",["patternNumber"]],"-g6KIS":["Unrecognized link"],"-gdcIo":["Auto-sync is on — your commits push and remote changes pull on intervals."],"-i7ik4":["Collapse burst ",["burstNumber"]," diff"],"-lCAuQ":["Loading graph"],"-q4abP":["Results capped — this workspace has more files than search can index. A missing file may be a cap artifact, not a typo."],"-slrNR":["Toggle a task list."],"-wePNM":["Search matches file names, paths, and folders. Open a file to search its body (⌘F)."],"-zy2Nq":["Type"],"0-31GV":["Removing"],"02P3hL":["Upload failed: ",["message"]],"04RA0-":["Failed to enable sync — ",["detail"]],"05n5wS":["Doc mention suggestions"],"06SZfb":["Template \\"",["trimmedTitle"],"\\" created"],"07gHun":["You don't have access to this private repo. Sign in with an account that does."],"07q4Qk":["File sidebar"],"09Tv5j":["Reconnecting…"],"0BB9ID":["No headings yet."],"0E9DR6":["Type to find a doc"],"0Gd0NU":["Shared"],"0HYJGg":["Cursor (CLI)"],"0NA4b3":["Keep my version"],"0YEbfk":["Connect to AI tools"],"0_J12R":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in ",["targetLabel"]],"0eHrMb":["Could not complete delete"],"0jD-Gn":["A team knowledge base, a personal wiki, project docs..."],"0kTAXe":["Open source: ",["mirrorSrc"]],"0njBIq":["Setup files include: <0>.ok/</0>, AI-tool MCP configs (<1>.mcp.json</1> and per-tool files), project skills, and <2>.claude/launch.json</2>.<3/><4>Shared</4> commits them to git, so anyone who clones the repo gets the same setup. <5/><6>Local only</6> keeps them out of git (via <7>.git/info/exclude</7>)."],"0rwwOn":["By tag"],"0s8-e8":["Select, enter, or leave block components and fallback source blocks from keyboard boundaries."],"0t0bbC":["Could not save sync preference: ",["detail"]],"0uTHCg":["Start a new OpenKnowledge project."],"0wswKc":["Horizontal rule that divides sections."],"0xnmlQ":["Repository name"],"0yL--g":["Review conflicts"],"12F9WL":["(no id)"],"16D5Zj":["Are you sure you want to delete ",["itemName"],"? This action cannot be undone."],"1AumWo":["Push failed — check the server logs for details."],"1EcCom":[["keyName"]," value"],"1FLarN":["Describe what you want to create to continue"],"1GhYxC":["of ",["totalPages"]],"1HBhDS":["Checking out files"],"1MGRQl":["Terminal sessions"],"1QfxQT":["Dismiss"],"1RluQD":["Show replace"],"1TNIig":["Open"],"1Ta7Fd":["Open ",["basename"]],"1WgmEM":["Failed to load template: ",["errorMessage"]],"1XSMhZ":["Switching to <0>local-only</0> will refuse until they're untracked via<1> git rm --cached</1>."],"1ZpfyB":["Open with AI ",["displayName"],", ",["hint"]],"1bDVu5":["Workspace Command Palette"],"1d1F11":["Select all files and folders"],"1di5fu":["Document not found"],"1nke1r":["Open ",["0"]," on GitHub (opens in a new tab)"],"1t_NnN":["Reject"],"2277Tu":["Collapse graph"],"237hSL":["Ended"],"25Pw6a":["Cloning"],"27XW26":["Clone happens in the Project Navigator. Reclick the share link there."],"29VNqC":["Unknown error"],"29XZXN":["Set git identity"],"2BBAbc":["List"],"2FYpfJ":["More"],"2GT3Hf":["Global"],"2QM24L":["All tags"],"2RBzMG":["Network error — check your connection and try again"],"2XQ8Ww":["Open preview when agent edits"],"2YOwme":["Restarted — now running v",["appRuntime"],"."],"2YZwPB":["Forward-links response did not match expected shape."],"2Znqb1":[" (missing)"],"2fkdnR":["Nothing to undo on this file"],"2hpdRq":["Hide panel (",["panelShortcutLabel"],")"],"2n3oDU":["Project-level pages ordered by inbound link count, up to ",["FULLSCREEN_HUB_LIMIT"]," results."],"2q_Q7x":["Visibility"],"2ryd91":["Failed to rename property"],"2tgFCe":["Starting clone"],"2vIPtm":["Open link in new tab"],"2wxgft":["Rename"],"322lyb":["Highlight tips, warnings, and notes."],"34qyH5":["Could not reach server"],"36WXSC":["Couldn't delete template: ",["error"]],"379t2h":["Unified diff"],"38foVZ":["Loading diff"],"3DTatP":["Copy a prompt for your agent, start a blank file, or scaffold from a template."],"3Fcb0I":["Open graph"],"3HNlwb":["Hello, world!"],"3Ib6FN":["Move down"],"3IseAk":["Install an AI agent to create with AI"],"3J7d2N":["Big section heading."],"3JYy1p":["Branch ",["0"]," no longer exists. Cloned to default branch."],"3MnvrL":["Showing top ",["0"]," matches — keep typing to narrow"],"3Mwaly":["Could not initialize ",["0"],"."],"3SDfZl":["<0>Mirror — pick a source.</0> Set <1>src</1> + <2>anchor</2> via the property panel to point at a <3><MirrorSource></3> elsewhere."],"3TCafD":["Stored on this machine."],"3VbwPp":["Open ",["keyName"]," in browser"],"3VsNTI":["Loading document"],"3YvS-c":["New tab"],"3_6U6f":["Connect to GitHub"],"3__SjS":["breadcrumb"],"3a_Bd7":["Open source doc: ",["mirrorSrc"]],"3aeN7X":["All files"],"3h5zMp":["Something went wrong loading the settings panel."],"3iyGWF":["Open recent project"],"3jod3l":["Connect GitHub"],"3m2GBo":["Searching docs"],"3mFsc3":["Restore with remote changes"],"3o3tur":["Starter content"],"3oh0nQ":["Nested .okignore error in ",["path"]],"3pU8e-":["Pin tab"],"3wiBAs":["Where should it live?"],"3y6XTb":["Semantic search"],"3zyg_A":["Ignore patterns"],"438Fca":["Cloned successfully, but could not open the project."],"44DSl0":["Already have a git repository? Add it with <0>git remote add origin <url></0> in this project's folder. This page updates automatically once a remote is detected."],"45MZFs":["Commands"],"484LKL":["Remove link"],"48uGTI":["Failed to load docs. Press Escape and re-open to retry."],"4A3Yzu":["Code block"],"4BITzH":["Error:"],"4CfgPM":["Project folder created, but git init failed. Try again."],"4Gz2wC":["Failed to upload file"],"4KmEoC":["Hotkeys"],"4NC2Ym":["Move to the next or previous table cell."],"4PYsOz":["Hide Files (",["sidebarShortcutLabel"],")"],"4Sxexw":["Source undo or redo"],"4TzU0n":["Initialize"],"4buZWd":["Inherited from ",["path"]],"4c_a6S":["Nothing set yet."],"4g19V6":["Failed to update property"],"4hJhzz":["Table"],"4jDd0j":["Anyone can see"],"4niEzY":["Sandboxed HTML embed — write HTML, see the rendered preview live."],"4nj6n8":["/api/config returned HTTP ",["code"]],"4rjwLG":["Create with ",["0"]," CLI"],"4sKwf6":["File already exists"],"4uNLmk":["Pulling"],"4v2Yyz":["Select every visible file-tree row when focus is in the Files sidebar."],"4xtLTl":["Hidden folder “",["basename"],"”"],"4zGlN_":["Paste image URL or click upload"],"5-FeN2":["Share URL"],"54Y6Fg":["Could not load templates. Try again later."],"56WWtu":["Couldn't load starter packs: ",["error"]],"56xUL1":["Property name"],"57fiu8":["(read-only — edit in source mode for now)"],"5ALjdr":["Move through visual-editor find results from the find field."],"5Ajb15":["The formula <0>c = √(a² + b²)</0> renders inline."],"5ClEAu":["Inline hashtag for cross-doc grouping."],"5D3Ior":["Hide folder"],"5DFPDh":["Started a fresh OpenKnowledge server (v",["appRuntime"],") for this dev session — the server already running for this project was terminated. Connected agents (Claude Code, Codex, Cursor) just lost their OpenKnowledge MCP connection; restart the agent, or toggle its OpenKnowledge MCP server off and on, to reconnect."],"5F5HYj":[["ahead"]," ahead, ",["behind"]," behind"],"5GKMSz":["Indent or outdent the current list item."],"5GRxoA":["Search files, folders, and commands for the current workspace."],"5LXwX8":["This permanently removes ",["path"],". Agents that reference this template by name will fail until it's recreated or replaced by one in a parent folder."],"5OTgC7":["Open and focus the bottom Ask AI prompt composer."],"5OqaJi":["Enter a project name"],"5QGTaA":["Could not copy relative path"],"5SwVv1":["Not installed"],"5Tk8Fb":["Loading files"],"5WDhAk":["Link to a page or external URL."],"5ZB7XC":["File drop zone"],"5gr_ev":["Becomes the document's content when someone creates a doc from this template. Type <0>",["dateToken"],"</0> or <1>",["userToken"],"</1> to fill in today's date or the author's name automatically."],"5kWklo":["(some may already be hidden by other rules)"],"5lWFkC":["Sign in"],"5mksg0":["Failed to disable semantic search — ",["detail"]],"5qNxOe":[["count","plural",{"one":["#"," item could not be moved to the Trash. Do you want to permanently delete instead?"],"other":["#"," items could not be moved to the Trash. Do you want to permanently delete instead?"]}]],"5wV2qQ":["and more"],"5y_9lO":["Waiting for authorization"],"62Pc08":["Install for Claude Chat & Cowork (Desktop App)"],"636K3K":["Delete adjacent chip"],"67f-3g":["Duplicate succeeded but the sidebar may be out of date — refresh to resync"],"6Aih4U":["Offline"],"6LbUG7":["The repository is private and your GitHub account doesn't have access to it."],"6MnZEC":["Terminal failed to load"],"6O626z":["No headings match \\"",["trimmedAnchorQuery"],"\\""],"6Pxqwv":["No project templates yet. Create one to make it available everywhere in this project. Folder-scoped templates live on each folder's overview page."],"6Uau97":["Skip"],"6V3Ea3":["Copied"],"6VqW-1":["Remove ",["keyName"]],"6WdDG7":["Page"],"6YtxFj":["Name"],"6_ZOw4":["Copied full path"],"6bTTAN":["Invalid input — pick a different folder."],"6cR-PU":["Already open"],"6caB2T":["Connect an existing repository"],"6cuT_1":["Open date picker for ",["keyName"]],"6cyguR":["Connect GitHub to continue."],"6eniID":["Map the architecture"],"6fGjTz":["Show fewer"],"6gRgw8":["Retry"],"6h4zVU":["What would you like to create?"],"6hfDJr":["Server error: ",["status"]],"6ibbCg":["Create your first file"],"6ki7F2":[["0","plural",{"one":["#"," item"],"other":["#"," items"]}]],"6m_7We":["Open this settings dialog."],"6q0rnH":["writing"],"6qMe0o":["Draft a technical spec for my project. Start with an overview, then add cross-linked pages for the architecture, the key modules, and the open questions, all linked from a specs index."],"6s7LXO":["Heads up"],"6u9LvN":[["days","plural",{"one":["#"," day ago"],"other":["#"," days ago"]}]],"6vEr3W":["Link target"],"74-bX-":["A pull quote stands out from the surrounding text."],"74eHt-":["No file or folder selected"],"75Y1dk":["Horizontal pill strip + active panel below; click a pill to switch panels."],"77SdEP":["Delete ",["itemName"]],"7FamGZ":["Go to line"],"7Fkcej":["+ Add ",["addChildName"]],"7H4UHD":["Documents tagged <0>#",["tagName"],"</0>"],"7JtSLi":["Failed to delete path"],"7KeV5F":["Undo all failed: ",["message"]],"7OhaRy":["Source search"],"7Ongq0":["Condense my AGENTS.md file to less than 40k characters"],"7OwvEL":["Show HTML preview"],"7PNNNs":["This sends content off your machine"],"7PzzBU":["User"],"7YRrJ9":["Available in the OpenKnowledge desktop app. From a terminal, use<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."],"7_bFEL":["Drag ",["patternText"]," to reorder"],"7apDiJ":["A folder named <0>",["sanitized"],"</0> already has files here. Pick a different name."],"7d1a0d":["Public"],"7hctf2":["Describe the project you want to create"],"7qRHf0":["Install for Claude Chat & Cowork"],"80c4-P":["Code copied to clipboard"],"81H_23":["Add properties"],"881Uwh":["Delete selected table"],"89TtiD":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in the project root"],"8BsGpU":["A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and your provider settings."],"8F1i42":["Page not found"],"8FqTCr":[["chunksRemaining","plural",{"one":["#"," unresolved hunk"],"other":["#"," unresolved hunks"]}]],"8IP5jY":["Each selected tool gets an OpenKnowledge MCP entry."],"8Jm2EP":["Toggle heading levels 1 through 6."],"8OGgNM":["Open or close visual-editor find."],"8OxKZy":["Move succeeded but the sidebar may be out of date — refresh to resync"],"8PmoQF":["Open the insert menu in an empty or active text position."],"8RtNI0":["Failed to load documents"],"8S1E33":["Search recent projects..."],"8TLE9g":["Read-only copy of a MirrorSource block from another doc. Edit at the source — every Mirror reflects the change live."],"8XQRON":["Loading repositories"],"8_brI5":["Name is required"],"8cS0nH":["Config sharing unavailable: ",["0"],"."],"8cpOa8":["Couldn't disconnect — please try again."],"8cpeU3":["Shared repositories"],"8eW0WQ":["No matching repositories."],"8fRyLo":["Invalid patch payload"],"8fc_3j":["Protected branch — cannot push"],"8m8diM":["No location selected. Use Browse to choose a folder."],"8tjQCz":["Explore"],"8uAWix":["This template lives in a parent folder — deleting it affects every folder beneath it that doesn't define its own version."],"92rbk2":["Mirror loading <0>",["mirrorRef"],"</0>"],"96G6Re":["New folder"],"96w9hU":["Something went wrong opening this file (HTTP ",["status"],")."],"99eR72":["Visual editor table selection"],"9Bd18D":["Failed to load hub pages"],"9NJWgv":["Backlinks"],"9PQysm":["Hide advanced"],"9R7pRC":["No tags match \\"",["trimmed"],"\\". Continue typing to create one."],"9UQ730":["Clone"],"9V0W-R":["Adds the OpenKnowledge skill to the <0>Claude Desktop App</0> so it's available in Chat and Cowork sessions."],"9bCiQ8":["No pages are missing incoming graph links."],"9clcD5":["Open documents tagged #",["chip"]],"9dw5bW":["Create with ",["0"]],"9euN0m":[["count","plural",{"one":["#"," more cross-doc participant"],"other":["#"," more cross-doc participants"]}]],"9fhQRL":["Beta channel"],"9fvog2":["Preview unavailable: ",["errorDetail"]],"9i21pa":["Commits happen automatically"],"9jnjV0":["Embed an audio file with native player controls."],"9npOH9":["Open file"],"9o1bIV":[["behind"]," behind"],"9oE4C3":["Browse your repos:"],"9tJX8r":["By meaning"],"9zb2WA":["Connecting"],"A1taO8":["Search"],"A5CYnd":["Broken link"],"A5hiCy":["Create template"],"A67Uwj":["Still loading"],"A6h5b-":["File duplicated"],"AAlr5Y":["No collab server for this worktree — run <0>ok start</0> here, or reopen the project."],"AB4qw9":["New terminal"],"AE7BY3":["The terminal session ended."],"AIn2Yv":[["displayName"]," CLI, ",["hint"]],"ALhMYW":["Terminal"],"AQ-Lfg":["Couldn't load templates"],"AQGtjK":["Commands run with the full access of your macOS user account on this machine. Turn this off to disable the shell."],"AVW-K9":["Failed to load orphan pages"],"AWOSPo":["Zoom in"],"AcK_r0":["Claude CLI"],"AdcGcG":["Applying your change"],"AddR83":["Could not create project. Try again or pick a different location."],"AeHuzT":["# One pattern per line.\\n# Examples:\\n# drafts/\\n# *.draft.md\\n# !keep.md"],"AeXO77":["Account"],"AiNMQ7":["This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."],"Aif3E7":["Enable semantic search"],"Am78jY":["Drag ",["keyName"]," to reorder"],"Aq-O0x":["status"],"AqnqMJ":["API key set"],"ArBWJf":["Undo last edit"],"B11p-O":["Edit markdown link"],"B2DrPb":["Auto-save"],"B3NAZC":["Open Navigator"],"B4_ipX":[["conflictCount","plural",{"one":["#"," file conflicted"],"other":["#"," files conflicted"]}]],"BAH4qX":["Selected graph item"],"BBqGS9":["Desktop"],"BD0XSC":["Failed to load project templates"],"BEkF-P":[["userName"],", ",["tabCount","plural",{"one":["#"," concurrent tab"],"other":["#"," concurrent tabs"]}]],"BGHHtQ":["Single page"],"BH56dn":["Custom display text"],"BQKHuL":["Restart terminal"],"BQu9Pg":["Symlink"],"BY-g4_":["Add pattern"],"Bdha5y":["Publishing..."],"BeWTQy":["Loading starter packs"],"BgV29F":["Visual editor find input focused"],"Bv5a9_":["Selection statistics"],"Bx4EXG":["Actions for ",["label"]],"By-7Pn":["Toggle a bullet list."],"BymzO4":["Document outline"],"C37Zkt":["Send to"],"C62P6b":["Editor selection"],"C9TBvF":["No Outgoing"],"CCTop_":["Recent"],"CKyk7Q":["Go back"],"COr1Y7":["Pick <0>openknowledge.skill</0> from your <1>Downloads</1> folder. It enables automatically."],"CSL0l1":["Couldn't clear the key — please try again."],"CTJLpz":["\\"",["trimmed"],"\\" already exists here"],"CU3AiE":["Switching branches"],"CXj9C-":["New property name"],"C_WGy8":["This file is too large to open in the built-in text editor (1 MB limit). Use Open file below to open it in another app."],"C_cPoW":["Your GitHub session expired — sign in again to verify push access."],"ChAtFg":["You don't have permission to push to this repo"],"Ck9XRt":["Couldn't save the key — please try again."],"CmeH9S":["Add property to ",["keyName"]],"CvsD6Y":["via ",["viaTags"]],"D4H2N6":["Remove ",["tag"]],"D8OV7J":["Only collaborators"],"DDTdLl":["Code block settings"],"DELNQk":["Collaborators see your in-progress edits as soon as they sync."],"DF1MtZ":["Loading conflict for ",["filePath"]],"DFfRbX":["Sync status: ",["syncStateLabel"]," — git identity unset"],"DId6MT":["Project-level pages with no outgoing graph edges."],"DPfwMq":["Done"],"DVh_Tb":["Failed to clean up after trash"],"D_WKe_":["Click an agent's avatar in the presence bar to view their session."],"DbILZA":["No matches. Some files are excluded from search (hidden or ignored files)."],"DeDYLr":["Unrecognized wiki link"],"DhLHEb":["Failed to load activity"],"DiFKSL":["Counting markdown files"],"Dnn2XG":["Automatic"],"DrYM2Z":["Sync disabled"],"DskIkK":["Sign-in stream ended without confirmation — please try again"],"Dub54T":["Preview browsers can't auto-copy. Use Cmd/Ctrl+C on the URL above, or open OK in the desktop app."],"Dw1T_W":["Rename ",["label"]],"E1_c72":["Task list"],"E1tG2u":["Get Claude Code"],"E2Mv-X":["Copy source"],"E4XYYH":["Enable terminal for this project"],"E6lrpp":["Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."],"E7BhZn":["Blank note"],"E9bKSA":["Creating"],"EBVbtP":["Could not duplicate item"],"EDm3wJ":["Loading diff renderer"],"EEYbdt":["Publish"],"EJuO7B":["Connect a GitHub account to browse and sync your repositories."],"EL_YRd":["Mirror of <0>api-spec</0>"],"EOjU5V":["Inline Math Properties"],"ETyvvg":["No language match."],"EVnzPs":["Edit with AI"],"EWX92Z":["Collapse Ask AI"],"EZVxVz":["Replace the active match from the replace field."],"E_BHoD":["Could not move \\"",["targetName"],"\\" to the Trash. Do you want to permanently delete instead?"],"E_tNGD":["Connected as @",["login"]],"EarrCe":["Search emoji"],"EbZT7P":["Toggle the left file sidebar."],"EcM3k7":["Failed to clean up pending ",["kind"]],"EcR0fl":["Checking for installed agents"],"EdQY6l":["None"],"EeRZnZ":["Expand burst ",["burstNumber"]," diff"],"Ef7StM":["Unknown"],"EhDLBx":["You modified <0>",["filePath"],"</0> locally, but it was deleted upstream."],"Ehkru0":["Open, navigate, accept, or dismiss CodeMirror completion suggestions."],"EiVgl5":["You don't have permission to push to this repo."],"Eji13z":["Toggle highlight formatting."],"El7NbA":["Heading 2"],"Emz5BG":["Embeddings are computed only when a search runs and are cached locally under <0>.ok/local</0>."],"EqrC_R":["Undo failed: ",["message"]],"EqtBXb":["Visual editor find open"],"ErRi6L":["Template \\"",["label"],"\\" deleted"],"Es-eZU":["Remove from recent projects"],"Ev2r9A":["No results"],"EvPX7f":["Opens a folder picker to choose where to clone the repository."],"Evq3lu":["Orphan mode"],"ExPiRQ":["Move to the next CodeMirror lint diagnostic."],"F-NRCj":["Add property"],"F-vBv0":["Ask"],"F0OA00":["Get ",["displayName"]],"F1T9y_":["Showing top matches — keep typing to narrow"],"F4IYWe":["Share doc"],"F4vEsL":["Sync status: ",["syncStateLabel"]],"F6pfE9":["Active"],"FBknns":["HTML"],"FCAcjR":["Run a real terminal docked inside OpenKnowledge, starting in this project's folder."],"FCxvG5":["First item"],"FEK4oC":["OpenKnowledge will be initialized at <0>",["gitRoot"],"</0> — the parent of your new folder, because it contains a <1>.git</1> folder (one project per git repo)."],"FEr96N":["Theme"],"FNTx6u":["Search \\"",["semanticSubmitQuery"],"\\" by meaning"],"FOGD7m":["Create something great."],"FOyCTr":["Your OpenAI API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search."],"FRYB1Q":["/api/config returned a malformed body"],"FTUGgh":["Enter a repository URL or owner/repo"],"FUMerq":["Could not enable sync: ",["detail"]],"FWQuPE":["This project is running a different, incompatible build of OpenKnowledge than this app (v",["0"],")."],"FjkaiT":["Zoom out"],"FnMkli":["Sync disabled — you don't have permission to push"],"FqTpiN":["Bird wiki"],"Fqr8BP":["Multi-page PDF viewer with toolbar controls (thumbnails, page nav, zoom)."],"FvMSms":["Renaming changes the file on disk and the id agents use to pick this template."],"FvpFSZ":["Reveal in Finder, ",["hint"]],"Fxf4jq":["Description (optional)"],"FyW0WO":["Authorize in browser"],"G-JBA1":["Source mode requires a live connection — your edits are saved and will appear when you reconnect."],"G0YZ-I":["Indent or outdent list item"],"G1Gw0v":["New template"],"G1XxbZ":["Checkbox"],"G4-bgo":["Ask AI (from selection)"],"G7-rf8":["Pattern syntax error: ",["message"]],"G7cMuO":["HTML preview"],"G8t9NN":["Add a property"],"GA-UkN":[["keyName"]," type: ",["typeLabel"],". Click to change."],"GDvlUT":["Role"],"GGsM4y":["Selected in graph"],"GJH-AT":[["docName"]," is ",["0"],". OpenKnowledge currently opens files up to ",["1"],"."],"GK-IRZ":["Undo buttons are disabled — per-session state has been garbage-collected."],"GN6L5F":["Filename"],"GQDSBN":["Layout options"],"GUYwCr":["Dismiss notice"],"GUpclA":["Created if missing; reused if it exists."],"GUqTzn":["Competitor research"],"GXf9hG":["Cloning ",["repoName"],"..."],"G_686w":["Task List"],"G_mWXb":["Filter languages"],"GamjcN":["Template saved"],"GemPfn":["Failed to parse forward-links error response (HTTP ",["status"],")"],"Gfr4fu":["Server can't open documents"],"GhjUB_":["Reconnected"],"Gp_twO":["Local path"],"GsBUCk":["Loading settings"],"GubkSu":["Use a starter pack"],"GuqOb1":["Failed to load headings"],"Gx0VS1":["e.g. drafts/ or *.draft.md"],"H-vDm3":["Relaunching to install the update…"],"H0WlWQ":["Grid of rows and columns with a header row."],"H86f9p":["Collapse"],"H8Ng4Z":["Search recent projects"],"HCn0Ay":["Toggle strikethrough formatting."],"HGNCsl":["Connection lost — keep this tab open, your edits will sync when reconnected"],"HIb0vl":["Network error — please try again"],"HM56Bx":["Creating..."],"HNnVG1":["No other recent projects."],"HPTPGr":["Create a new spec file for my user story"],"HXFyWD":["Split diff"],"HdkSiO":["New file"],"HfI1dR":["I already have it locally →"],"Hl89Qd":["Loading templates"],"HlmZBk":["Documents response did not match expected shape."],"HpK_8d":["Reload"],"HptUxX":["Number"],"HqiZvw":["OpenKnowledge stores its configuration and internal files inside a newly created <0>.ok</0> directory in your project root folder."],"Hrz9NY":["Wiki link"],"I1gRhX":["Failed to rename"],"I5AfhE":["Sync status unavailable — server unreachable."],"IA1wNb":["The Claude Desktop App didn't open the file. Is it installed? (",["msg"],")"],"IA6JW2":["Detecting"],"ICoNYz":["You can also manage this in Settings."],"IInnZo":["Conflict"],"IKoTAC":["Keep disabled"],"IN4UX8":["Search (",["searchShortcut"],")"],"INEQsp":["Items to be created"],"IQPyrD":["Missing page — click to create"],"IRv9cH":["Cloned ",["repoName"],"."],"IWGfGF":["Checking your GitHub connection"],"IX7-sq":["Something went wrong opening \\"",["docName"],"\\"."],"IajAbS":["Add a starter pack"],"If0crP":["Open with AI ",["targetDisplayName"],", ",["hint"]],"IgTwLt":["Open this document in the editor and collapse the graph."],"Ik-gP0":["Heading H",["level"],": ",["text"]],"Iq8zdU":["Close terminal"],"IrB5AK":["Server-side cleanup failed for ",["failedCount","plural",{"one":["#"," item"],"other":["#"," items"]}]],"IreQBq":["Repository"],"It9ARY":["Toggle the right document panel."],"Ix0K8o":["Hide external URL nodes"],"J2MgzQ":["Undo all edits on ",["docName"]],"J2Mv98":["Name (e.g. ",["login"],")"],"J2eKUI":["File"],"J3HzPL":["Collapse ",["keyName"]],"J6N5MX":["Couldn't construct the share URL. Try Done and re-share."],"J6mxC1":["A network problem or GitHub outage interrupted the clone."],"JCxGEX":["No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."],"JE21eh":["Symlink to ",["targetPath"]],"JK-Ave":["Hide thumbnails"],"JLUTgi":["No tags yet — author \`#tagname\` in any doc to populate the index."],"JLzQi_":["Close ",["accessibleLabel"]],"JOcPqH":["Bring a remote repository onto this machine."],"JWsZlx":["Open a project to edit."],"JZ8cO6":["Light, dark, or follow the OS."],"Jejur6":["Couldn't load document"],"Jhj_lh":["Modify the link target, anchor, and display label."],"JkCD2u":["Sync paused — you don't have permission to push to this repo"],"JmfgFc":["(a worktree of ",["0"],")"],"Jqqevv":["System error"],"JtD-Br":["Page link"],"Jw6EC4":["Branch switch failed — try opening the ",["targetNoun"]," manually."],"K-a33w":["Start writing to create this page"],"K-h9cT":["Couldn't save the resolution for ",["filePath"],"."],"K0N7zS":["Config sharing status read failed"],"K1ckLX":["Failed to create folder"],"K6jjWB":[["packName"]," was already set up. Nothing to do."],"K6jxcj":["Add a key"],"K8-WWn":["Move between table cells"],"K9J00P":["Clone failed — connection error"],"KDuPiY":["Uploading ",["fileName"]],"KDw4GX":["Try again"],"KFdXwz":["Show panel (",["panelShortcut"],")"],"KH5bQi":["Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."],"KIIamL":["OpenKnowledge will create commits and push them to your remote automatically. If you do not want automatic commits in your git history, you should not enable auto-sync."],"KOZud0":["Build a competitor research knowledge base. Start with an overview page, then add cross-linked pages for each competitor, their products and pricing, and the sources behind every claim."],"KPW5WC":["moved template"],"KRJ6xh":["No tags yet. Continue typing to create one."],"KWL_Ih":["Blog post"],"KX1MZR":["Your repositories"],"KYSocE":["Research the extinction of flightless birds"],"KYcZ6Y":["Above"],"KZLdgR":["See <0>#design-docs</0> for the latest specs."],"K_vT1F":["Upstream sync"],"KaFCD3":["Open this link in a new tab and collapse the graph."],"Kf7GG5":["Restarting the server…"],"Kgdbkt":["Switch to local-only refused"],"Kh1n4a":["<",["componentName"],"> isn't a known component. Copy the source to use it elsewhere, or delete the block."],"Khxcyu":["Terminal access isn't enabled for this project."],"KkEAud":["Create a file from the current document or folder context."],"KmydK6":["Bold"],"KnoB--":["Will be saved as <0>",["sanitized"],"</0>."],"KsAPaB":["This branch is checked out in:"],"KujtjC":["Find"],"L-rMC9":["Reset to default"],"L1ZE3M":["Document statistics"],"L3CEC1":["this item"],"L4Cdd9":["or create a new file <0/>"],"L6Hhh6":["(root)"],"L8fKuc":["Run this in your terminal"],"L9Y9Om":["Top linked pages"],"LBwUR6":["Branch switch timed out — try opening the ",["targetNoun"]," manually."],"LCUy_N":["Session ended"],"LDuM35":["Replace current match from field"],"LE7t79":["Clone to a new folder"],"LKOLNn":["No AI agents installed"],"LNum6A":[["minutes"]," min ago"],"LRgZAt":[["owner"],"/",["name"]," already exists"],"LXdWeS":["Medium section heading."],"LXfNU-":["Navigation and suggestions"],"LYufDw":["Failed to enable semantic search — ",["detail"]],"Lcehxn":["Save resolution"],"LdABLa":["Could not open ",["target"],". Try opening it manually."],"LdKIHS":["Draft a spec"],"LhQlGR":["This project is running an older version of OpenKnowledge (v",["0"],") than this app (v",["1"],")."],"LhWYpm":["Other OK paths are tracked upstream:"],"LlHqdU":["Initializing project"],"Llyqvo":["This usually means one of:"],"LpB85N":["Plain"],"LtI9AS":["Owner"],"LtSYdi":["Reveal in Finder"],"LuoJWu":[["truncatedShownCount","plural",{"one":["Showing the first item in one folder — the rest of that folder is hidden."],"other":["Showing the first ",["formattedCount"]," items in one folder — the rest of that folder is hidden."]}]],"M1OfV9":["Next source diagnostic"],"M3ytY_":["This looks like a drive root (e.g., C:\\\\). Scaffolding here will scan an entire drive."],"M5mfAe":["Add tag"],"M9597s":["Preparing share URL..."],"MCjC9A":["Delete ",["deleteDescriptorLabel"]],"MGb89P":["Insert, delete, move, copy, and indent source editor lines through CodeMirror's default keymap."],"MHrjPM":["Title"],"MKOVhz":["Enable git auto-sync"],"MQIM_Y":["Couldn't copy. Select the URL above to copy it manually."],"MTs6g3":["Couldn't reconnect after server restart"],"MUBR8r":["Rename succeeded but the tabstrip may be out of date — refresh to resync"],"MV-Dkb":["Found ",["countDisplay"]," markdown files"],"MVxpbf":["Find and replace"],"MWrUEd":["Undo all"],"MZSBsh":["No templates yet. Add one to give new docs in this folder a ready-made starting point."],"MZoxVx":["Failed to load tags. Press Escape and re-open to retry."],"Mb_20S":["Visual"],"Md709y":["Loading ",["fileName"]],"MmDDWK":["Recently opened"],"Mnavhe":[["propPanelDescriptorLabel"]," Properties"],"MqQoV-":["Describe what you want to build, start a blank file, or scaffold from a template."],"MrwYIK":["Toggle a source comment through CodeMirror."],"MsuXaI":["Hide panel (",["panelShortcut"],")"],"N1YYa7":["Loading image"],"N1mdmS":["This file can't be opened in the text editor."],"N2FcBE":["Synced"],"N2S1rs":["Empty"],"N2eHWq":["Code Block"],"N3_ozB":["Hubs"],"N55YNr":["Choose whether this project's OpenKnowledge setup, including its AI-tool connections, is saved with the project so teammates get it too, or kept only on your computer."],"NIWAux":["No docs registered under #",["tagDocsName"],"."],"NJyQi_":["Branch ",["shareBranch"]," no longer exists on the remote."],"NKkZXl":["Initialize and open"],"NOHyEE":["Retry push"],"NORKZU":["Pattern warnings: ",["summary"]],"NQ8llq":["Add item"],"NRSLBe":[["diffMin"],"m ago"],"NSnIUP":["Two-page (even)"],"NUr4kz":["A reusable starting point for new documents in this folder."],"N_7kkF":["Read through this codebase and draft a technical spec for the most complex module: an overview, the architecture, key files, and open questions, all linked from a specs index page."],"NjrIak":["File: <0>",["fixedName"],".md</0>"],"NkXEFS":["Restore failed — document unchanged"],"NmPNJJ":["Copy code"],"Nn4GgW":["Will be created as <0>",["sanitizedName"],"</0>"],"NnQapF":["Open with AI ",["targetDisplayName"]],"NpC29w":["Create a new list item from the current list item."],"Nu4DdT":["Sync"],"Nu4oKW":["Description"],"NuH1jp":["Public repository"],"Nv3mUj":["Show advanced"],"NvOvTi":["Create in <0>",["dirDisplay"],"</0>"],"Nx7BWE":["Git auto-sync"],"NxW-md":["Resize ",["handleKey"]],"NzFvyK":["Session ended — undo unavailable"],"O0Z2Xr":["Outgoing"],"O2UpM1":["Browse"],"O3oNi5":["Email"],"O6yEPk":["Create a new OpenKnowledge project in the folder of your choice."],"O7_W_a":["Open with AI"],"OD0FCX":["Hidden “",["basename"],"”"],"ODD5Jc":["Edit ",["templateLabel"]],"ODGGlj":["Folder name: ",["detail"]],"OETysD":["No hub pages yet. Hubs appear once pages accumulate inbound graph links."],"OJTOUj":["Requires ",["brand"],"."],"OJeiSH":["Failed to add property"],"OLBz-_":["Mermaid diagram failed to render."],"OLIKgw":["Drag item ",["0"]," to reorder"],"ONPvOb":["Loading agent activity"],"ONgEZF":["Loading headings for ",["pageTarget"]],"OTF92M":["Label <0>(optional display text)</0>"],"OUcBW4":["Codex CLI"],"OVjNeX":["Terminal ",["0"]],"OX2Neh":["Inline code"],"OYnx7O":["Path cannot start with \\"/\\""],"OdmsFg":["Failed to delete item"],"OgyJSr":["Local only"],"OiHJdA":["Move through slash, wiki-link, tag, and path suggestions; accept or dismiss the active suggestion."],"Okd2Xv":["Toggle underline formatting."],"OlAl5i":["Expand all"],"OmHTGj":["Disable git auto-sync"],"Oo_WWc":["No pages found"],"Oos8fo":["Copy command"],"OuY8t9":["Open in current branch"],"OvEjsP":["Copying..."],"Oxyd5f":["Pick a name"],"OyIC0Q":["Project name"],"P-ye9o":["Could not open folder picker"],"P3NS4G":["Pattern syntax error (line ",["lineNumber"],"): ",["message"]],"P3hnm0":["File too large to open"],"P47EWZ":["Could not update sidebar settings"],"P6gXB-":["Replace ",["keyName"]],"P6lAT3":["Folder target: ",["linkTitle"],". Click to open the overview."],"P8yDjG":["Name can’t be empty, \\".\\", \\"..\\", or contain / or \\\\"],"PB4upl":["Find previous match"],"PBwmDJ":["Searching by meaning"],"PBxg_E":["Not now"],"PKLY-1":["Opening..."],"PMyJ9C":["No edit session yet"],"PQCdtv":["\\"",["docName"],"\\" doesn't exist."],"PR9FSv":["Move to the next visual-editor find result."],"PVUn_c":["Open folder"],"PZt1uN":["Search files, commands, projects, and AI handoff actions."],"PdA9NZ":[["ahead"]," ahead"],"Pgu10b":["Saved as <0>",["slug"],".md</0>"],"PgzIpb":["Move to the previous visual-editor find result."],"PiH3UR":["Copied!"],"PkeYXL":["Expanded graph mode"],"Pkw7J9":["This folder is empty."],"PqYWiC":["Couldn't restart the server automatically. Try running \`ok stop all\` in a terminal, then reopen this project — or restart your computer if it persists."],"Pyp1NA":["Restore to this point?"],"Q5fqMz":["Connection error — try again"],"Q6hhn8":["Preferences"],"Q8A-U_":["Connected to"],"QDZbvN":[["diffDays"],"d ago"],"QOINDn":["empty"],"QQghPu":["Install in Claude Desktop"],"QR5SP1":["created template"],"QWks14":["A short line shown under the name in the template list."],"QYfQdv":[["displayName"]," CLI"],"QcpeeE":["Navigate to ",["docName"]],"QlxHAH":["Showing results for \\"",["semanticResultsLabel"],"\\""],"QqBQu1":["Label <0>(visible link text)</0>"],"Qvls7J":["Eng specs"],"QyioBP":["Move up"],"R0cyYB":[["0","plural",{"one":["#"," request blocked by the preview's security policy"],"other":["#"," requests blocked by the preview's security policy"]}]],"R0jJzV":["Paste URL, owner/repo, or search your repos"],"R3y75Z":["Edit source"],"R65q-K":["A real shell is off for this project. Turning it on runs commands with the full access of your macOS user account."],"RDjuBN":["Setup"],"RDrXh4":["Configure user, project, and integration settings."],"RG4XHV":["Copy ",["0"]," prompt"],"RGCCrg":["Copy share link"],"RGkNeJ":["Initialize a starter pack"],"RJ3a8Z":["Looking for <0>",["lookingForUrl"],"</0>."],"RN62Q8":["We'll build <0>openknowledge.skill</0>, save it to <1>~/Downloads</1>, and open the Claude Desktop App for you."],"RSqaSd":["Project root"],"RY6Bq1":["Open shared ",["targetNoun"]],"RaPMZv":["Keyboard shortcuts available in the editor and workspace."],"Rah7yq":["What should the AI do? (optional)"],"RfHNf8":["Open activity panel for ",["tooltipName"]],"RfaEio":["Toggle source comment"],"RgbKEe":["You don't have access to this repository."],"Rj01Fz":["Links"],"RlCInP":["Slash commands"],"RmBY0A":["No git remote"],"RobAKV":["Update the destination and optional section anchor."],"Rq1vFD":["Tree view options"],"RrAIZx":["What config sharing covers"],"Rx5ReQ":["Rename ",["keyName"]],"S33tz3":["Not connected"],"S6l5dv":["Could not start creating a new item"],"S9Vnum":["Remove ",["patternText"]],"SCoBBH":["Tag suggestions"],"SCzAbA":[["phase"]," — ",["pct"],"%"],"SEYWYq":["Undo all edits on this file?"],"SFN6dN":["Heading 3"],"STTOnz":[["keyName"]," type: complex value (nested; read-only)"],"SUOoXn":["Failed to open project."],"SYfHmN":["Unpin tab"],"Sc1bKE":["Local collaboration data for \\"",["docName"],"\\" could not be cleared in time. Reload to retry."],"ScwcF2":["A project already exists at this location. Pick a different parent folder."],"Sfh6zL":["The file on disk, and the id agents use. It can't be changed later."],"SgKLfA":["Not connected to GitHub."],"SiUUCS":["Next match"],"SkMZlS":["Couldn't remove <0>",["targetGitPath"],"</0>: ",["removeGitError"]],"SrOuyg":["Document panels"],"T-4cw2":["Pick a layout that matches what you're building. Each pack ships with folders, templates, and agent-readable descriptions. You can mix and match later."],"T-654M":["Loading PDF"],"T0OVm7":["The default branch is protected — pushes need a pull request."],"T67A0Y":["Auto-sync pushes/pulls commits to your git remote on intervals and on save. Toggling on requires confirmation."],"TEEPPF":["Will replace existing OpenKnowledge entry"],"TJnkyf":["ok ui responded but server.lock has no port yet"],"TKQ7K-":["Install"],"TLIO3j":["Toggle italic formatting."],"T_wG4n":["We couldn't check your GitHub connection."],"Ta25TG":["No history yet"],"TbjyhA":["Docs"],"Tgalot":["OpenCode (CLI)"],"ThmUrC":["Could not finalize project setup. Try again."],"Tjc1pH":["Section <0>(optional heading anchor)</0>"],"TwYboS":["Navigate CodeMirror source search results or dismiss the search panel."],"Tz0i8g":["Settings"],"Tz9pJB":["Clone stream ended unexpectedly — check if the clone completed"],"U2Kx6T":["Close all unpinned"],"U2pMtf":["tag-name"],"U3IvM5":["Full guide"],"U5Spo9":["Content directory must be inside the project"],"U8CD-l":["Copy full path, No workspace"],"UBv8UK":["Delete Permanently"],"UDFrWm":["Checking GitHub connection..."],"UL8A9w":["Tag"],"UQAp48":["Search templates"],"URmyfc":["Details"],"UTNVyS":["Select the full source document."],"UTZ97u":["Selection must be inside the project"],"UVLlMV":["Couldn't reach GitHub. Try again?"],"UW2Fg3":["This project's running server doesn't support live editing. Restart OpenKnowledge to fix."],"UW93oq":["Replace key"],"UYcGIW":["Connecting — waiting for collab server"],"Ua78MH":["no response"],"UaDyeb":["Hide selection preview"],"Uci-Ph":["Ordered List"],"Ud0Pj9":["<0>Mirror source removed.</0> The doc <1>",["src"],"</1> is no longer available."],"UfW9Kr":["Your search queries and the full text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"UkQGhd":["Hide replace"],"Up2_7p":["Copy full path"],"Uuj_R4":["New from template"],"Uw6ERJ":["Couldn't copy: ",["detail"]],"UyROxs":[["mins","plural",{"one":["#"," min ago"],"other":["#"," min ago"]}]],"V48OUT":["You deleted <0>",["filePath"],"</0> locally, but it was modified upstream."],"V7QxyT":["Connection dropped"],"VAHWL_":["Connected as <0>@",["signedInLogin"],"</0>"],"VNgKZz":["Advanced settings"],"VU3Nrn":["Missing"],"VUijjF":["Embed an image with optional alt text."],"VYd_YA":["Open an existing project folder from disk."],"VZGh8G":["Fold, unfold, fold all, or unfold all source ranges."],"VZSBXL":["Semantic ranking activates the first time an agent runs a search."],"V_6bJ4":["Terminal settings not loaded yet — try again in a moment."],"V_wltx":["Enter a title for this template."],"VbqhBI":["Already at ",["assetContentPath"]," — reusing."],"VcqWBy":["Upload may have succeeded but the sidebar is out of date — refresh to resync"],"VdXv4D":["Clone from GitHub"],"Vlc75q":["Keep file deleted"],"VuxVSP":["Start source completion"],"VvS_k_":["Config sharing is now local-only."],"W-ntoW":["heading-slug"],"W0i24j":["Object"],"W1qRuM":["This document is already active in the editor. Use Open to collapse the graph."],"W3Xlpc":["Set the auto-sync default for users opening this project for the first time. This setting is committed to your repository."],"W5A0Ly":["An unexpected error occurred."],"W7XJN4":["Can't nest projects. An OpenKnowledge project already exists at <0>",["rootPath"],"</0>. Choose a location outside it, or open that project instead."],"W8vpBM":["starter pack"],"W9_Bub":["Local changes overlap with incoming sync"],"WL6puM":["Path resolves outside project"],"WMIKXK":["Are you sure you want to delete ",["targetCount"]," selected items? Folders and all files inside them will be deleted. This action cannot be undone."],"WPwDin":["Open folder on disk"],"WR0y2O":["Share folder"],"WRNXKp":["Searching"],"WZ-vBy":["Permanently deletes <0>",["targetGitPath"],"</0> and all its git history. Working files stay in place. If the parent git repo is intentional (e.g. you cloned it), cancel and pick a location outside it."],"WamGNs":["Failed to load PDF: ",["error"]],"WcWS__":["Download file"],"Wcv-Zi":["Make this knowledge base available as a Claude Skill."],"We7h2I":["📝 or assets/icon.png"],"Weq9zb":["General"],"Wgmlsw":["Fetching"],"Wh0im4":["editing [[",["realCurrentDoc"],"]]"],"WhOsNE":["Strikethrough"],"WqLq6M":["Open with AI ",["displayName"]],"Wt5W56":["Sync is off — your edits will not sync to the remote repository."],"Wtw22s":["Installing"],"WyXG7w":["Close all"],"Wyxs0x":["Path cannot contain \\"..\\""],"X0ttSN":["No tags match \\"",["tagListQuery"],"\\"."],"X7u0xR":[["0"]," templates available"],"X8kjQX":["Re-authenticate with GitHub"],"X9VpsP":["Loading folder contents"],"XDzAnp":["Opens in a new tab"],"XH30C4":["document"],"XJOV1Y":["Activity"],"XPJ0sN":[["settingsDescriptorLabel"]," properties"],"XPqe3B":["Create new tag #",["tagValue"]],"XRuL0i":["Create page"],"XU0OXn":["Enable auto-sync"],"XW18jo":["Page headings response did not match success schema"],"XYlJJT":["Setting up"],"XcGbim":["Show hidden files"],"Xet9MX":["Failed to load backlinks"],"XfzqjK":["template \\"",["name"],"\\""],"Xl-UUg":["guides/install or https://example.com"],"XnlF3W":["Add the next matching source selection."],"XnoA1k":["This ",["targetNoun"]," only exists on branch <0>",["shareBranch"],"</0>. You have uncommitted changes that prevent switching. Commit or stash your changes, then open the share link again."],"XopE_I":["Failed to parse backlinks error response (HTTP ",["status"],")"],"XpIZmv":["Fenced code block with monospace text."],"XtRoxT":["Page ",["pageNumber"]],"XvPJaT":["Diff layout"],"Xv_ijG":["https://github.com/owner/repo or owner/repo"],"Xw_maT":["Type a query, then press ↵ to search your pages by meaning."],"XyOUTJ":["Exit merge"],"Xzy0s0":["Remove ",["fullLabel"]," from context"],"Y-Urt2":["Block math equation rendered with KaTeX from a LaTeX source string."],"Y1kX2z":["OpenKnowledge initializes at <0>",["projectDir"],"</0> — the parent of <1>",["pickedRelative"],"</1> because it contains a <2>.git</2> folder (one .ok/ per git repo). <3>Content directory</3> defaults to <4>.</4> (the whole repo); type a sub-folder to narrow it."],"Y8ViJx":["A newer version may have been deployed since this tab opened."],"YC6_wP":["Edit ",["keyName"]],"YEP3X2":["Delete a table when the active table cell selection covers the full table."],"YGIi_c":["Reinstall"],"YGQm6y":["OpenKnowledge manages the <0>open-knowledge</0> MCP server name, the <1>open-knowledge-ui</1> launch config, and <2>ok</2> / <3>open-knowledge</3> on PATH (including OK-owned symlinks). Using a custom wrapper? Register it under a different name."],"YKLP_-":["Template renamed"],"YPFBfr":[["detail"]," - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"YSFv5w":["No git repository — config sharing does not apply here."],"YTLmTM":["Remove the parent <0>.git</0> folder"],"YW7Q86":["Search settings not yet loaded — try again in a moment"],"Y_kL7X":["Customize how the editor looks and behaves."],"YaeyFh":["Pulls may overwrite uncommitted edits in your local files."],"Yea-K5":["Restore to this point"],"Yi0VMG":["Upload ",["keyName"]],"YjhKI5":["Cloning..."],"YlDuro":["Fit height"],"YoLi1r":["Claude (CLI)"],"YsEYYS":[["behind","plural",{"one":["#"," commit behind"],"other":["#"," commits behind"]}]],"YwPUUP":["This pack is already set up here."],"YyXtnN":["Underline"],"Z1LF1M":["Sharing a doc needs a GitHub repository. Create one for this project."],"Z2M5XM":["Reason: ",["reason"]," (",["osDetail"],")"],"Z3FXyt":["Loading..."],"Z5HWHd":["On"],"Z5h97D":["Hide files and folders from your knowledge base. Hidden items don’t appear in the file tree, search, or AI tools. <0>Learn more about patterns</0>."],"Z8KDox":["Enter a folder name (e.g. brain)."],"Z8lGw6":["Share"],"ZBYKxv":["Reverts every change this agent made to <0>",["docName"],"</0> this session (",["burstCount","plural",{"one":["#"," burst"],"other":["#"," bursts"]}],"). Other files and writers are unaffected."],"ZBt4rI":["Instruction for the AI"],"ZLQol-":["You can turn this on later in <0>Settings → Sync</0>."],"ZNK2Tq":["root"],"ZQLDTl":["created folder"],"ZU8VV_":["Remove failed: ",["error"]],"ZWgr0b":["In a subfolder"],"ZWolSV":["You picked the filesystem root (/). Scaffolding here will scan every file on this machine — make sure that's what you want."],"ZWxfrc":["cleared folder properties"],"ZWyHmq":["This project"],"ZhhOwV":["Quote"],"ZjtgI-":["Command palette"],"Zon_qG":["Mirror source <0>",["label"],"</0>"],"ZptNUh":["Show ",["hidden"]," more"],"ZsGpr_":["Paste link"],"Zue_jx":["Your GitHub token is missing required scopes. Try signing in again."],"Zul8Ry":["never"],"ZxXhLY":["Hide Files (",["sidebarShortcut"],")"],"Zz25kq":["Show Files (",["sidebarShortcut"],")"],"_7UQ7y":["Whole word"],"_8quCH":["From template"],"_902BE":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. You're currently on <1>",["currentLabel"],"</1>."],"_BthEY":["Open in ",["shareBranch"]],"_K2CvV":["Template"],"_PACVa":["Release notes"],"_PBJRl":["Add at least one letter or number."],"_QwkMu":["No matching paths"],"_RcqUM":["You picked your home directory. OpenKnowledge will index everything in your home tree — large and may surface personal files."],"_TDESN":["Network error - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"_TF8ep":["Failed to render PDF"],"_VRtd7":["Couldn't send the selection — please try again."],"_W-elG":["(inline)"],"_XWY2J":["Terminal disabled"],"_bth6g":["Claude Code is installed, but OpenKnowledge tools aren't connected to it yet."],"_eguJc":["Uploading"],"_gkGSK":["deleted template"],"_pY_Vq":["The repository was moved, renamed, or deleted."],"_qD6mn":["Pick the folder where you've cloned it."],"_rP3HI":[["minutes"],"m ago"],"_tekeB":["updated folder properties"],"a-cKXz":["Select all source"],"a3H_MR":["Open and focus the Ask AI composer for the current editor selection."],"a5Gha5":["Local changes blocked the merge"],"a5W0q0":["Are you sure you want to delete ",["folderName"],"/ and all files inside? This action cannot be undone."],"a9OzSn":["No pages found for \\"",["trimmedQuery"],"\\""],"aByJ8j":["How does sharing work?"],"aE2_XM":["One pattern per line — appended to <0>.okignore</0>."],"aENGMB":["Semantic search adds meaning-based ranking to the search tool so conceptually-related pages surface even without shared keywords."],"aM23Wr":["page-name"],"aOp3hw":["Couldn't move to Trash"],"aWlJai":["Starting sign-in flow"],"a_u4ck":["Loading tags"],"aaE55D":["Clear ",["keyName"]],"aalx4E":["Editing broken MDX source: ",["reason"]],"abiHje":["Delete selected items"],"adsMWO":["Resolving deltas"],"aiArms":["We couldn't clone this repository."],"ajz9F8":["Couldn't load conflict content for ",["filePath"],". Try reloading the page."],"aoa6xA":["network error (is \`ok ui\` running?)"],"az8lvo":["Off"],"b3Thhd":["Upload failed"],"b4AQFK":["Open activity panel for ",["tooltipName"],", editing ",["realCurrentDoc"]],"b4itZn":["Working"],"b5aNbi":["The ",["targetNoun"]," could not be opened — try navigating to it manually."],"bBE5tC":["Detected on this machine"],"bBcFK_":["Open emoji picker for ",["keyName"]],"bD8I7O":["Complete"],"bGa3Fk":["Uploading file"],"bH382I":["Edit this HTML — the preview updates live."],"bHboUQ":["Edit template"],"bS_boY":["Replace current match"],"bUUVED":["Asset"],"bWLmRK":["Could not fetch branch. Check your connection."],"bcDHUM":[["descriptorLabel"]," — render error, source editable below"],"bcjYUA":["Fold or unfold source"],"bkQRMh":["Paragraph"],"bmC18N":["Clearing local collaboration data for \\"",["docName"],"\\" before reconnecting."],"brCtGB":["History unavailable"],"bultyE":["When enabled, the agent opens or refreshes the preview after each edit. Disable if you manage your own preview window (OK Desktop, a browser tab on another display, etc.)."],"bwil08":["Building <0>openknowledge.skill</0> and opening the Claude Desktop App"],"c1LZZH":["Link copied."],"c5f7sm":["Code block language: ",["currentLabel"],". Click to change."],"c5rF4v":["What is this knowledge base for?"],"c863eW":["Could not switch to ",["shareBranch"],". Try switching manually."],"c8iK2Y":["No templates found."],"cEoyWz":["Add item to ",["keyName"]],"cF9DyA":["Reconnecting after server restart"],"cIptmH":["In the Claude Desktop App"],"cKjLuT":["(project + user)"],"cOSAfL":["No repositories found on your GitHub account."],"cOrTMo":["Your share link is ready below."],"cSCbv3":["BETA"],"cUK8lW":[["conflictCount","plural",{"one":["#"," conflict"],"other":["#"," conflicts"]}]],"cUk6TF":["Sync failed — check the server logs for details."],"cV7LOw":["Team Wiki"],"cZGNlb":["Add another pattern"],"cZI5AL":["OK Desktop"],"cZ_8zB":["Stays on this computer."],"cdm00A":["No Incoming"],"cdmk8A":["Uncommitted changes"],"cio8--":["Codex (CLI)"],"cklVjM":["Timeline"],"cn1sLi":["Couldn't connect OpenKnowledge tools to Claude Code. Please try again."],"cnGeoo":["Delete"],"cqQyPB":["Folder name"],"cs4mps":["Config sharing"],"csDS2L":["Available"],"ct2kv5":["No headings in ",["pageTarget"]],"cuA8QW":["Organize specs"],"d2uTPx":["Server error (HTTP ",["status"],")"],"d5rK4X":[["chars","plural",{"one":["char"],"other":["chars"]}]],"dD7NPy":["Outline"],"dDpCOp":["Rename succeeded but the sidebar may be out of date — refresh to resync"],"dEgA5A":["Cancel"],"dJw2_7":["Saved with the project for your team."],"dN20LW":["Semantic search is on, but no API key is set — search falls back to keyword matching. Add one in <0>Settings → Account</0> (it's stored once for your whole machine)."],"dNM58w":["Claude Code (claude) isn't installed or on your PATH."],"dOHMA0":["Failed to move"],"dOxPd4":["Footnote"],"dPOFid":["Show or hide terminal"],"dTaauv":["Reason: ",["reason"]],"dUQ7_J":["Add meaning-based ranking to search so conceptually-related pages surface even when they share no keywords. This setting applies only to this computer."],"dURmlQ":["\\"frontmatter\\" is a reserved property name"],"dbhUX1":["Hide this file"],"dbtjJh":["(opens in new tab)"],"djc1l9":["More than ",["0"]," requests were blocked by the preview's security policy"],"djjdjr":[["deleteCount","plural",{"one":["Delete"],"other":["Delete ","#"," items"]}]],"dprWmL":["Anchor in this page"],"dr1vFs":["Replace all matches"],"dvGKu2":["Shared auto-sync default"],"dw_dUJ":["Failed to duplicate path"],"e0NrBM":["Project"],"e1Rn_k":["Open containing folder"],"e1hptq":["Embed a video with native player controls."],"e4GHWP":["Pull"],"e8L17t":["A non-empty folder already exists at this path. Pick a different folder."],"e8zRrb":["Show Files"],"eBIT9h":["Paste failed.",["restoreSuffix"]],"eFJkVt":["Clone failed: ",["cloneError"]],"eG8Jsg":["Toggle source tab focus mode"],"eJitUk":["Upload from computer"],"eKThTQ":["Failed to reorder"],"eNQGRb":["Inline LaTeX math rendered with KaTeX."],"ePK91l":["Edit"],"eSu2Xn":["Writes a project-MCP config for each selected tool; Claude also gets <0>.claude/launch.json</0>."],"eTL5y9":["Show selection preview"],"eVPynQ":["Open <0><1>",["verificationUri"],"</1><2/></0> and enter this code:"],"emgiet":["Authoritative content; mirrored verbatim everywhere it's referenced."],"euc6Ns":["Duplicate"],"evs0iw":["Tags matching \\"",["tagListQuery"],"\\""],"f1XQyZ":["Move block"],"f65AOQ":["Start from"],"f8jU-L":[["0"],"/",["1"]," — ",["2"]],"fBHvBn":["There's no project folder for this window, so a terminal can't start here."],"fBaTkM":["Toggle the bottom terminal panel."],"fG0X0e":["Install ",["brand"]," →"],"fIgqfQ":["Reinstalling"],"fJgQHX":["Failed to create file"],"fNr-MX":["Disable semantic search"],"fVcm9t":[["0","plural",{"one":["#"," doc"],"other":["#"," docs"]}]],"fWi7pn":["Initialize starter pack"],"fYKgzG":["Failed to load recent projects."],"fYjgXu":["Unordered list of items."],"f_PkYv":["Restarting closes this project's server. Connected agents (Claude Code, Codex, Cursor) will see their OpenKnowledge MCP connection close unexpectedly — you may need to restart the agent, or toggle its OpenKnowledge MCP server off and on, to reconnect."],"fbdLmk":["Toggle bold formatting."],"fbsiBw":["Something went wrong starting the terminal."],"fcgvCA":["Claude"],"fiMNLl":["Sync settings not yet loaded — try again in a moment"],"fqSfXY":["Replace"],"fwhX-N":["Indent or outdent source"],"g3UF2V":["Accept"],"g4XBm0":["Small section heading."],"g58Kwy":["<",["descriptorLabel"],"> failed to render (likely a bad prop). Copy the source to see what went wrong, or delete the block."],"gBbxn_":["Checking sign-in status"],"gGVP4q":["Click <0>+</0> <1/> <2>Create skill</2> <3/> <4>Upload skill</4>."],"gITz7o":["Move the cursor or extend selection through CodeMirror's standard source-editor navigation keymap."],"gJR87V":["Could not create the project folder. Pick a different folder."],"gKi-a_":["New project"],"gQV-9w":["Branch switched but the ",["targetNoun"]," could not be opened — try navigating to it manually."],"gUlRQj":["Orphans"],"gYz2ep":["Expires in ",["timeLabel"]],"gbHcbI":["Failed to delete property"],"gcV0dI":["The folders and templates are in place; there's nothing left to scaffold."],"gfohmY":["Connect tools"],"ggm6JX":["This page doesn't exist yet. Open it to create the page in the editor and collapse the graph."],"ggs9f8":["Search files, folders, or commands"],"gijbne":["Failed to rename path"],"gljvbT":[["words","plural",{"one":["word"],"other":["words"]}]],"gmJ0An":["Failed to open folder."],"goO4Ll":["Editor status bar"],"gp3I7-":["Before syncing, set your identity for git commits:"],"gtEbeW":["Highlight"],"h06R3C":["No pages are missing outgoing graph links."],"h6EvY-":["This will replace the current document content with the version from <0>",["relative"]," (",["absoluteTime"],", ",["entrySha"],")</0> by <1>",["authorName"],"</1>. Your current content is already saved in the timeline — you can restore it anytime."],"h7FzJC":["Link-graph response did not match expected shape."],"hBMK4W":["Project templates"],"hDEaQu":["Connect OpenKnowledge to other tools you use."],"hDKtoF":[["diffHrs"],"h ago"],"hDoLrm":["Remove ",["projectName"]," from recent projects"],"hGmuTc":["Docs tagged #",["tagDocsName"]],"hHMv6l":["Delete block"],"hSBIG-":["A title, description, tags — anything that describes this folder."],"hSySVc":["Install handoff failed: ",["msg"]],"hXUWyd":["Value is required"],"hXbSxc":["Asset: ",["title"]],"hY8pka":["Select next occurrence"],"hYDc6B":["Name cannot be empty"],"hYgDIe":["Create"],"hZoBHK":["Empty starting content"],"haHgQj":["Copied relative path"],"he3ygx":["Copy"],"hjO0Mq":["Add tab"],"hnq8fP":["Remove ",["label"]," from context"],"hpDtUm":["External wiki link"],"hwFOFD":["Settings failed to load"],"hxBHxQ":["A line with a footnote<0><1>[1]</1></0> and a definition shown below."],"hxEUVJ":["Initialize ",["selectedPackName"]],"hyCxJY":["Open that worktree instead"],"hynz2K":["Download started"],"i1flq_":["Wiki link suggestions"],"i3f2kh":["No matching commands."],"i92eAT":["We'll create a repository and start syncing — no terminal needed."],"i9OyGp":["Undo or redo"],"i9toLO":["Agent configuration file"],"iDZtvM":["Failed to load templates: ",["message"]],"iEQQyu":["Agent"],"iEYxO4":["Show thumbnails"],"iGCs04":["No templates available"],"iH8pgl":["Back"],"iHAJDj":["Resolving default location"],"iKSP5j":["Word wrap"],"iKZkk1":["Property value"],"iMkWoF":["Turn on"],"iNFKkm":["No diff."],"iOHg1t":["Open embedded URL in new tab"],"iSQTsg":["Ordered list"],"iSnkwB":["Failed to open cloned project."],"iTlqm3":[["ahead","plural",{"one":["#"," commit ahead"],"other":["#"," commits ahead"]}]],"iTylMl":["Templates"],"iXTp5j":["Scope: "],"idD8Ev":["Saved"],"ig5vUe":["Failed to load file"],"iilQXA":["Folder duplicated"],"ijLc3m":["Bullet list"],"ipn17C":["The <0>type</0> every document created from this template gets (e.g. <1>research-note</1>). Keeps new docs Open Knowledge Format–conformant."],"iqIDv4":["Sync status unavailable"],"iqugog":["Initialize failed: ",["errorDetail"]],"irFGwu":["Template list"],"irrm_E":["Remove selection"],"isRobC":["New"],"iuTKci":["No edits yet."],"iycx_A":["Pushing"],"j9Vqvc":["inherited"],"jBVUXo":["Couldn't open the terminal — please try again."],"jEZ6Lf":["provisional"],"jEdF24":["Missing page: ",["linkTitle"],". Click to create."],"jGJy-9":["Downloads ",["shareOwner"],"/",["shareRepo"]," from GitHub."],"jKd3AP":["Could not enable the terminal: ",["0"]],"jPUPvG":["Couldn't resolve the conflict for ",["filePath"],"."],"jRHdCz":["Failed to load PDF"],"jSO1X5":["Inherited templates can't be renamed here — rename it in the folder that owns it."],"jSY41h":["\\"",["docName"],"\\" took too long. Check your connection."],"jTLWxh":["Embed an external page in an inline iframe (docs, demos, Figma, CodeSandbox)."],"jZ_E5M":["Fetch failed — check the server logs for details."],"j_Z6g7":["Shared default"],"jbSG8V":["Show Files (",["sidebarShortcutLabel"],")"],"jdGUeI":["Couldn't create template: ",["error"]],"jerqF0":["Loading branch state"],"jhtG3I":[" Your selection has been restored."],"jjtmV_":["First file name"],"jol95m":["Failed to open Project Navigator."],"jtg_8-":["Build a knowledge wiki about the different types of flightless birds. Start with an overview page, then add cross-linked pages for each major group (ratites like ostriches, emus, and kiwis; penguins; and flightless rails), the regions they live in, and a timeline of how flightlessness evolved."],"ju38ms":["This project has no git repository — sharing mode does not apply. Initialize a repo to enable the toggle."],"jwnpdM":["A template named <0>",["trimmedSlug"],"</0> already exists here. Saving creates a local copy that overrides it for this folder."],"kCNU4q":["Indexing your pages — ",["semanticIndexedCount"]," of ",["semanticTotalCount"]," ready. Results may be incomplete."],"kCqCyf":["Open CodeMirror's lint diagnostics panel."],"kFLlsI":["Insert a footnote reference + matching definition stub."],"kNqMMd":["Folder"],"kUn-CN":["Sync off"],"kV2YZv":["Don't see <0>Skills</0>? Enable <1>Settings <2/> Capabilities <3/> Code execution and file creation</1> first."],"kYL1lH":["Agent activity"],"k_pade":["Config sharing is now shared. Commit the OK files to share with your team."],"k_yIIc":["Will be created at: <0>",["targetPreview"],"</0>"],"kdzzOK":["Off — search ranks by keyword only. No content leaves this computer."],"keNFEd":["Set identity"],"kj9pAE":["Creating page"],"kknhfj":["No changes"],"kmKqZg":["Clusters"],"knjOzA":["Tag value"],"kolRU1":["Do you want to permanently delete instead?"],"ku0yLQ":["Pages are embedded the first time a search needs them."],"ky9Tuc":["Edit ",["0"]," source"],"l17ab4":["Could not write project files. Try a different location."],"l1aQKz":["Visual editor table"],"l1l8sj":[["0"],"d ago"],"l3mSlL":["Append-only timeline"],"l6OXqI":["No installed agents found"],"l8G3S9":["Auto-sync is off — you don't have permission to push to this repo"],"lAiyU_":["Only the current document uses <0>#",["tag"],"</0>."],"lGs_bQ":["Page <0>*</0>"],"lHwYMr":["Server error: ",["status"]," ",["statusText"]],"lIn9L9":["Disable sync"],"lPzyrU":["All hunks resolved"],"lVWEIL":["Indexed ",["embedded"]," of ",["total"]," pages."],"lWNpNB":["Add cursors or select matching occurrences through CodeMirror."],"lXKZGw":["Heading 1"],"lZAiSP":["Backlinks response did not match expected shape."],"l_FAT6":["Use letters, digits, <0>-</0> or <1>_</1> only."],"l_UFPv":["Properties"],"lb_UU4":["Sync now"],"lbkOif":["Undo or redo visual-editor changes through TipTap collaboration history."],"lhjq3G":["Reset ",["labelText"]," to default"],"lkYioO":["Show or hide document panel"],"ll2yNl":["Content directory"],"lond3p":["Shows above the code body. Round-trips as \`title=\\"...\\"\` in markdown."],"lrhetp":["+ ",["overflow"]," more"],"ls1N1w":["(missing)"],"lyWa43":["Project-level disconnected pages"],"lzmtKp":["Failed to load folder properties: ",["message"]],"lzwo7p":["Could not open GitHub sign-in. Please try again."],"m16xKo":["Add"],"m2T1Xj":["Tag #",["tagValue"],", ",["uses"]],"m4v3XT":["Undo last edit on ",["docName"]],"m6YGpY":["Active panel content for the selected tab shows here."],"mBltnd":["Path suggestions"],"mGaZwZ":["See the full install guide"],"mHVPm5":["Reconnect required"],"mNY1G6":["Undo all edits"],"mPy9lS":["Organize my existing specs into a linked index grouped by area, and flag any that have drifted out of sync with the current code."],"mSJ3Rn":["Computing scaffold plan"],"mU3j1b":["Remove item ",["0"]],"mWVJRX":["Collapsible section with a clickable summary."],"mYGY3B":["Date"],"mZ1r4i":["Create a document from ",["label"]],"maDWIB":["Mirror source <0>api-spec</0>"],"makN88":["No patterns yet. Type a folder or file name below to start hiding files."],"mdKFEy":["You cancelled loading \\"",["docName"],"\\"."],"mdzKSV":[["nodeCount","plural",{"one":["#"," node"],"other":["#"," nodes"]}]],"mf37rL":["Retrying"],"mg0YGL":["Source multi-cursor and multi-select"],"mk2poV":["e.g. server.ts"],"mmpzAq":["Wrap long lines in the markdown source editor."],"mo22UP":["Toggle inline code formatting."],"mqSwZH":["<0>Mirror anchor not found.</0> No <1>",["mirrorSourceTag"],"</1> exists in <2>",["src"],"</2>."],"msOK6I":["Repositories you've already cloned may keep syncing through git's own saved credentials, even after you disconnect."],"mwMF9u":["Open CodeMirror search in source editor mode."],"mxY24F":["Duplicate the focused file-tree item when focus is in the Files sidebar."],"n2lRue":["Commit or stash changes to switch:"],"n5n_vi":["Private repository"],"n6hXUm":["Auto-sync periodically fetches, pulls, and pushes commits to your remote git repository so your edits stay in sync across machines."],"n7aopT":["Editor mode"],"nCzR-G":["Copy code ",["userCode"]],"nDT8qt":["Initialized ",["0"]," but could not open it."],"nMSYz5":["This path is on an external volume (/Volumes/...). OpenKnowledge will lose track of files when the drive ejects."],"nNYV3Y":["and ",["remaining"]," more"],"nTwL53":["Open a doc to share its URL."],"nUNZL4":["Ask ",["0"]],"nWv1ja":["Manage hidden files in Settings → Ignore patterns."],"nYKerc":["(user-level only)"],"nYeBmY":[["hours"],"h ago"],"nbfdhU":["Integrations"],"ndeI89":["Use Cmd/Ctrl+C to copy the link below, or open OK in the desktop app."],"neRy3o":["Split list item"],"nft48x":["Stored at <0>.ok/templates/</0> in this project. Available in every folder (folder-scoped templates can override by filename)."],"nh3wwx":["Embeddings provider key"],"njBeMm":["Both"],"njU86j":["Property \\"",["trimmed"],"\\" already exists"],"noH1JX":["Couldn't reach collab server — ",["errorDetail"],". Try <0>ok status</0> or check <1>.ok/local/last-spawn-error.log</1>."],"nrGWJ7":["Git identity isn't set — commits use a default author. Set yours so teammates see your name."],"nskygk":["Choose agent"],"nxlOpL":["OpenKnowledge is using this GitHub account."],"ny6vNn":["OpenKnowledge is using a GitHub account provided by the gh CLI. There's no separate OpenKnowledge credential to disconnect."],"nzHlj8":["Close ",["0"]],"nzaV6Q":["Page thumbnails"],"o2yoFu":["Reveal in Finder, No workspace"],"o49mDZ":["Loading timeline history"],"o4dcAf":["Reveal in File Explorer, ",["hint"]],"o5gfs1":["This setting is per-machine and isn't shared with collaborators. It needs an API key set with <0>ok embeddings set-key</0>."],"o9CrsQ":["research-note"],"oAFVKX":["Failed to update the project sync default — ",["detail"]],"oBXkm2":["Delete code block"],"oCZkaG":["Copy path"],"oJl7eO":["Unknown component: ",["componentName"]," — source editable below"],"oKBnk5":["More requests were blocked."],"oQA-cA":["Full path"],"oS1YpJ":["Open the Project Navigator."],"oXKEsy":["Delete an adjacent wiki-link or tag chip."],"oYepHb":["The terminal is turned off for this project. Turn it back on to run commands here."],"of3tF-":["You picked ~/Documents. OpenKnowledge will index every markdown file under it. If you only want to manage a sub-folder, choose a smaller scope."],"ogAuyr":["Back to document view"],"oh55a-":["Cursor CLI"],"omXJcU":["Close others"],"optX0N":[["0"],"h ago"],"oqB2ez":["Previous match"],"ot5BRK":["Duplicate selected file or folder"],"otE4aj":["Show external URL nodes"],"ou1hFW":["Toggle an ordered list."],"outYNy":["Duplicate name \\"",["keyName"],"\\""],"ovIGrT":["Local collaboration data for \\"",["docName"],"\\" could not be cleared. Reload to retry."],"p0Iq25":["Insert link"],"p9sdCy":["New ignore pattern"],"pAgkuZ":["Reopening \\"",["docName"],"\\" with a fresh local collaboration cache."],"pEQFsW":["No matching projects."],"pFagOn":["Source editing"],"pHYP6v":["Open <0>Customize</0> in the sidebar <1/> <2>Skills</2>."],"pRc-Im":["Undone all edits on ",["docName"]],"pTPqMK":["Toggle a fenced code block."],"pWT04I":["Checking..."],"pWbsW6":["Loading docs"],"pZAs1T":["Failed to load outgoing links"],"pajIrl":["Could not turn off the terminal: ",["0"]],"pbwTg6":[["seconds"],"s ago"],"pckX1A":[["0","plural",{"one":["#"," use"],"other":["#"," uses"]}]],"pgq_xf":[["0"],"/",["1"]," ",["2"]],"phM8Kh":["Found the repo but could not open the project. Please try again."],"pha01Y":["Project-level pages with no incoming graph edges."],"pkAft1":["Search failed."],"pmKdif":["Failed: ",["loadError"]],"pmUArF":["Workspace"],"ppDgFi":["Restart with this app's version"],"pzutoc":["Italic"],"q2kXMG":["Inline Math"],"q4YJl_":["The terminal session ended (exit code ",["0"],")."],"q6-JVU":["Loading pages"],"qAQVSD":["Page headings response was not JSON"],"qAhFeg":[["userName"]," · ",["tabCount","plural",{"one":["#"," tab"],"other":["#"," tabs"]}]],"qEIFZu":["Key ending in ",["keyHint"]],"qEue6Q":[" or "],"qFWMl-":["View as text"],"qNOgUu":["Edits at the source land here — no copy-paste drift."],"qRZh7J":["Let Tab leave the source editor instead of indenting."],"qSKu2v":["Source navigation and selection"],"qSxaOz":["Accept their deletion"],"qUB_o_":["Auto-sync is off — your edits stay local until you commit and push manually."],"qXg5W9":["File saves to <0>~/Downloads/openknowledge.skill</0>."],"qXsafh":["Publish to GitHub"],"qZv5ZR":["Config sharing toggle failed"],"q_9EcE":["Enable git auto-sync?"],"q_z77Z":["Heading levels"],"qaHyRJ":[["linkCount","plural",{"one":["#"," link"],"other":["#"," links"]}]],"qbfj1f":["Receiving objects"],"qdBUHP":["Couldn't load ",["fileName"]],"qi1F96":["Reveal in File Explorer"],"qiRoLb":["Summarize everything I changed this week"],"qioCwA":["Jump to page ",["pageNumber"]],"qjHMHf":["Failed to disable sync — ",["detail"]],"qk8ZmO":["OpenCode CLI"],"qo4zCg":["Path cannot contain backslashes"],"qpQwGC":["Describe what you're working on and the agent sets it up for you."],"qvWGzP":["Collapse all"],"qyLmWw":["Source editor search panel"],"r2huLx":["Undo, redo, or undo selection changes through CodeMirror history."],"r4R7AZ":["Network error during cleanup"],"r51jLC":["File saved & Claude Desktop App opened"],"r871ed":["Your knowledge base is now on GitHub at <0>",["ownerLogin"],"/",["repoName"],"</0>."],"rBc32v":["Couldn't reach the embeddings provider — press ↵ to retry"],"rFw02Q":["Uploading ",["keyName"]],"rJVoVX":["Source find results"],"rNifQd":["Remove property"],"rQAQus":["Couldn't save template: ",["error"]],"rQRrkB":["yesterday"],"rSoi6g":[["displayName"]," (",["bin"],") isn't installed or on your PATH."],"rVgSRB":["Collapse ",["docName"]],"rVxu1k":["No pages link here yet."],"rXz97P":["Numbered list of items."],"rZ9HZq":["To do"],"rZVMkf":["Visual editor replace input focused"],"rageVb":["Custom HTML with a live preview pane (sandboxed iframe)."],"rdU729":["Layout"],"rfFpcF":["Remove ",["chip"]],"rgPqOw":["Convert the current block to a paragraph."],"riqekz":["Suggestion menu navigation"],"rlUzXK":["Could not validate folder. Please try again."],"roAe2K":["Link URL"],"roiUQQ":["This page doesn't link to anything yet."],"rppgXF":["Disconnecting"],"rssK8c":["Ignore patterns (raw text)"],"rtdR4v":["Show or hide Files"],"rwrPbS":["Component boundary navigation"],"s-MGs7":["Resources"],"s-XOaI":["File name"],"s061i4":["Relative path"],"s0IDhW":["This file could not be found."],"s0J_k9":[["0","plural",{"one":["#"," key"],"other":["#"," keys"]}]],"s1c0ja":["Bullet List"],"s3caR3":["Deleting"],"sE7R19":["Could not load templates: ",["templatesError"],". You can still create a blank note."],"sER-bs":["Files"],"sIGbBZ":["Convert selection to footnote"],"sIxSSP":["Resolve conflict in your terminal"],"sJK6pq":["Permission denied"],"sJWhgo":["Unknown component: ",["unregisteredComponentName"]],"sOxZaS":["Failed to load graph"],"sZ2IOu":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. It doesn't exist on your current branch (<1>",["currentLabel"],"</1>)."],"saIASg":["Second item"],"saYiIO":["Path cannot contain null bytes"],"seeS6l":["Setup OpenKnowledge in this folder?"],"shNd9t":["Slash command menu"],"skf5Ix":["Indent or outdent source editor lines."],"snrVQ7":["probe failed"],"ssuwjF":["Branch"],"stlgky":["On — your search queries and the text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"sxTdZI":["Loading paths…"],"sxkWRg":["Advanced"],"t-JXbf":["Notion-style inline row for a downloadable file. Drag-drop also works."],"t18QYR":["Unpin ",["accessibleLabel"]],"t2TkQ3":["Sync paused — resolve conflicts to resume."],"tAPZEx":["Below"],"tP5DDk":["Apply link"],"tUvUfp":["Use a folder you already have."],"tW_yvQ":["Expand ",["docName"]],"t_YqKh":["Remove"],"tfDRzk":["Save"],"tfi40B":["Failed to create page"],"tgWuMB":["Modified"],"tiWX6q":["Source editor"],"tjXez2":["blog-post"],"tsiTqO":["Paste your API key"],"u-9fWA":["See <0>Architecture</0> for the system overview."],"u3BOHd":[["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"u3YnKw":["Could not construct share URL."],"u3wRF-":["Published"],"u6Hp4N":["Markdown"],"u7H-Wn":["Show panel (",["panelShortcutLabel"],")"],"uCaIdy":["GitHub sign-in is missing or expired. Reconnect to resume syncing."],"uDlyqd":["Document the architecture of this repo: create an overview page that links to a page per major module describing its responsibilities and entry points."],"uF9ruK":["Saving"],"uH_S-u":[["loadErrorTitle"],": ",["message"]],"uKRYiW":["Sync status unavailable — server error."],"uL_Wx8":["The terminal stopped unexpectedly."],"uM6jnS":["Restore failed"],"uO9WLl":["Push"],"uQNW00":["Detached HEAD — checkout a branch to resume"],"uQewpR":["Couldn't restart the server — it's running under a different account. Restart your computer to clear it, then reopen this project."],"uWtdQR":["No templates yet. Add one in this folder's Templates section, or in Settings → Templates."],"uWx2ZP":["Last sync"],"u_lS4C":["Clone complete — opening project"],"ubMwcO":["The terminal session ended (signal ",["0"],")."],"ugoTXs":["folder"],"uhJEA2":[["count","plural",{"one":["#"," more participant"],"other":["#"," more participants"]}]],"uksqrP":["Repository not found. It may have been renamed, deleted, or moved."],"un8kBM":["Creating page: ",["linkTitle"],"."],"ur2XSb":["Visual editor"],"uuoHOU":["Command failed."],"uynXup":[["tokens","plural",{"one":["token"],"other":["tokens"]}]],"v-h2hx":["Delete ",["targetGitPath"]],"v2ZW0K":["Enable terminal"],"v41fCm":["File not found"],"v75Em9":[["uploadedCount","plural",{"one":["Uploaded one file"],"other":["Uploaded ",["uploadedCount"]," files"]}]],"v7lbnC":["Find next match"],"vDXqVv":["Insert a markdown hard break."],"vEJDlt":["The file is in your Trash; the file-watcher will reconcile."],"vGeNNQ":["Copy a prompt and paste it into your agent to set up your project."],"vIxrEk":["Fit width"],"vLyv1R":["Hide"],"vM7XUh":["Add OpenKnowledge to your AI tools"],"vPYaz3":["Scaffold directly under this project."],"vQIVHc":["Folder properties"],"vWc9a0":["Type to edit; <0>⌘ Enter</0> saves, <1>Esc</1> cancels."],"vZVeFG":["Upload failed — please try again"],"vbK_ZG":["Files sidebar"],"ve8vEM":["Code expired — please try again"],"vfRlCI":["Could not copy full path"],"vfWA_g":["You picked ~/Desktop. OpenKnowledge will index everything on your desktop."],"vhAnzJ":["Turn on semantic search?"],"viwC-K":["Failed to remove project."],"vv7kpg":["Cancelled"],"vvWZnu":["Diff unavailable"],"w3tVpc":["No links yet. Add wiki links or markdown links to build a graph."],"w3vFfL":["Hide Files"],"w4hMYl":["Could not read branch state for this project. Close this dialog and open the share link again."],"w7SsvI":["That folder isn't an OpenKnowledge project yet. Initialize it and open?"],"w7nm4K":["Indented blockquote for citations."],"wJijgU":["Location"],"wJo9oS":["Close find"],"wQp1V3":["Mirror of <0>",["src"],"</0>"],"wT4iQr":["Open visual-editor find with replace controls expanded."],"wTcjov":["No workspace"],"wXO4Tg":[["hrs"],"h ago"],"wbv9xO":["Create new project"],"wbwHYD":["Enable sync"],"weP6me":["Couldn't load docs — type @ again to retry"],"wlwXUk":["You picked ~/Downloads. Files there are usually transient — consider a stable folder instead."],"wndeIl":["Project-level pages with neither incoming nor outgoing graph edges."],"wtcxiD":["Share this setup with your team?"],"wvbc1r":["Couldn't open document"],"x2fr_j":["Graph"],"x3-2ta":[["packName"]," initialized (",["projectEntries","plural",{"one":["#"," entry"],"other":["#"," entries"]}],")"],"x57cJf":["Open link"],"xCJdfg":["Clear"],"xCdTnb":["Close new tab"],"xDBki3":["Heading suggestions"],"xFQRu4":["I already have it locally"],"xG4tb6":["Lost connection to \\"",["docName"],"\\"."],"xHGM4U":["Hide HTML preview"],"xK291b":["Two-page (odd)"],"xNyj3h":["Reinstall for Claude Chat & Cowork"],"xOTzt5":["just now"],"xSVO3J":["What gets created"],"xWEvuo":["Ask AI"],"xXo8FT":["Save failed: ",["error"]],"xYMPyY":["Paste was incomplete — ",["chunksCompleted"]," of ",["totalChunks"]," chunks landed.",["restoreSuffix"]],"xaDWAI":["Switch project"],"xbdtfY":["Markdown source"],"xc4g25":["Parse failed"],"xeXS4P":["Or use a starter pack"],"xeiujy":["Text"],"xhlFsx":["Inherited — set a value here to replace it."],"xiv-dW":["No files yet."],"xsZhu-":["Page number"],"xzktOa":["Edit wiki link"],"y1t8bQ":["Settings sections"],"y3aU20":["Save changes"],"y46m5r":["The desktop app isn't responding. Refresh and try again."],"y5FUYi":["Suggestion menu open"],"y8B54M":["Couldn't send your prompt — please try again."],"yCX4jp":[" Your selection could not be restored."],"yEJ-sl":["The preview blocks resources that don't meet its security rules (for example plain http:// URLs, or code that uses eval). The content above may render incompletely."],"yFyZMJ":["No pages matched \\"",["semanticQueryText"],"\\" by meaning."],"yH7T4q":[["failedCount","plural",{"one":["1 file failed to upload"],"other":[["failedCount"]," files failed to upload"]}]],"yHikCO":["Open CodeMirror's go-to-line prompt."],"yIPXut":["Preparing search"],"yKu_3Y":["Restore"],"yLq4w4":["Separator"],"yMgL_E":["Find field navigation"],"yQE2r9":["Loading"],"yQyglE":["No matching docs"],"yUxR-Q":["Expand ",["keyName"]],"yWWThY":["Asset reference"],"yYR6za":["Display text"],"yZmvQ4":["This project's server (v",["0"],") is newer than this app (v",["1"],")."],"y_5CE8":["Item ",["0"]],"yf5r22":[["keyName"]," type: ",["typeLabel"]," (inherited from folder properties; not editable here)"],"yjExfe":["Branch <0>",["shareBranch"],"</0> is checked out in:"],"ylXj1N":["Selected"],"ynIa4S":["Visual editor list item"],"ypw6My":["Showing top ",["0"]," headings — keep typing to narrow"],"ysxgu8":["project"],"yu8Pzy":["Not detected"],"yutJKi":["Checklist with checkboxes."],"yvG-l1":["Open source lint panel"],"yvHDYG":["Claude Desktop"],"yz7wBu":["Close"],"yzF66j":["Link"],"yzGPkm":["Expand graph"],"z0a2EA":["Diagram from Mermaid source — flowchart, sequence, class, state, ER, gantt, pie."],"z1uNN0":["No emoji found."],"z2JdQ-":["Config sharing unchanged — see details below."],"z5pqI8":["Cannot upload: no document is open"],"z60Lgn":["Saves the file to <0>~/Downloads/openknowledge.skill</0> and opens the Claude Desktop App. Requires Node.js or Bun on your PATH."],"zAsDLY":["Graph visualization of document links"],"zL0LPh":["Global outside text fields"],"zLGXna":["No starter packs available."],"zLak8b":["Activate new tab"],"zQBg2C":["Move the current block up or down one position."],"zUhPuR":["Open containing folder, ",["hint"]],"zXj1rA":["Search by meaning"],"zZ_I5K":["Open project menu"],"zaXlhf":["The properties block at the top of this doc has a formatting error. Switch to source mode to fix it."],"zbymaY":[["0"],"m ago"],"zgSFyG":["External link"],"zkz0Fg":["Set up syncing"],"zlErBl":["Page headings error response did not match RFC 9457"],"zo3Dl7":["Toggle thumbnails"],"zrP8HX":["Frontmatter every document created from this template starts with. Values are YAML — a list is <0>[a, b]</0>; <1>{",["date"],"}</1> fills in on create."],"ztKII6":["Failed to add item"],"zwBp5t":["Private"]}`)},Wp=`en`;Is.load(Wp,Up.messages),Is.activate(Wp);var Gp=Symbol.for(`ok.client.logForwarder`),Kp=2e3,qp=[`log`,`info`,`warn`,`error`],Jp={log:`info`,info:`info`,warn:`warn`,error:`error`};function Yp(e){if(typeof e==`string`)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function Xp(e){let t=e.message.length+80;if(e.event&&(t+=e.event.length),e.fields)try{t+=JSON.stringify(e.fields).length}catch{}return t}function Zp(e={}){let t=e.windowObj??(typeof window<`u`?window:void 0);if(!t||t.okDesktop)return;let n=t;if(n[Gp])return;n[Gp]=!0;let r=e.consoleObj??console,i=e.documentObj===void 0?typeof document<`u`?document:null:e.documentObj,a=e.flushIntervalMs??Kp,o=e.fetchImpl??n.fetch.bind(n),s=e.now??Date.now,c=[],l=0,u=null,d=!1,f={log:r.log.bind(r),info:r.info.bind(r),warn:r.warn.bind(r),error:r.error.bind(r)};function p(){if(u!==null&&(clearTimeout(u),u=null),c.length===0)return;let e=c.splice(0,100);l=0,d=!0;try{o(`/api/client-logs`,{method:`POST`,headers:{"content-type":`application/json`},keepalive:!0,body:JSON.stringify({entries:e})}).catch(()=>{})}catch{}finally{d=!1}}function m(e){if(c.push(e),l+=Xp(e),c.length>100){let e=c.shift();e&&(l-=Xp(e))}if(c.length>=100||l>=32768){p();return}u===null&&(u=setTimeout(p,a))}function h(e,t){if(!d)try{let n=Xr(t.map(Yp).join(` `)),r=t[0],i=typeof r==`string`&&r.length<=32768?r:void 0,a=i?di(i):null,o=a?.fields;if(o)try{JSON.stringify(o).length>8192&&(o=void 0)}catch{o=void 0}m({level:e,message:n,ts:s(),...a?.event?{event:a.event}:{},...o?{fields:o}:{}})}catch{}}for(let e of qp)r[e]=(...t)=>{f[e](...t),h(Jp[e],t)};let g=e=>{if(d)return;let t=e;h(`error`,[`uncaught error: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`])},_=e=>{d||h(`error`,[`unhandledrejection: ${Yp(e.reason)}`])},v=()=>p(),y=()=>{i&&i.visibilityState===`hidden`&&p()};n.addEventListener(`error`,g),n.addEventListener(`unhandledrejection`,_),n.addEventListener(`pagehide`,v),i&&i.addEventListener(`visibilitychange`,y);function b(){for(let e of qp)r[e]=f[e];n.removeEventListener(`error`,g),n.removeEventListener(`unhandledrejection`,_),n.removeEventListener(`pagehide`,v),i&&i.removeEventListener(`visibilitychange`,y),u!==null&&(clearTimeout(u),u=null),c.length=0,delete n[Gp]}return{flushNow:p,uninstall:b}}function Qp(e,t){return e.branch===void 0||e.branch===null||e.branch===``||t===``||e.multiCandidate!==!0?null:{message:`Opened on branch ${e.branch}`,description:t}}function $p(e){let t=e.bridge;if(!t)return;let n=e.setHash??(e=>{window.location.hash=e}),r=e.emitToast??((e,t)=>{Ls(e,t)});return t.onDeepLink(e=>{let i=e.kind??`doc`;if(e.targetMissing===!0){r(`This ${i===`folder`?`folder`:`file`} isn't in your local checkout${e.branch===void 0||e.branch===null||e.branch===``?``:` on branch ${e.branch}`} yet`,{description:`Pull the latest changes, then open the share link again.`,duration:5e3});return}n(ps(i,e.doc,i===`doc`?e.branch:void 0));let a=Qp(e,t.config.projectPath);a!==null&&r(a.message,{description:a.description,duration:3e3})})}var em=4e3,tm=1440*60*1e3;function nm(e){let t=e.bridge;if(t&&t.onboarding)return t.onboarding.onToast(e=>{if(e.kind===`ancestor-promote`){Ls.success(`Opened existing OpenKnowledge project at ${e.ancestorPath}`,{duration:em});return}if(e.kind===`startup-reclaim`){let t=[];if(e.mcp.status===`repaired`){let n=e.mcp.editors.map(e=>lr[e]??e).join(`, `);t.push(`repaired ${n} MCP integration`)}else e.mcp.status===`failed`&&t.push(`MCP auto-repair failed`);e.path.status===`installed`&&t.push(e.path.summary),e.path.status===`failed`&&t.push(`PATH install failed: ${e.path.summary}`);let n=t.length>0?t.join(`; `):`OpenKnowledge integrations checked.`,r=e.mcp.status===`failed`||e.path.status===`failed`,i=e.path.status!==`none`;Ls[r?`error`:`success`](n,{duration:r||i?tm:em});return}if(e.kind===`sharing-refused-tracked`){Ls.error(`Config sharing unchanged: ${e.tracked.length} OK file(s) tracked upstream — see message below.`,{duration:tm,description:e.remediation});return}if(e.kind===`sharing-no-git`){Ls.warning(`Local-only requested but no git repository was created. Switch later via Settings → Config sharing once the project is in a git repo.`,{duration:em});return}let t=_c(e.gitRoot,e.pickedPath)??e.pickedPath;Ls.success(`Initialized OpenKnowledge at ${e.gitRoot} — opened parent of ${t} because it contains a .git folder`,{duration:em})})}function rm(e){let t=(0,$.c)(18),{body:n,warning:r,restartLabel:i,cancelLabel:a,onRestart:o,onDismiss:s}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(as,{className:`mt-0.5 size-4 shrink-0 text-amber-500`}),t[0]=c):c=t[0];let l;t[1]===n?l=t[2]:(l=(0,Z.jsx)(`p`,{className:`font-medium text-sm`,children:n}),t[1]=n,t[2]=l);let u;t[3]===r?u=t[4]:(u=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r}),t[3]=r,t[4]=u);let d;t[5]!==o||t[6]!==i?(d=(0,Z.jsx)(Ai,{size:`sm`,onClick:o,children:i}),t[5]=o,t[6]=i,t[7]=d):d=t[7];let f;t[8]!==a||t[9]!==s?(f=(0,Z.jsx)(Ai,{size:`sm`,variant:`ghost`,onClick:s,children:a}),t[8]=a,t[9]=s,t[10]=f):f=t[10];let p;t[11]!==d||t[12]!==f?(p=(0,Z.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-2`,children:[d,f]}),t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;return t[14]!==l||t[15]!==u||t[16]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex w-full gap-3 rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg`,children:[c,(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[l,u,p]})]}),t[14]=l,t[15]=u,t[16]=p,t[17]=m):m=t[17],m}function im(){return Is._({id:`f_PkYv`})}function am(e){return e.serverRuntime===e.appRuntime?Is._({id:`FWQuPE`,values:{0:e.appRuntime}}):e.relation===`older`?Is._({id:`LhQlGR`,values:{0:e.serverRuntime,1:e.appRuntime}}):Is._({id:`yZmvQ4`,values:{0:e.serverRuntime,1:e.appRuntime}})}function om(e){return Is._({id:`2YOwme`,values:{appRuntime:e}})}function sm(e){return Is._({id:`5DFPDh`,values:{appRuntime:e}})}function cm(e){return e===`eperm`?Is._({id:`uQewpR`}):Is._({id:`PqYWiC`})}async function lm(e){let t=Ls.loading(Is._({id:`Kf7GG5`}),{duration:1/0}),n;try{n=await e.restartServer(e.config.projectPath)}catch{return}Ls.dismiss(t),n.ok===!1&&Ls.error(cm(n.reason),{duration:1/0})}function um(e){let t=e.bridge;if(!t)return;let n=t.onServerVersionDrift(e=>{Ls.custom(n=>(0,Q.createElement)(rm,{body:am(e),warning:im(),restartLabel:Is._({id:`ppDgFi`}),cancelLabel:Is._({id:`PBxg_E`}),onRestart:()=>{Ls.dismiss(n),lm(t)},onDismiss:()=>Ls.dismiss(n)}),{duration:1/0})}),r=t.onServerRestarted(e=>{Ls.success(om(e.appRuntime))}),i=t.onServerReclaimed(e=>{Ls.warning(sm(e.appRuntime),{duration:15e3})});return()=>{n(),r(),i()}}var dm=!1;function fm(e,t,n,r){let i=e[t];if(typeof i!=`function`){console.warn(`[cold-mount-instrumentation] target missing method "${t}"`);return}e[t]=function(...e){let t=performance.now(),a,o=!1;try{return a=i.apply(this,e),o=!0,a}finally{let e=performance.now()-t,i;if(o&&r)try{i=r(this,a,t,e)}catch(e){i={"instrumentation-error":e instanceof Error?e.message:String(e)}}try{lt(n,{durationMs:Math.round(e*1e3)/1e3,threw:!o,...i},{startTime:t,duration:e})}catch{}}}}function pm(e){return e?.doc?typeof e.doc.nodeSize==`number`?e.doc.nodeSize:e.doc.content&&typeof e.doc.content.size==`number`?e.doc.content.size:null:null}var mm=0,hm=0,gm=0,_m=0,vm=null,ym=[`linkResolutionDecoration$`],bm=new WeakSet,xm=new WeakSet;function Sm(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function Cm(){return!1}function wm(){return!Cm()}function Tm(e,t){if(wm())return t;let n=`ok/cold/nodeview-factory-${Sm(e)}`;return function(...r){let i=performance.now();try{return t(...r)}finally{let t=performance.now()-i;lt(n,{nodeType:e,durationMs:Math.round(t*1e3)/1e3},{startTime:i,duration:t})}}}function Em(e){if(wm())return;let t=e.state.plugins;for(let e of t){if(xm.has(e))continue;let t=e.spec?.key?.key;if(!t||!ym.some(e=>t.startsWith(e)))continue;let n=e.props,r=n.decorations;if(typeof r!=`function`){xm.add(e);continue}let i=`ok/cold/decoration-${Sm(t.replace(/\$\d*$/,``))}`;n.decorations=function(...e){let n=performance.now();try{return r.apply(this,e)}finally{let e=performance.now()-n;lt(i,{pluginKey:t,durationMs:Math.round(e*1e3)/1e3},{startTime:n,duration:e})}},xm.add(e)}}function Dm(e){if(wm())return;let t=e._props?.nodeViews;if(!(!t||typeof t!=`object`))for(let[e,n]of Object.entries(t)){if(typeof n!=`function`||n.__okWrapped===!0)continue;let r=Tm(e,n);r.__okWrapped=!0,t[e]=r}}function Om(e){return wm()?e:e.map(e=>{let t=e.name??`unknown`,n=Sm(t);return e.extend({onBeforeCreate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;lt(`ok/cold/ext-${n}-on-before-create`,{ext:t,hook:`onBeforeCreate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onCreate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;lt(`ok/cold/ext-${n}-on-create`,{ext:t,hook:`onCreate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onUpdate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;lt(`ok/cold/ext-${n}-on-update`,{ext:t,hook:`onUpdate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onDestroy(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;lt(`ok/cold/ext-${n}-on-destroy`,{ext:t,hook:`onDestroy`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}}})})}function km(){if(!dm){dm=!0,fm(Gr.prototype,`mount`,`ok/cold/editor-mount`,(e,t,n,r)=>{let i=e;return wm()||(vm=performance.now()),{elementDefault:i.options?.element?.nodeName??null,docSize:pm(i.editorState),durationMs:r}}),fm(Gr.prototype,`createView`,`ok/cold/editor-create-view`,e=>{let t=e;return!wm()&&!bm.has(e)&&t.view&&(Em(t.view),Dm(t.view),bm.add(e)),{docSize:pm(t.editorState)}}),fm(Gr.prototype,`createNodeViews`,`ok/cold/create-node-views`,(e,t,n,r)=>{_m+=1;let i=e;return!wm()&&i.view&&Dm(i.view),{docSize:pm(i.view),seq:_m,durationMs:r}}),fm(fr.prototype,`updateState`,`ok/cold/pm-update-state`,(e,t,n,r)=>(hm+=1,{seq:hm,docSize:pm(e.state),durationMs:r})),fm(fr.prototype,`setProps`,`ok/cold/pm-set-props`,(e,t,n,r)=>(gm+=1,{seq:gm,docSize:pm(e.state),durationMs:r})),fm(Lt.prototype,`_forceRerender`,`ok/cold/force-rerender`,(e,t,n,r)=>{mm+=1;let i=e,a=(()=>{try{return i.type?.toArray?i.type.toArray().length:null}catch{return null}})();return{seq:mm,topLevelYElements:a,durationMs:r}}),fm(me.prototype,`init`,`ok/cold/ec-init`,e=>({editorPresent:!!e.props?.editor}));try{typeof PerformanceObserver<`u`&&new PerformanceObserver(e=>{for(let t of e.getEntries()){let e=t.name;if((e===`first-paint`||e===`first-contentful-paint`)&&(lt(e===`first-paint`?`ok/cold/paint-fp`:`ok/cold/paint-fcp`,{entryType:t.entryType,startTime:Math.round(t.startTime*1e3)/1e3},{startTime:t.startTime,duration:0}),!wm()&&e===`first-paint`&&vm!==null)){let e=vm,n=Math.max(0,t.startTime-e);lt(`ok/cold/append-to-paint`,{paintEntryType:t.entryType,durationMs:Math.round(n*1e3)/1e3,paintAt:Math.round(t.startTime*1e3)/1e3},{startTime:e,duration:n}),vm=null}}}).observe({type:`paint`,buffered:!0})}catch{}globalThis.__okColdMountInstrumented=!0}}var Am=!1,jm=new Set,Mm=!1;function Nm(){for(let e of jm)e()}function Pm(e){Am!==e&&(Am=e,Nm())}function Fm(){return Am}function Im(e){return jm.add(e),()=>{jm.delete(e)}}function Lm(e){let t=[e.onUpdateRelaunching(()=>Pm(!0)),e.onUpdateRelaunchFailed(()=>Pm(!1))];return()=>{for(let e of t)e()}}function Rm(){if(Mm||typeof window>`u`)return;let e=window.okDesktop;e&&(Mm=!0,Lm(e))}function zm(){return(0,Q.useSyncExternalStore)(Im,Fm,Bm)}function Bm(){return!1}function Vm(e){let{initialDoc:t}=e;if(!t)return;let n=e.getHash();n!==``&&n!==`#`&&n!==`#/`||e.setHash(ls(t))}function Hm(){typeof window>`u`||!window.okDesktop||Vm({initialDoc:window.okDesktop.config.initialDoc,getHash:()=>window.location.hash,setHash:e=>{window.location.hash=e}})}var Um=`Relaunch`,Wm=`Release notes`,Gm=`Updates paused`,Km=`Download`,qm=`Reset to defaults`,Jm=`Relaunching to install the update…`,Ym=`Relaunch failed — please restart manually`;function Xm(e){return`Update to ${e} didn't install.`}var Zm=`Retry`,Qm=`Download manually`,$m=`Recovery action failed — please try again`;function eh(e,t){let n=t instanceof Error&&t.message?t.message:``;return n?`${e}: ${n}`:e}function th(e){return`Version ${e} ready to install`}function nh(e){return`Updated to Version ${e}`}function rh(e){return`Your settings and recent projects were saved by a newer build than this one (v${e}). Reset to defaults to continue.`}var ih=0,ah=0,oh=1,sh=2,ch=3,lh=6e4;function uh(e,t,n=()=>{},r=lh){let i=[],a=new Set,o=`update-downloaded`;return i.push(e.onUpdateDownloaded(({version:r})=>{let i=o,a=()=>{t({id:i,body:th(r),priority:sh,action:{label:Um,onClick:()=>{t({id:i,body:Jm,priority:sh,dismissible:!1}),e.update.relaunchNow().then(()=>{n(i)},e=>{a(),t({id:`relaunch-error-${r}`,body:eh(Ym,e),variant:`error`,priority:oh})})}}})};a()})),i.push(e.onUpdateRelaunching(()=>{t({id:o,body:Jm,priority:sh,dismissible:!1})})),i.push(e.onUpdateRelaunchFailed(({version:r,message:i,downloadUrl:a})=>{if(a){let i=`install-failed-${r}`,o=()=>{t({id:i,body:Xm(r),variant:`error`,priority:oh,action:{label:Zm,onClick:()=>{e.update.relaunchNow().then(()=>{n(i)},e=>{console.warn(`[update-notice] install-failed retry rejected`,e),o()})}},secondaryAction:{label:Qm,onClick:()=>{e.shell.openExternal(a)}}})};o();return}t({id:`relaunch-error-${r}`,body:i?`${Ym}: ${i}`:Ym,variant:`error`,priority:oh})})),i.push(e.onWhatsNew(({version:i,releaseUrl:o})=>{let s=`whats-new-${i}`;t({id:s,body:nh(i),variant:`success`,priority:ch,action:{label:Wm,onClick:()=>{e.shell.openExternal(o)}},onDismiss:()=>{e.update.dismissWhatsNew(i)}});let c=setTimeout(()=>{a.delete(c),n(s),e.update.dismissWhatsNew(i)},r);a.add(c)})),i.push(e.onWhatsNewDismissed(({version:e})=>{n(`whats-new-${e}`)})),i.push(e.onUpdateStuckHint(({downloadUrl:n})=>{t({id:`update-stuck-hint`,body:Gm,priority:ah,action:{label:Km,onClick:()=>{e.shell.openExternal(n)}}})})),()=>{for(let e of i)e();for(let e of a)clearTimeout(e);a.clear()}}function dh(e,t,n,r=()=>{}){let i=`schema-incompatibility-${t.persistedSchemaVersion}`,a=`schema-incompatibility-error-${t.persistedSchemaVersion}`,o=e=>{r(i),n({id:a,body:eh($m,e),variant:`error`,priority:ih})};n({id:i,body:rh(t.currentBuild),priority:ih,action:{label:qm,onClick:()=>{e.state.resetIncompatible().then(()=>{r(i)},o)}}})}var fh=[],ph=new Set,mh=!1;function hh(){for(let e of ph)e()}function gh(e){let t=fh.findIndex(t=>t.id===e.id);if(t===-1)fh=[...fh,e];else{let n=fh.slice();n[t]=e,fh=n}hh()}function _h(e){let t=fh.filter(t=>t.id!==e);t.length!==fh.length&&(fh=t,hh())}function vh(){return fh}function yh(e){return ph.add(e),()=>{ph.delete(e)}}function bh(){if(mh||typeof window>`u`)return;let e=window.okDesktop;e&&(mh=!0,uh(e,gh,_h),e.state.query().then(t=>{t.schemaIncompatibility&&dh(e,t.schemaIncompatibility,gh,_h)},e=>{console.warn(`[update-notices-store] bridge.state.query() failed`,e)}))}var xh=`ok-omnibar-recents-v1`,Sh=10;function Ch(e){return typeof e==`object`&&!!e&&(e.kind===`file`||e.kind===`folder`)&&typeof e.path==`string`&&typeof e.lastOpenedAt==`string`}function wh(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Th(e,t){return`${e}:${t}`}function Eh(e){let t=wh(e);if(!t)return[];try{let e=t.getItem(xh);if(!e)return[];let n=JSON.parse(e);return Array.isArray(n)?n.filter(Ch).slice(0,Sh):[]}catch{return[]}}function Dh(e,t){let n=wh(t);if(n)try{n.setItem(xh,JSON.stringify(e.slice(0,Sh)))}catch(e){console.warn(`[omnibar] Failed to save recent entries:`,e)}}function Oh(e,t){return[t,...e.filter(e=>e.kind!==t.kind||e.path!==t.path)].slice(0,Sh)}function kh(e,t){return e.filter(e=>t.has(Th(e.kind,e.path)))}function Ah(e){let t=e.lastIndexOf(`.`);if(t<=e.lastIndexOf(`/`)+1)return{};let n=e.slice(t+1).toLowerCase();return n===``?{}:{assetExt:n,mediaKind:nr(n)}}var jh=50,Mh=50,Nh=``,Ph=null;function Fh(e){return e.trim().toLowerCase()}function Ih(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Lh(e){let t=e.trim();return t?[...new Set(t.split(/\s+/).filter(Boolean))].sort((e,t)=>t.length-e.length):[]}function Rh(e,t,n=new Map,r=new Map,i=new Set){let a=[],o=new Set;for(let t of e){o.add(t);let e=r.get(t)?.modified,i=n.get(t);a.push({kind:`file`,path:t,name:hi(t),...i?{title:i}:{},...e?{modifiedTs:Date.parse(e)}:{}})}for(let e of i)o.has(e)||(o.add(e),a.push({kind:`file`,path:e,name:hi(e),bodyIndexed:!1,...Ah(e)}));for(let e of t)a.push({kind:`folder`,path:e,name:hi(e)});return a.sort((e,t)=>{let n=e.path.localeCompare(t.path);return n===0?e.kind===t.kind?0:e.kind===`folder`?-1:1:n}),a}function zh(e){return si({kind:e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`,path:e.path,title:e.title??e.name,modifiedTs:e.modifiedTs??0})}function Bh(e){return{entries:e,byId:new Map(e.map(e=>[`${e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`}:${e.path}`,e])),corpus:ti(e.map(zh))}}function Vh(e){return e.map(e=>`${e.kind}\u0000${e.path}\u0000${e.title??``}\u0000${e.modifiedTs??0} ${e.bodyIndexed===!1?`0`:`1`}`).join(``)}function Hh(e){let t=Vh(e);return Ph&&Nh===t?Ph:(Nh=t,Ph=Bh(e),Ph)}function Uh(e,t,n=jh){return Wh(Hh(e),t,n)}function Wh(e,t,n=jh){let r=Fh(t);return r?Jr(e.corpus,r,{intent:`omnibar`,limit:n,scopes:[`page`,`folder`,`file`]}).map(t=>e.byId.get(t.document.id)).filter(e=>e!==void 0):e.entries.slice(0,20)}function Gh(e,t){let n=Lh(t);if(n.length===0||e.length===0)return[{text:e,match:!1,start:0}];let r=RegExp(`(${n.map(Ih).join(`|`)})`,`gi`),i=[],a=0;for(let t of e.matchAll(r)){let n=t.index??0;n>a&&i.push({text:e.slice(a,n),match:!1,start:a}),i.push({text:t[0],match:!0,start:n}),a=n+t[0].length}return a<e.length&&i.push({text:e.slice(a),match:!1,start:a}),i.length>0?i:[{text:e,match:!1,start:0}]}function Kh(e){if(e.kind!==`page`&&e.kind!==`folder`&&e.kind!==`file`||typeof e.path!=`string`)return null;let t=hi(e.path),n=e.kind===`folder`?`folder`:`file`,r=e.kind===`file`?Ah(e.path):{};return{kind:n,path:e.path,name:t,...e.title&&{title:e.title},...e.snippet&&{snippet:e.snippet},...typeof e.score==`number`&&{score:e.score},...r}}async function qh(e,t={}){let n=e.trim();if(!n)return{entries:[],truncated:!1,ready:!0};let r=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({query:n,intent:`full_text`,ranking:t.semantic?`relevance`:`navigation`,scopes:[`page`,`folder`,`content`,`file`],limit:t.limit??Mh,source:`omnibar`,...t.semantic?{semantic:!0}:{}}),signal:t.signal});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(hs(e)??`Search failed with status ${r.status}`)}let i=await r.json();return{entries:(i.results??[]).map(Kh).filter(e=>!!e),truncated:i.truncated===!0,ready:i.ready!==!1}}function Jh(e,t,n=[]){let r=Fh(t);return r?Fh([e,...n].join(` `)).includes(r):!0}function Yh(e,t,n={}){if(e.trim()===``)return`idle`;if(t.length===0)return`empty`;if(n.truncated)return`truncated`;for(let e of t)if(`snippet`in e&&typeof e.snippet==`string`&&e.snippet.length>0)return`content`;return`name-only`}function Xh(e){let{query:t,firedQuery:n,status:r,resultCount:i}=e,a=i>0,o=t!==``&&t!==n,s=a&&(r===`loading`||t!==n),c=null;r===`error`&&t!==``?c={kind:`retry`,query:t}:o&&r!==`loading`&&(c={kind:`search`,query:t});let l=null;return r===`loading`?l=`searching`:t===``&&!a?l=`empty`:r===`success`&&!o&&!a&&(l=`no-results`),{submit:c,results:{show:a,dimmed:s,forQuery:a?n:null},notice:l}}var Zh=`tag:`;function Qh(e,t){if(!e.toLowerCase().startsWith(`tag:`))return{kind:`normal`,query:e};let n=e.slice(4).replace(/^\s+/,``).trim();return n&&t.has(n)?{kind:`tag-docs`,tagName:n}:{kind:`tag-list`,query:n}}function $h(e,t){return bt(e,t)}var eg=Vt;async function tg(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`/api/tags/${e} responded with ${t.status}`);let n=await t.json();return Array.isArray(n.docs)?n.docs:[]}var ng=`open-knowledge:doc-panel-tab`,rg=null;function ig(){let e=rg;return rg=null,e}function ag(e,t=typeof window>`u`?new EventTarget:window){rg=e,t.dispatchEvent(new CustomEvent(ng,{detail:{tab:e}}))}function og(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(ng,n),()=>t.removeEventListener(ng,n)}var sg=[`.md`,`.mdx`];function cg(e){let t=e.toLowerCase();for(let e of sg)if(t.endsWith(e))return e;return null}var lg={local:0,inherited:1};function ug(e){return[...e].sort((e,t)=>{let n=lg[e.scope]-lg[t.scope];if(n!==0)return n;let r=(e.title??e.name).toLowerCase(),i=(t.title??t.name).toLowerCase();return r.localeCompare(i)})}var dg=`__blank__`;function fg(e){return e.trim()?e.includes(`..`)?`dotdot`:e.startsWith(`/`)?`leading-slash`:e.includes(`\\`)?`backslash`:e.includes(`\0`)?`null-byte`:null:`empty`}function pg(e){switch(e){case`empty`:return{id:`hYDc6B`};case`dotdot`:return{id:`Wyxs0x`};case`leading-slash`:return{id:`OYnx7O`};case`backslash`:return{id:`qo4zCg`};case`null-byte`:return{id:`saYiIO`}}}function mg(e){let t=e.fileName.trim(),n=cg(t)?t:`${t}${e.fileExtension??`.md`}`;if(e.kind===`folder`){let t=(e.folderName??``).trim();return`${e.initialDir?`${e.initialDir}/${t}`:t}/${n}`}return e.initialDir?`${e.initialDir}/${n}`:n}function hg(e,t){return xc(e.target)?!1:Cc(e,`new-item`,t)}function gg(e){let t=e.value.lastIndexOf(`.`);t>0?e.setSelectionRange(0,t):e.select()}function _g(e){let t=(0,$.c)(136),{open:n,onOpenChange:r,kind:a,initialDir:o,suggestedName:c,initialTemplate:l,defaultToTemplate:u,description:d,onCreated:f,folderConfig:p}=e,{_:m}=i(),{addPage:h}=Ts(),g=ao(p?null:o),_=p??g,[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(``),[S,C]=(0,Q.useState)(dg),[w,T]=(0,Q.useState)(!1),[E,D]=(0,Q.useState)(null),[O,k]=(0,Q.useState)(!1),[A,M]=(0,Q.useState)(null),N=(0,Q.useId)(),P=(0,Q.useId)(),F=(0,Q.useId)(),I=(0,Q.useId)(),L=(0,Q.useId)(),[R,z]=(0,Q.useState)(!1),B=(0,Q.useRef)(null),V=(0,Q.useRef)(null),H,U;t[0]!==l||t[1]!==a||t[2]!==n||t[3]!==c?(H=()=>{n&&(D(null),M(null),k(!1),x(``),C(a===`file`&&l?l:dg),T(!1),z(!1),y(a===`file`?c??`untitled`:`index`))},U=[n,a,c,l],t[0]=l,t[1]=a,t[2]=n,t[3]=c,t[4]=H,t[5]=U):(H=t[4],U=t[5]),(0,Q.useEffect)(H,U);let W;t[6]!==_.state.data||t[7]!==_.state.status?(W=_.state.status===`ready`?ug(_.state.data.folder.templates_available??[]):[],t[6]=_.state.data,t[7]=_.state.status,t[8]=W):W=t[8];let G=W,K;t[9]!==_.state.data||t[10]!==_.state.status||t[11]!==n||t[12]!==S?(K=()=>{n&&S!==dg&&_.state.status===`ready`&&((_.state.data.folder.templates_available??[]).some(e=>e.name===S)||C(dg))},t[9]=_.state.data,t[10]=_.state.status,t[11]=n,t[12]=S,t[13]=K):K=t[13];let q;t[14]!==_.state||t[15]!==n||t[16]!==S?(q=[n,S,_.state],t[14]=_.state,t[15]=n,t[16]=S,t[17]=q):q=t[17],(0,Q.useEffect)(K,q);let J;t[18]!==u||t[19]!==_.state.data||t[20]!==_.state.status||t[21]!==l||t[22]!==n||t[23]!==w?(J=()=>{if(!n||!u||l||w||_.state.status!==`ready`)return;let e=ug(_.state.data.folder.templates_available??[]);e.length>0&&C(e[0].name)},t[18]=u,t[19]=_.state.data,t[20]=_.state.status,t[21]=l,t[22]=n,t[23]=w,t[24]=J):J=t[24];let ee;t[25]!==u||t[26]!==_.state||t[27]!==l||t[28]!==n||t[29]!==w?(ee=[n,u,l,w,_.state],t[25]=u,t[26]=_.state,t[27]=l,t[28]=n,t[29]=w,t[30]=ee):ee=t[30],(0,Q.useEffect)(J,ee);let Y=a===`file`,te=_.state.status===`loading`||_.state.status===`idle`,X=_.state.status===`error`?_.state.message:null,ne;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ne=function(e){y(e),D(null)},t[31]=ne):ne=t[31];let re=ne,ie;t[32]!==v||t[33]!==b||t[34]!==o||t[35]!==a?(ie=function(){return mg({kind:a,initialDir:o,fileName:v,folderName:b})},t[32]=v,t[33]=b,t[34]=o,t[35]=a,t[36]=ie):ie=t[36];let ae=ie,oe;t[37]!==m||t[38]!==v||t[39]!==b||t[40]!==a?(oe=function(){if(a===`folder`){let e=fg(b.trim());if(e)return{message:m({id:`ODGGlj`,values:{detail:m(pg(e))}}),field:`folder`}}let e=fg(v.trim());return e?{message:m(pg(e)),field:`file`}:null},t[37]=m,t[38]=v,t[39]=b,t[40]=a,t[41]=oe):oe=t[41];let se=oe,ce;t[42]!==O||t[43]!==v||t[44]!==b||t[45]!==a?(ce=O||!v.trim()||a===`folder`&&!b.trim(),t[42]=O,t[43]=v,t[44]=b,t[45]=a,t[46]=ce):ce=t[46];let le=ce,ue;t[47]!==m||t[48]!==h||t[49]!==ae||t[50]!==se||t[51]!==a||t[52]!==f||t[53]!==r||t[54]!==S?(ue=async function(){let e=se();if(e){D(e.message),M(e.field);return}k(!0),D(null),M(null);let t=ae(),n=a===`file`&&S!==dg?S:void 0,i={path:t};n!==void 0&&(i.template=n);try{let e=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)}),t=e.status,n=await j(e,m({id:`d2uTPx`,values:{status:t}}));if(!n.ok){k(!1),D(n.title),M(`form`);return}let o=gi.safeParse(n.body);if(k(!1),!o.success){D(m(a===`folder`?{id:`K1ckLX`}:{id:`fJgQHX`})),M(`form`);return}let s=o.data.docName;r(!1),window.location.hash=`#/${s}`,h(s),ks([`files`,`backlinks`,`graph`]),f?.(s)}catch(e){console.warn(`[NewItemDialog] create failed:`,e),k(!1),D(m({id:`HIb0vl`})),M(`form`)}},t[47]=m,t[48]=h,t[49]=ae,t[50]=se,t[51]=a,t[52]=f,t[53]=r,t[54]=S,t[55]=ue):ue=t[55];let de=ue,fe;t[56]!==m||t[57]!==o?(fe=o||m({id:`L6Hhh6`}),t[56]=m,t[57]=o,t[58]=fe):fe=t[58];let pe=fe,me;t[59]===a?me=t[60]:(me=(0,Z.jsx)(Go,{children:a===`file`?(0,Z.jsx)(s,{id:`HdkSiO`}):(0,Z.jsx)(s,{id:`96G6Re`})}),t[59]=a,t[60]=me);let he;t[61]!==d||t[62]!==pe?(he=d??(0,Z.jsx)(s,{id:`NvOvTi`,values:{dirDisplay:pe},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground`})}}),t[61]=d,t[62]=pe,t[63]=he):he=t[63];let ge;t[64]===he?ge=t[65]:(ge=(0,Z.jsx)(Wo,{children:he}),t[64]=he,t[65]=ge);let _e;t[66]!==me||t[67]!==ge?(_e=(0,Z.jsxs)(Yo,{children:[me,ge]}),t[66]=me,t[67]=ge,t[68]=_e):_e=t[68];let ve;t[69]!==S||t[70]!==Y||t[71]!==I||t[72]!==R||t[73]!==L||t[74]!==G||t[75]!==X||t[76]!==te?(ve=Y&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`span`,{id:I,className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`f65AOQ`})}),X?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,children:(0,Z.jsx)(s,{id:`sE7R19`,values:{templatesError:X}})}):null,(0,Z.jsx)(yg,{triggerId:L,labelledById:I,open:R,onOpenChange:z,value:S,onValueChange:e=>{C(e),T(!0)},templates:G,loading:te}),!te&&!X&&G.length===0?(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`uWtdQR`})}):null]}),t[69]=S,t[70]=Y,t[71]=I,t[72]=R,t[73]=L,t[74]=G,t[75]=X,t[76]=te,t[77]=ve):ve=t[77];let ye;t[78]!==m||t[79]!==E||t[80]!==A||t[81]!==N||t[82]!==P||t[83]!==b||t[84]!==a?(ye=a===`folder`&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:P,children:(0,Z.jsx)(s,{id:`cqQyPB`})}),(0,Z.jsx)($o,{ref:V,id:P,value:b,onChange:e=>{x(e.target.value),D(null)},placeholder:`folder-name`,autoFocus:!0,"aria-describedby":E&&(A===`folder`||A===`form`)?N:void 0,"aria-invalid":E&&(A===`folder`||A===`form`)?!0:void 0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=fg(b.trim());if(t){D(m({id:`ODGGlj`,values:{detail:m(pg(t))}})),M(`folder`);return}B.current?.focus()}}})]}),t[78]=m,t[79]=E,t[80]=A,t[81]=N,t[82]=P,t[83]=b,t[84]=a,t[85]=ye):ye=t[85];let be;t[86]===a?be=t[87]:(be=a===`folder`?(0,Z.jsx)(s,{id:`jjtmV_`}):(0,Z.jsx)(s,{id:`s-XOaI`}),t[86]=a,t[87]=be);let xe;t[88]!==F||t[89]!==be?(xe=(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:F,children:be}),t[88]=F,t[89]=be,t[90]=xe):xe=t[90];let Se;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(Se=e=>re(e.target.value),t[91]=Se):Se=t[91];let Ce=a===`file`,we=E&&(A===`file`||A===`form`)?N:void 0,Te=E&&(A===`file`||A===`form`)?!0:void 0,Ee;t[92]!==de||t[93]!==le?(Ee=e=>{e.key===`Enter`&&!le&&de()},t[92]=de,t[93]=le,t[94]=Ee):Ee=t[94];let De;t[95]!==F||t[96]!==v||t[97]!==Ce||t[98]!==we||t[99]!==Te||t[100]!==Ee?(De=(0,Z.jsx)($o,{ref:B,id:F,value:v,onChange:Se,placeholder:`my-note`,autoFocus:Ce,"aria-describedby":we,"aria-invalid":Te,onFocus:vg,onKeyDown:Ee}),t[95]=F,t[96]=v,t[97]=Ce,t[98]=we,t[99]=Te,t[100]=Ee,t[101]=De):De=t[101];let Oe;t[102]!==E||t[103]!==N?(Oe=E&&(0,Z.jsx)(`p`,{id:N,role:`alert`,className:`text-1sm text-destructive`,children:E}),t[102]=E,t[103]=N,t[104]=Oe):Oe=t[104];let ke;t[105]!==xe||t[106]!==De||t[107]!==Oe?(ke=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[xe,De,Oe]}),t[105]=xe,t[106]=De,t[107]=Oe,t[108]=ke):ke=t[108];let Ae;t[109]!==ve||t[110]!==ye||t[111]!==ke?(Ae=(0,Z.jsxs)(qo,{className:`space-y-6 pb-1`,children:[ve,ye,ke]}),t[109]=ve,t[110]=ye,t[111]=ke,t[112]=Ae):Ae=t[112];let je;t[113]===r?je=t[114]:(je=()=>r(!1),t[113]=r,t[114]=je);let Me;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,Z.jsx)(s,{id:`dEgA5A`}),t[115]=Me):Me=t[115];let Ne;t[116]!==O||t[117]!==je?(Ne=(0,Z.jsx)(Ai,{variant:`outline`,className:`font-mono uppercase`,onClick:je,disabled:O,children:Me}),t[116]=O,t[117]=je,t[118]=Ne):Ne=t[118];let Pe;t[119]===O?Pe=t[120]:(Pe=O?(0,Z.jsx)(s,{id:`E9bKSA`}):(0,Z.jsx)(s,{id:`hYgDIe`}),t[119]=O,t[120]=Pe);let Fe;t[121]!==de||t[122]!==le||t[123]!==Pe?(Fe=(0,Z.jsx)(Ai,{onClick:de,disabled:le,children:Pe}),t[121]=de,t[122]=le,t[123]=Pe,t[124]=Fe):Fe=t[124];let Ie;t[125]!==Ne||t[126]!==Fe?(Ie=(0,Z.jsxs)(Jo,{children:[Ne,Fe]}),t[125]=Ne,t[126]=Fe,t[127]=Ie):Ie=t[127];let Le;t[128]!==_e||t[129]!==Ae||t[130]!==Ie?(Le=(0,Z.jsxs)(Ko,{className:`sm:max-w-md`,"data-ok-layer-spawned":``,children:[_e,Ae,Ie]}),t[128]=_e,t[129]=Ae,t[130]=Ie,t[131]=Le):Le=t[131];let Re;return t[132]!==r||t[133]!==n||t[134]!==Le?(Re=(0,Z.jsx)(Xo,{open:n,onOpenChange:r,children:Le}),t[132]=r,t[133]=n,t[134]=Le,t[135]=Re):Re=t[135],Re}function vg(e){return gg(e.currentTarget)}function yg(e){let t=(0,$.c)(66),{triggerId:n,labelledById:r,open:a,onOpenChange:o,value:c,onValueChange:l,templates:d,loading:f}=e,{_:p}=i(),m=(0,Q.useId)(),h;if(t[0]!==d||t[1]!==c){let e;t[3]===c?e=t[4]:(e=e=>e.name===c,t[3]=c,t[4]=e),h=d.find(e),t[0]=d,t[1]=c,t[2]=h}else h=t[2];let g=h,_=c===dg,v=a?m:void 0,y=`${r} ${n}`,b;t[5]!==_||t[6]!==f||t[7]!==g?.name||t[8]!==g?.title||t[9]!==c?(b=f?(0,Z.jsx)(s,{id:`Hl89Qd`}):_?(0,Z.jsx)(s,{id:`E7BhZn`}):g?.title??g?.name??c,t[5]=_,t[6]=f,t[7]=g?.name,t[8]=g?.title,t[9]=c,t[10]=b):b=t[10];let x;t[11]===b?x=t[12]:(x=(0,Z.jsx)(`span`,{className:`truncate`,children:b}),t[11]=b,t[12]=x);let S;t[13]!==_||t[14]!==f||t[15]!==g?(S=!f&&!_&&g?(0,Z.jsx)(Cg,{entry:g}):null,t[13]=_,t[14]=f,t[15]=g,t[16]=S):S=t[16];let C;t[17]!==x||t[18]!==S?(C=(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[x,S]}),t[17]=x,t[18]=S,t[19]=C):C=t[19];let w;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(zl,{className:`ml-2 size-4 shrink-0 opacity-50`,"aria-hidden":`true`}),t[20]=w):w=t[20];let T;t[21]!==f||t[22]!==a||t[23]!==v||t[24]!==y||t[25]!==C||t[26]!==n?(T=(0,Z.jsx)(H,{asChild:!0,children:(0,Z.jsxs)(Ai,{id:n,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":a,"aria-haspopup":`listbox`,"aria-controls":v,"aria-labelledby":y,disabled:f,className:`w-full justify-between font-normal`,children:[C,w]})}),t[21]=f,t[22]=a,t[23]=v,t[24]=y,t[25]=C,t[26]=n,t[27]=T):T=t[27];let E;t[28]===p?E=t[29]:(E=p({id:`UQAp48`}),t[28]=p,t[29]=E);let D;t[30]===E?D=t[31]:(D=(0,Z.jsx)(Me,{placeholder:E}),t[30]=E,t[31]=D);let O;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`c8iK2Y`})}),t[32]=O):O=t[32];let k;if(t[33]!==o||t[34]!==l||t[35]!==d||t[36]!==c){let e;t[38]!==o||t[39]!==l||t[40]!==c?(e=e=>{let t=e.title??e.name,n=e.title&&e.title!==e.name?e.name:void 0,r=`${e.scope}:${e.source_folder}:${e.name}`;return(0,Z.jsxs)(se,{value:r,keywords:[t,e.name,e.description??``,e.scope,e.source_folder??``],onSelect:()=>{l(e.name),o(!1)},className:`items-start gap-3`,children:[(0,Z.jsx)(Zo,{className:Oi(`mt-1 size-4 shrink-0`,c===e.name?`opacity-100`:`opacity-0`),"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium`,children:t}),n?(0,Z.jsx)(`code`,{className:`font-mono text-2xs text-muted-foreground shrink-0`,children:n}):null,(0,Z.jsx)(Cg,{entry:e,className:`ml-auto`})]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:e.description}):null]})]},r)},t[38]=o,t[39]=l,t[40]=c,t[41]=e):e=t[41],k=d.map(e),t[33]=o,t[34]=l,t[35]=d,t[36]=c,t[37]=k}else k=t[37];let A;t[42]!==o||t[43]!==l?(A=()=>{l(dg),o(!1)},t[42]=o,t[43]=l,t[44]=A):A=t[44];let j=c===dg?`opacity-100`:`opacity-0`,M;t[45]===j?M=t[46]:(M=Oi(`mt-1 size-4 shrink-0`,j),t[45]=j,t[46]=M);let N;t[47]===M?N=t[48]:(N=(0,Z.jsx)(Zo,{className:M,"aria-hidden":`true`}),t[47]=M,t[48]=N);let P;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`E7BhZn`})}),t[49]=P):P=t[49];let I;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[P,(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:(0,Z.jsx)(s,{id:`hZoBHK`})})]}),t[50]=I):I=t[50];let L;t[51]!==A||t[52]!==N?(L=(0,Z.jsxs)(se,{value:`Blank note empty`,onSelect:A,className:`items-start gap-3`,children:[N,I]}),t[51]=A,t[52]=N,t[53]=L):L=t[53];let R;t[54]!==m||t[55]!==k||t[56]!==L?(R=(0,Z.jsxs)(u,{id:m,className:`subtle-scrollbar`,children:[O,k,L]}),t[54]=m,t[55]=k,t[56]=L,t[57]=R):R=t[57];let z;t[58]!==D||t[59]!==R?(z=(0,Z.jsx)(F,{className:`w-[var(--radix-popover-trigger-width)] p-0`,align:`start`,onOpenAutoFocus:Sg,onWheel:xg,onTouchMove:bg,children:(0,Z.jsxs)(jt,{children:[D,R]})}),t[58]=D,t[59]=R,t[60]=z):z=t[60];let B;return t[61]!==o||t[62]!==a||t[63]!==z||t[64]!==T?(B=(0,Z.jsxs)(re,{open:a,onOpenChange:o,children:[T,z]}),t[61]=o,t[62]=a,t[63]=z,t[64]=T,t[65]=B):B=t[65],B}function bg(e){e.stopPropagation()}function xg(e){e.stopPropagation()}function Sg(e){e.preventDefault(),e.currentTarget.querySelector(`[cmdk-input]`)?.focus()}function Cg(e){let t=(0,$.c)(7),{entry:n,className:r}=e;if(n.scope===`inherited`){let e;t[0]===r?e=t[1]:(e=Oi(`shrink-0 text-2xs`,r),t[0]=r,t[1]=e);let i;t[2]===n.source_folder?i=t[3]:(i=n.source_folder||(0,Z.jsx)(s,{id:`ZNK2Tq`}),t[2]=n.source_folder,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,Z.jsx)(le,{variant:`gray`,className:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}return null}function wg(e){return e.split(`/`).pop()??e}function Tg(e,t){let n=new Map;for(let e of t?.folders??[])n.set(e.path,e.summary);let r=e.created.filter(e=>e.kind===`folder`).map(e=>({kind:`folder`,name:`${e.path}/`,description:n.get(wg(e.path))??``})),i=e.created.filter(e=>e.kind===`file`).map(e=>({kind:`file`,name:e.path,description:wg(e.path)===`log.md`?Is._({id:`l3mSlL`}):``}));return[...r,...i]}function Eg(e){let t=(0,$.c)(23),{plan:n,selectedPack:r}=e,{_:a}=i(),o,c,l,u,d,f;if(t[0]!==a||t[1]!==n||t[2]!==r){let e=[...Tg(n,r)].sort(kg),i=new Set(e.map(Og));d=`space-y-2`,t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsxs)(`h3`,{className:`flex items-center gap-1.5 text-xs font-semibold uppercase font-mono tracking-wider text-primary`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`flex items-center justify-center`,children:`◇`}),(0,Z.jsx)(s,{id:`xSVO3J`})]}),t[9]=f):f=t[9],u=`overflow-hidden rounded-md border border-border/60 bg-muted/20`,t[10]===a?o=t[11]:(o=a({id:`INEQsp`}),t[10]=a,t[11]=o),c=`py-1.5`,l=e.map(e=>{let t=e.name.replace(/\/$/,``).split(`/`),n=0,r=0;for(let e=1;e<t.length;e++){let a=t.slice(0,e).join(`/`);i.has(a)&&(n++,r=e)}let a=t.slice(r).join(`/`)+(e.kind===`folder`?`/`:``),o=e.kind===`folder`;return(0,Z.jsxs)(`li`,{className:`relative flex min-w-0 items-center gap-1.5 py-1 pr-3`,style:{paddingLeft:`${12+n*16}px`},children:[Array.from({length:n},Dg),o?(0,Z.jsx)(eu,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`,strokeWidth:1.5}):(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,Z.jsx)(`code`,{className:`font-mono text-1sm shrink-0 text-foreground/80`,children:a}),o&&e.description?(0,Z.jsxs)(ic,{children:[(0,Z.jsx)($s,{"aria-label":`Show description`,className:`flex shrink-0 cursor-help rounded outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,children:(0,Z.jsx)(Qo,{"aria-hidden":`true`,className:`size-3 text-muted-foreground/60`,strokeWidth:1.5})}),(0,Z.jsx)(tc,{children:e.description})]}):null]},e.name)}),t[0]=a,t[1]=n,t[2]=r,t[3]=o,t[4]=c,t[5]=l,t[6]=u,t[7]=d,t[8]=f}else o=t[3],c=t[4],l=t[5],u=t[6],d=t[7],f=t[8];let p;t[12]!==o||t[13]!==c||t[14]!==l?(p=(0,Z.jsx)(`ul`,{"aria-label":o,className:c,children:l}),t[12]=o,t[13]=c,t[14]=l,t[15]=p):p=t[15];let m;t[16]!==u||t[17]!==p?(m=(0,Z.jsx)(`div`,{className:u,children:p}),t[16]=u,t[17]=p,t[18]=m):m=t[18];let h;return t[19]!==d||t[20]!==f||t[21]!==m?(h=(0,Z.jsxs)(`section`,{className:d,children:[f,m]}),t[19]=d,t[20]=f,t[21]=m,t[22]=h):h=t[22],h}function Dg(e,t){return(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-0 bottom-0 w-px bg-border/50`,style:{left:`${12+t*16+8}px`}},`guide:${t}`)}function Og(e){return e.name.replace(/\/$/,``)}function kg(e,t){return e.name.localeCompare(t.name)}async function Ag(e){let t=await e.json().catch(()=>null),n=Or.safeParse(t);if(!n.success)return{kind:`internal`,message:`HTTP ${e.status}`};let r=n.data.detail??n.data.title,i=n.data.type;return i===`urn:ok:error:seed-prerequisite-missing`?{kind:`prerequisite-missing`,message:r}:i===`urn:ok:error:seed-invalid-root`?{kind:`invalid-root`,message:r}:i===`urn:ok:error:no-project-dir`?{kind:`no-project`,message:r}:{kind:`internal`,message:r}}function jg(){let e=typeof window<`u`?window.okDesktop:void 0;return e?.seed?{plan:e.seed.plan,apply:e.seed.apply,listPacks:e.seed.listPacks}:{plan:async e=>{let t=new URLSearchParams;e?.rootDir&&t.set(`rootDir`,e.rootDir),e?.packId&&t.set(`packId`,e.packId);let n=t.toString(),r=await fetch(`/api/seed/plan${n?`?${n}`:``}`);if(!r.ok)return{ok:!1,error:await Ag(r)};let i=await r.json().catch(()=>null);return i?.plan?{ok:!0,plan:i.plan}:{ok:!1,error:{kind:`internal`,message:`Malformed plan response`}}},apply:async(e,t)=>{let n=await fetch(`/api/seed/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({plan:e,packId:t?.packId})});if(!n.ok)return{ok:!1,error:await Ag(n)};let r=await n.json().catch(()=>null);return r?.result?{ok:!0,result:r.result}:{ok:!1,error:{kind:`internal`,message:`Malformed apply response`}}},listPacks:async()=>{let e=await fetch(`/api/seed/packs`);if(!e.ok)return{ok:!1,error:{kind:`internal`,message:`HTTP ${e.status}`}};let t=await e.json().catch(()=>null);return!t||!Array.isArray(t.packs)?{ok:!1,error:{kind:`internal`,message:`Malformed listPacks response`}}:{ok:!0,packs:t.packs}}}}var Mg={"knowledge-base":ou,"software-lifecycle":He,"codebase-wiki":Nl,"plain-notes":Fu,worldbuilding:Ul,"writing-pipeline":yu,"entity-vault":pu,okf:ql};function Ng(e){return Mg[e]??ou}function Pg(e){let t=(0,$.c)(37),{onPackSelect:n,onCreateBlankFile:r,className:a,packs:o}=e,{_:c}=i(),[l,u]=(0,Q.useState)(null),[d,f]=(0,Q.useState)(null),p=o===void 0,m,h;t[0]===p?(m=t[1],h=t[2]):(m=()=>{if(!p)return;let e=!1;return(async()=>{try{let t=await jg().listPacks();if(e)return;t.ok?u(t.packs):f(t.error.message)}catch(t){let n=t;if(e)return;f(n instanceof Error?n.message:String(n))}})(),()=>{e=!0}},h=[p],t[0]=p,t[1]=m,t[2]=h),(0,Q.useEffect)(m,h);let g=p?l:o;if(d!==null){let e;t[3]===a?e=t[4]:(e=Oi(`rounded-md bg-destructive/10 p-4 text-sm text-destructive`,a),t[3]=a,t[4]=e);let n;t[5]===d?n=t[6]:(n=(0,Z.jsx)(s,{id:`56WWtu`,values:{error:d}}),t[5]=d,t[6]=n);let r;return t[7]!==e||t[8]!==n?(r=(0,Z.jsx)(`div`,{role:`alert`,className:e,children:n}),t[7]=e,t[8]=n,t[9]=r):r=t[9],r}if(g===null){let e;t[10]===a?e=t[11]:(e=Oi(`grid w-full max-w-5xl gap-4 sm:grid-cols-2 lg:grid-cols-3`,a),t[10]=a,t[11]=e);let n;t[12]===c?n=t[13]:(n=c({id:`BeWTQy`}),t[12]=c,t[13]=n);let r;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(r=Array.from({length:Object.keys(Mg).length},Ig).map(Fg),t[14]=r):r=t[14];let i;return t[15]!==e||t[16]!==n||t[17]!==r?(i=(0,Z.jsx)(`div`,{role:`status`,className:e,"aria-busy":`true`,"aria-label":n,children:r}),t[15]=e,t[16]=n,t[17]=r,t[18]=i):i=t[18],i}if(g.length===0){let e;t[19]===a?e=t[20]:(e=Oi(`flex w-full max-w-5xl items-center justify-center rounded-2xl border border-dashed border-border/60 bg-muted/20 p-8 text-sm text-muted-foreground`,a),t[19]=a,t[20]=e);let n;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(s,{id:`zLGXna`}),t[21]=n):n=t[21];let r;return t[22]===e?r=t[23]:(r=(0,Z.jsx)(`div`,{role:`status`,className:e,children:n}),t[22]=e,t[23]=r),r}let _;t[24]===a?_=t[25]:(_=Oi(`grid w-full max-w-5xl gap-4 sm:grid-cols-2 lg:grid-cols-3`,a),t[24]=a,t[25]=_);let v;if(t[26]!==n||t[27]!==g){let e;t[29]===n?e=t[30]:(e=e=>(0,Z.jsx)(Rg,{pack:e,onSelect:()=>n(e.id)},e.id),t[29]=n,t[30]=e),v=g.map(e),t[26]=n,t[27]=g,t[28]=v}else v=t[28];let y;t[31]===r?y=t[32]:(y=r?(0,Z.jsx)(Lg,{onSelect:r}):null,t[31]=r,t[32]=y);let b;return t[33]!==_||t[34]!==v||t[35]!==y?(b=(0,Z.jsxs)(`div`,{className:_,children:[v,y]}),t[33]=_,t[34]=v,t[35]=y,t[36]=b):b=t[36],b}function Fg(e){return(0,Z.jsx)(zg,{},`skeleton-${e}`)}function Ig(e,t){return t}function Lg(e){let t=(0,$.c)(3),{onSelect:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(`span`,{className:`flex items-center gap-1.5`,children:(0,Z.jsx)(s,{id:`L4Cdd9`,components:{0:(0,Z.jsx)(Xa,{"aria-hidden":`true`,className:`size-3.5`})}})}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,Z.jsx)(`button`,{type:`button`,onClick:n,className:`group flex h-full min-h-22 flex-col items-center justify-center gap-2 rounded-2xl border border-dashed border-border/60 bg-card p-5 text-center text-sm transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px text-muted-foreground`,children:r}),t[1]=n,t[2]=i),i}function Rg(e){let t=(0,$.c)(17),{pack:n,onSelect:r}=e,i;t[0]===n.id?i=t[1]:(i=Ng(n.id),t[0]=n.id,t[1]=i);let a=i,o;t[2]===a?o=t[3]:(o=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:(0,Z.jsx)(a,{className:`size-3.5`})}),t[2]=a,t[3]=o);let s;t[4]===n.name?s=t[5]:(s=(0,Z.jsx)(`h3`,{className:`text-sm font-medium leading-tight`,children:n.name}),t[4]=n.name,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-2`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n.description?l=t[10]:(l=(0,Z.jsx)(`p`,{className:`text-1sm leading-relaxed text-muted-foreground`,children:n.description}),t[9]=n.description,t[10]=l);let u;t[11]!==c||t[12]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[c,l]}),t[11]=c,t[12]=l,t[13]=u):u=t[13];let d;return t[14]!==r||t[15]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,onClick:r,className:`group flex h-full flex-col items-start gap-4 rounded-2xl border border-border/60 bg-card p-5 text-left transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px`,children:u}),t[14]=r,t[15]=u,t[16]=d):d=t[16],d}function zg(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`size-10 animate-pulse rounded-lg bg-muted`,"aria-hidden":`true`,children:(0,Z.jsx)(Te,{className:`size-5 animate-spin text-muted-foreground opacity-0`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-[200px] flex-col items-start gap-4 rounded-xl border border-border/60 bg-card p-6`,children:[t,(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`h-4 w-1/2 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-4/5 animate-pulse rounded bg-muted`})]}),(0,Z.jsx)(`div`,{className:`mt-auto h-3 w-20 animate-pulse rounded bg-muted`})]}),e[1]=n):n=e[1],n}var Bg=`knowledge-base`;function Vg(e){let t=(0,$.c)(68),{open:n,onOpenChange:r,onSeedApplied:a,initialPackId:o}=e,{_:c}=i(),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={kind:`loading`},t[0]=l):l=t[0];let[u,d]=(0,Q.useState)(l),[f,p]=(0,Q.useState)(null),[m,h]=(0,Q.useState)(o??Bg),[g,_]=(0,Q.useState)(`project-root`),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(o===void 0?`pick`:`configure`),S=(0,Q.useRef)(!0),C=f?.find(e=>e.id===m),w,T;t[1]!==n||t[2]!==f?(w=()=>{if(!n||f!==null)return;let e=!1;return(async()=>{try{let t=await jg().listPacks();if(e)return;t.ok?p(t.packs):(p([]),d({kind:`error`,message:t.error.message}))}catch(t){let n=t;if(e)return;p([]),d({kind:`error`,message:n instanceof Error?n.message:String(n)})}})(),()=>{e=!0}},T=[n,f],t[1]=n,t[2]=f,t[3]=w,t[4]=T):(w=t[3],T=t[4]),(0,Q.useEffect)(w,T);let E,D;t[5]!==o||t[6]!==n?(E=()=>{n&&(h(o??Bg),_(`project-root`),y(``),x(o===void 0?`pick`:`configure`),d({kind:`loading`}),S.current=!0)},D=[n,o],t[5]=o,t[6]=n,t[7]=E,t[8]=D):(E=t[7],D=t[8]),(0,Q.useEffect)(E,D),(0,Q.useEffect)(()=>{C&&y(C.defaultSubfolder??``)},[C]);let O;t[9]===v?O=t[10]:(O=v.trim(),t[9]=v,t[10]=O);let k=O,A=g===`subfolder`&&k===``,j,M;t[11]!==c||t[12]!==n||t[13]!==f||t[14]!==g||t[15]!==m||t[16]!==b||t[17]!==A||t[18]!==k?(j=()=>{if(!n||b!==`configure`||f===null)return;if(A){d({kind:`error`,message:c({id:`Z8KDox`})});return}let e=g===`project-root`?void 0:k,t=S.current?0:200;S.current=!1;let r=!1,i=setTimeout(()=>{r||(d(Hg),jg().plan({rootDir:e,packId:m}).then(e=>{if(!r){if(!e.ok){d({kind:`error`,message:e.error.message});return}d(e.plan.created.length>0?{kind:`plan`,plan:e.plan}:{kind:`already-seeded`,plan:e.plan})}}).catch(e=>{r||d({kind:`error`,message:e instanceof Error?e.message:String(e)})}))},t);return()=>{r=!0,clearTimeout(i)}},M=[n,b,f,m,g,k,A,c],t[11]=c,t[12]=n,t[13]=f,t[14]=g,t[15]=m,t[16]=b,t[17]=A,t[18]=k,t[19]=j,t[20]=M):(j=t[19],M=t[20]),(0,Q.useEffect)(j,M);let N=async function(){if(u.kind!==`plan`)return;let e=u.plan;d({kind:`applying`,plan:e});let t;try{t=await jg().apply(e,{packId:m})}catch(t){let n=t,r=n instanceof Error?n.message:String(n);Ls.error(c({id:`iqugog`,values:{errorDetail:r}})),d({kind:`plan`,plan:e});return}if(t.ok){let e=C?.name??c({id:`W8vpBM`}),n=t.result.applied,i=c(n===0?{id:`K6jjWB`,values:{packName:e}}:{id:`x3-2ta`,values:{packName:e,projectEntries:n}});Ls.success(i),a?.(),r(!1)}else{let n=t.error.message;Ls.error(c({id:`iqugog`,values:{errorDetail:n}})),d({kind:`plan`,plan:e})}},P=o!==void 0,F=C?.name,I=c(b===`configure`&&C?{id:`hxEUVJ`,values:{selectedPackName:F}}:{id:`RGkNeJ`}),L;t[21]!==c||t[22]!==C||t[23]!==b?(L=b===`configure`&&C?C.description:c({id:`T-4cw2`}),t[21]=c,t[22]=C,t[23]=b,t[24]=L):L=t[24];let R=L,z;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(z=function(e){h(e),x(`configure`),S.current=!0},t[25]=z):z=t[25];let B=z,V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=function(){x(`pick`),d({kind:`loading`}),S.current=!0},t[26]=V):V=t[26];let H=V,U;t[27]===I?U=t[28]:(U=(0,Z.jsx)(Go,{children:I}),t[27]=I,t[28]=U);let W;t[29]===R?W=t[30]:(W=(0,Z.jsx)(Wo,{children:R}),t[29]=R,t[30]=W);let G;t[31]!==U||t[32]!==W?(G=(0,Z.jsxs)(Yo,{children:[U,W]}),t[31]=U,t[32]=W,t[33]=G):G=t[33];let K;t[34]!==f||t[35]!==u||t[36]!==g||t[37]!==C||t[38]!==b||t[39]!==v?(K=b===`pick`?(0,Z.jsx)(qo,{children:(0,Z.jsx)(Pg,{packs:f,onPackSelect:B})}):(0,Z.jsxs)(qo,{className:`space-y-6`,children:[(0,Z.jsx)(Ug,{choice:g,subfolder:v,placeholder:C?.defaultSubfolder??`subfolder`,onChoiceChange:_,onSubfolderChange:y}),(0,Z.jsx)(Wg,{phase:u,selectedPack:C})]}),t[34]=f,t[35]=u,t[36]=g,t[37]=C,t[38]=b,t[39]=v,t[40]=K):K=t[40];let q;t[41]!==P||t[42]!==b?(q=b===`configure`&&!P?(0,Z.jsxs)(Ai,{className:`mr-auto uppercase font-mono`,variant:`ghost`,onClick:H,children:[(0,Z.jsx)(Ri,{"aria-hidden":`true`,className:`h-4 w-4`}),(0,Z.jsx)(s,{id:`iH8pgl`})]}):null,t[41]=P,t[42]=b,t[43]=q):q=t[43];let J;t[44]===r?J=t[45]:(J=()=>r(!1),t[44]=r,t[45]=J);let ee;t[46]===u.kind?ee=t[47]:(ee=u.kind===`already-seeded`||u.kind===`error`?(0,Z.jsx)(s,{id:`yz7wBu`}):(0,Z.jsx)(s,{id:`dEgA5A`}),t[46]=u.kind,t[47]=ee);let Y;t[48]!==J||t[49]!==ee?(Y=(0,Z.jsx)(Ai,{className:`uppercase font-mono`,variant:`outline`,onClick:J,children:ee}),t[48]=J,t[49]=ee,t[50]=Y):Y=t[50];let te;t[51]!==N||t[52]!==u.kind||t[53]!==b||t[54]!==A?(te=b===`configure`&&u.kind===`plan`?(0,Z.jsx)(Ai,{onClick:N,disabled:A,children:(0,Z.jsx)(s,{id:`4TzU0n`})}):b===`configure`&&u.kind===`applying`?(0,Z.jsxs)(Ai,{disabled:!0,children:[(0,Z.jsx)(Te,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(s,{id:`XYlJJT`})]}):null,t[51]=N,t[52]=u.kind,t[53]=b,t[54]=A,t[55]=te):te=t[55];let X;t[56]!==q||t[57]!==Y||t[58]!==te?(X=(0,Z.jsxs)(Jo,{children:[q,Y,te]}),t[56]=q,t[57]=Y,t[58]=te,t[59]=X):X=t[59];let ne;t[60]!==G||t[61]!==K||t[62]!==X?(ne=(0,Z.jsxs)(Ko,{className:`sm:max-w-4xl`,"data-ok-layer-spawned":``,children:[G,K,X]}),t[60]=G,t[61]=K,t[62]=X,t[63]=ne):ne=t[63];let re;return t[64]!==r||t[65]!==n||t[66]!==ne?(re=(0,Z.jsx)(Xo,{open:n,onOpenChange:r,children:ne}),t[64]=r,t[65]=n,t[66]=ne,t[67]=re):re=t[67],re}function Hg(e){return e.kind===`plan`||e.kind===`already-seeded`?e:{kind:`loading`}}function Ug(e){let t=(0,$.c)(21),{choice:n,subfolder:r,placeholder:i,onChoiceChange:a,onSubfolderChange:o}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`p`,{className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`3wiBAs`})}),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=e=>a(e),t[1]=a,t[2]=l);let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Ca,{children:(0,Z.jsx)(s,{id:`RSqaSd`})}),t[3]=u):u=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(ta,{htmlFor:`seed-root-project-root`,children:(0,Z.jsxs)(Mo,{orientation:`horizontal`,children:[(0,Z.jsxs)(Na,{children:[u,(0,Z.jsx)(ra,{className:`text-1sm`,children:(0,Z.jsx)(s,{id:`vPYaz3`})})]}),(0,Z.jsx)(mc,{value:`project-root`,id:`seed-root-project-root`})]})}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(Ca,{children:(0,Z.jsx)(s,{id:`ZWgr0b`})}),t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(ra,{className:`nth-last-2:mt-0 text-1sm`,children:(0,Z.jsx)(s,{id:`GUpclA`})}),t[6]=p):p=t[6];let m;t[7]!==n||t[8]!==o||t[9]!==i||t[10]!==r?(m=n===`subfolder`&&(0,Z.jsx)($o,{value:r,onChange:e=>o(e.target.value),placeholder:i,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`mt-1.5 font-mono text-xs bg-background`}),t[7]=n,t[8]=o,t[9]=i,t[10]=r,t[11]=m):m=t[11];let h;t[12]===m?h=t[13]:(h=(0,Z.jsxs)(Na,{children:[f,p,m]}),t[12]=m,t[13]=h);let g;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(mc,{value:`subfolder`,id:`seed-root-subfolder`}),t[14]=g):g=t[14];let _;t[15]===h?_=t[16]:(_=(0,Z.jsx)(ta,{htmlFor:`seed-root-subfolder`,children:(0,Z.jsxs)(Mo,{orientation:`horizontal`,children:[h,g]})}),t[15]=h,t[16]=_);let v;return t[17]!==n||t[18]!==_||t[19]!==l?(v=(0,Z.jsxs)(`div`,{className:`space-y-2 py-1`,children:[c,(0,Z.jsxs)(pc,{className:`sm:flex`,value:n,onValueChange:l,children:[d,_]})]}),t[17]=n,t[18]=_,t[19]=l,t[20]=v):v=t[20],v}function Wg(e){let t=(0,$.c)(13),{phase:n,selectedPack:r}=e;if(n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 py-4 text-sm text-muted-foreground`,children:[(0,Z.jsx)(Te,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(s,{id:`mSJ3Rn`})]}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`div`,{className:`rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.kind===`already-seeded`){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`font-medium`,children:(0,Z.jsx)(s,{id:`YwPUUP`})}),t[3]=e):e=t[3];let n;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`py-2 text-sm`,children:[e,(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`gcV0dI`})})]}),t[4]=n):n=t[4],n}let i;t[5]!==n.plan||t[6]!==r?(i=(0,Z.jsx)(Eg,{plan:n.plan,selectedPack:r}),t[5]=n.plan,t[6]=r,t[7]=i):i=t[7];let a;t[8]===n.plan.warnings?a=t[9]:(a=n.plan.warnings.length>0?(0,Z.jsx)(`div`,{className:`rounded-md bg-warning/10 p-3 text-xs text-warning-foreground`,children:n.plan.warnings.map(Gg)}):null,t[8]=n.plan.warnings,t[9]=a);let o;return t[10]!==i||t[11]!==a?(o=(0,Z.jsxs)(`div`,{className:`space-y-6 py-1 text-sm`,children:[i,a]}),t[10]=i,t[11]=a,t[12]=o):o=t[12],o}function Gg(e){return(0,Z.jsx)(`p`,{children:e},e)}function Kg(){let[e]=(0,Q.useState)(qg);return e}function qg(){return qr()!=null}var Jg=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`},{id:`opencode`,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`}],Yg=Jg.filter(e=>e.id!==`claude-cowork`&&e.id!==`opencode`),Xg=(0,Q.createContext)(!1);function Zg(e){let t=(0,$.c)(5),{children:n}=e,[r,i]=(0,Q.useState)($g),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{if(window.okDesktop)return;let e=new AbortController;return N(e.signal).then(t=>{e.signal.aborted||t.status!==`ok`||i(t.config.singleFile)}).catch(Qg),()=>e.abort()},o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(Xg,{value:r,children:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}function Qg(){}function $g(){return typeof window<`u`?window.okDesktop?.config.singleFile??!1:!1}function e_(){return(0,Q.use)(Xg)}var t_=`#settings`;function n_(e){return xc(e.target)?!1:Cc(e,`settings`)}function r_(e){return e.replace(/^#/,``)===`settings`}function i_(){return typeof window>`u`?``:window.location.hash}function a_(){let e=(0,$.c)(4),[t,n]=(0,Q.useState)(s_),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=()=>{(0,Q.startTransition)(()=>{n(r_(i_()))})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a=o_,o;return e[2]===t?o=e[3]:(o={open:t,close:a},e[2]=t,e[3]=o),o}function o_(){typeof window>`u`||r_(i_())&&window.history.back()}function s_(){return r_(i_())}function c_(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function l_(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=hs(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function u_(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?c_(e):l_()}var d_=`ok:skill:cowork:installed`,f_=`1`,p_=250,m_=`/api/skill/install-state`;function h_(e){return`${d_}:v${e}`}var g_=new Map;async function __(e={},t={}){let n=t.force?`__force__`:`__default__`,r=g_.get(n);if(r)return r;let i=v_(e,t);return g_.set(n,i),i.finally(()=>{g_.get(n)===i&&g_.delete(n)}),i}async function v_(e,t){let n=e.installer===void 0?u_():e.installer,r=y_(e.storage),i=e.fetchSnapshot??x_,a=e.serverTimeoutMs??p_,o=null;if(!t.force){try{o=await S_(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=h_(o?.currentVersion??e.fallbackSkillVersion??b_());if(!t.force&&r?.getItem(s)===f_)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,f_)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function y_(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function b_(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function x_(){let e;try{e=await fetch(m_,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function S_(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function C_(e){return __({},e)}function w_(){return __({},{force:!0})}async function T_(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function E_(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return T_({target:`claude-cowork`,url:Qn({mode:`cowork`},e)},n);case`claude-code`:return T_({target:`claude-code`,url:Qn({mode:`code`},e)},n);case`codex`:return T_({target:`codex`,url:ar(e)},n);case`cursor`:return T_({target:`cursor`,url:hr(e),workspacePath:e.projectDir},n);case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function D_(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:O_(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:O_(e)}}}function O_(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}async function k_(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}function A_(e,t,n){let r=n===`\\`?t.replaceAll(`/`,`\\`):t;return`${e.endsWith(n)?e.slice(0,-1):e}${n}${r}`}function j_(e){return`${e}.md`}function M_(e){if(!e.docName||!e.workspace)return null;let t=j_(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:A_(n,t,r)}}function N_(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function P_(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function F_(e){return D_(e.installUrl).then(()=>void 0)}function I_(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function L_(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:n}=e.workspace;if(e.docName){let r=j_(e.docName),i={scope:`doc`,docRelativePath:r,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?i:{...i,selection:e.selection},projectDir:t,docPath:A_(t,r,n)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function R_(e){return`Opened in ${e}.`}function z_(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function B_(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function V_(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function H_(e,t,n){if(e.scope===`doc`){let r={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n};return e.selection===void 0?r:{...r,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n}}function U_(e,t,n){return e.compose?Hn(H_(e.compose,t,n)):e.selection?ui({...e.selection,target:t}):e.ask?xr(e.ask.relativePath,e.ask.instruction,n,t):Er(e.docContext===null?e.folderRelativePath?Rr(e.folderRelativePath,n,e.instruction):e.createDescription===void 0?pr(n,e.instruction):wr(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[]):zn(e.docContext.relativePath,n,e.instruction))}function W_(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.createDescription!==void 0||n?U_(e,Ci[t].handoffTarget,!1):ei(e.docContext?.relativePath??null)}async function G_(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`OpenKnowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:U_(t,e,n.autoOpen)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=V_(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(R_(u));else{let i=B_(r),a=z_(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{G_(e,t,n,r+1)}}})}return a}function K_(e){return Jg.find(t=>t.id===e)?.displayName??e}function q_(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function J_(){return{dispatchHandoff:E_,recordHandoff:k_,toast:{success:e=>{Ls.success(e)},error:(e,t)=>{Ls.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>q_(),getDisplayName:K_,ensureCoworkSkillInstalled:C_,autoOpen:!0}}function Y_(){let e=(0,$.c)(2),{merged:t}=ge(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>G_(e,t,{...J_(),autoOpen:n}),reinstallCoworkSkill:w_},e[0]=n,e[1]=r),r}var X_=[...new Set(Jg.flatMap(e=>e.schemes))];function Z_(e,t){let n=t.now?.()??Date.now(),r={};for(let t of Jg){let i=t.schemes[0],a=i===void 0?void 0:e[i];if(!a){r[t.id]={installed:null};continue}r[t.id]={installed:a.installed,...a.displayName===void 0?{}:{displayName:a.displayName},lastChecked:n}}return r}function Q_(e){return Z_({},e)}async function $_(e){let t=e.schemes??X_,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var ev=Object.fromEntries(X_.map(e=>[e,{installed:!1}]));async function tv(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return ev}if(!t.ok)return ev;let n;try{n=await t.json()}catch{return ev}if(typeof n!=`object`||!n||Array.isArray(n))return ev;let r=n,i={};for(let e of X_)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function nv(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function rv(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=Q_({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=Z_(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!nv(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function iv(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function av(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>$_({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>tv({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function ov(){let e=(0,$.c)(5),[t,n]=(0,Q.useState)(sv),r=(0,Q.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=rv(av());r.current=e;let t=e.subscribe(n);e.probe();let i=()=>{e.probe()};return window.addEventListener(`focus`,i),()=>{window.removeEventListener(`focus`,i),t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,Q.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function sv(){return Q_({isElectronHost:iv(),now:Date.now})}var cv=3e3,lv=600,uv=20,dv=(e,t,n)=>Xu(e,t,n,`CommandPalette`);function fv(e){window.location.assign(ls(e))}function pv(e,t){return e?.kind===`folder`||e?.kind===`folder-index`?e.folderPath:Fs(t)}function mv(e){let t=(0,$.c)(26),{entry:n,query:r,onSelect:i,disabled:a}=e,o=r===void 0?``:r,s=a===void 0?!1:a,c;t[0]===n?c=t[1]:(c=W(n),t[0]=n,t[1]=c);let l=c,u;t[2]===n?u=t[3]:(u=`title`in n&&n.title?n.title:n.path.split(`/`).pop()??n.path,t[2]=n,t[3]=u);let d=u,f=`snippet`in n?n.snippet:void 0,p=`${n.kind} ${n.path}`,m=`command-palette-nav-${n.kind}-${n.path}`,h;t[4]===l?h=t[5]:(h=(0,Z.jsx)(l,{className:`mt-0.5`}),t[4]=l,t[5]=h);let g;t[6]!==o||t[7]!==d?(g=(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:(0,Z.jsx)(gv,{query:o,text:d})}),t[6]=o,t[7]=d,t[8]=g):g=t[8];let _;t[9]!==n.path||t[10]!==o?(_=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(gv,{query:o,text:n.path})}),t[9]=n.path,t[10]=o,t[11]=_):_=t[11];let v;t[12]!==o||t[13]!==f?(v=f?(0,Z.jsx)(`span`,{className:`max-h-10 overflow-hidden text-muted-foreground text-xs leading-relaxed`,children:(0,Z.jsx)(gv,{query:o,text:f})}):null,t[12]=o,t[13]=f,t[14]=v):v=t[14];let y;t[15]!==v||t[16]!==g||t[17]!==_?(y=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[g,_,v]}),t[15]=v,t[16]=g,t[17]=_,t[18]=y):y=t[18];let b;return t[19]!==s||t[20]!==i||t[21]!==y||t[22]!==p||t[23]!==m||t[24]!==h?(b=(0,Z.jsxs)(se,{value:p,onSelect:i,disabled:s,"data-testid":m,className:`items-start`,children:[h,y]}),t[19]=s,t[20]=i,t[21]=y,t[22]=p,t[23]=m,t[24]=h,t[25]=b):b=t[25],b}function hv(e){let t=(0,$.c)(5),{mode:n,inExclusiveMode:r,paletteModeKind:i}=e;if(r||i!==`normal`||n===`idle`||n===`content`)return null;let a=`command-palette-search-hint-${n}`,o;t[0]===n?o=t[1]:(o=n===`name-only`?(0,Z.jsx)(s,{id:`-wePNM`}):n===`truncated`?(0,Z.jsx)(s,{id:`-q4abP`}):(0,Z.jsx)(s,{id:`DbILZA`}),t[0]=n,t[1]=o);let c;return t[2]!==a||t[3]!==o?(c=(0,Z.jsx)(`div`,{"aria-live":`polite`,"data-testid":a,className:`border-t px-3 py-2 text-muted-foreground text-xs`,children:o}),t[2]=a,t[3]=o,t[4]=c):c=t[4],c}function gv(e){let t=(0,$.c)(5),{text:n,query:r}=e,i;t[0]!==r||t[1]!==n?(i=Gh(n,r).map(_v),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,Z.jsx)(Z.Fragment,{children:i}),t[3]=i,t[4]=a),a}function _v(e){let t=`${e.start}:${e.match?`match`:`plain`}`;return e.match?(0,Z.jsx)(`mark`,{className:`rounded-sm bg-primary/10 px-0.5 font-semibold text-primary`,children:e.text},t):(0,Z.jsx)(`span`,{children:e.text},t)}function vv({searchResults:e,fallbackSearchResults:t,searchStatus:n}){return e.length>0?e:n===`success`?[]:t}function yv(e){let t=(0,$.c)(181),{bridge:n,open:r,onOpenChange:a}=e,o=n===void 0?null:n,{_:c}=i(),l=e_(),[d,f]=(0,Q.useState)(``),p=(0,Q.useDeferredValue)(d),m=p.trim(),h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=[],t[0]=h):h=t[0];let[g,_]=(0,Q.useState)(h),[v,y]=(0,Q.useState)(`idle`),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(!1),[w,T]=(0,Q.useState)(!1),E;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[1]=E):E=t[1];let[D,O]=(0,Q.useState)(E),[k,A]=(0,Q.useState)(null),[j,M]=(0,Q.useState)(`idle`),N;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(N=[],t[2]=N):N=t[2];let[P,F]=(0,Q.useState)(N),I;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(I=[],t[3]=I):I=t[3];let[L,z]=(0,Q.useState)(I),[B,V]=(0,Q.useState)(null),[H,U]=(0,Q.useState)(!1),[W,G]=(0,Q.useState)(!1),K;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(K=[],t[4]=K):K=t[4];let[q,J]=(0,Q.useState)(K),[ee,Y]=(0,Q.useState)(`idle`),te;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(te=[],t[5]=te):te=t[5];let[X,ne]=(0,Q.useState)(te),[re,ie]=(0,Q.useState)(`idle`),ae=(0,Q.useRef)(!1),oe=(0,Q.useRef)(null),ce=(0,Q.useRef)(null),le=(0,Q.useRef)(null),ue=(0,Q.useRef)(null),{activeDocName:de,activeTarget:fe}=yt(),{pages:pe,pageTitles:me,pageMeta:ge,folderPaths:_e,filePaths:ve,loading:ye}=Ts(),be=ja(),{states:xe,refresh:Se}=ov(),{dispatch:Ce}=Y_(),we;t[6]===r?we=t[7]:(we={enabled:r},t[6]=r,t[7]=we);let{status:De,refresh:Oe}=$i(we),Ae=(De?.enabled??!1)&&(De?.keyPresent??!1),je=De?.embedded??0,Ne=De?.total??0,Pe=Ae&&Ne>0&&je<Ne,Fe;t[8]!==w||t[9]!==r||t[10]!==Oe||t[11]!==Pe?(Fe=()=>{if(!r||!w||!Pe)return;let e=window.setInterval(()=>Oe(),2500);return()=>window.clearInterval(e)},t[8]=w,t[9]=r,t[10]=Oe,t[11]=Pe,t[12]=Fe):Fe=t[12];let Ie;t[13]!==w||t[14]!==r||t[15]!==Pe?(Ie=[r,w,Pe],t[13]=w,t[14]=r,t[15]=Pe,t[16]=Ie):Ie=t[16],(0,Q.useEffect)(Fe,Ie);let Le=M_({docName:de,workspace:be}),Re=Rh(pe,_e,me,ge,ve),ze=kh(L,new Set(Re.map(Sv))),Be=o?.config.projectPath??null,Ve=o?P.filter(e=>e.path!==Be):[],He;t[17]!==de||t[18]!==fe?(He=pv(fe,de),t[17]=de,t[18]=fe,t[19]=He):He=t[19];let Ue=He,We=m===``?[]:Uh(Re,m,8),Ge,Ke;t[20]!==a||t[21]!==r?(Ge=()=>{let e=function(e){Cc(e,`command-palette`)&&(e.preventDefault(),a(!r))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},Ke=[a,r],t[20]=a,t[21]=r,t[22]=Ge,t[23]=Ke):(Ge=t[22],Ke=t[23]),(0,Q.useEffect)(Ge,Ke);let Je,Ye;t[24]!==c||t[25]!==o||t[26]!==r||t[27]!==Se?(Je=()=>{if(r){if(z(Eh()),Se(),o){let e=!1;return dv(async()=>{let t=await o.project.listRecent();e||F(t)},c({id:`fYKgzG`})),()=>{e=!0}}return}f(``),J([]),Y(`idle`),ae.current=!1,ne([]),ie(`idle`),T(!1),le.current?.abort(),le.current=null,ue.current!==null&&(window.clearTimeout(ue.current),ue.current=null),O([]),A(null),M(`idle`)},Ye=[r,o,Se,c],t[24]=c,t[25]=o,t[26]=r,t[27]=Se,t[28]=Je,t[29]=Ye):(Je=t[28],Ye=t[29]),(0,Q.useEffect)(Je,Ye);let Xe;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=()=>{oe.current&&(oe.current.scrollTop=0)},t[30]=Xe):Xe=t[30];let Ze;t[31]===d?Ze=t[32]:(Ze=[d],t[31]=d,t[32]=Ze),(0,Q.useEffect)(Xe,Ze);let $e=new Set(q.map(xv)),et=w?{kind:`normal`,query:p}:Qh(p,$e),tt=et.kind!==`normal`,nt=tt||w,rt=et.kind===`tag-list`?et.query:``,it=et.kind===`tag-docs`?et.tagName:``,at=d.trim(),ot=w?Xh({query:at,firedQuery:k,status:j,resultCount:D.length}):null,st=ot?.submit?.query??``,ct=ot?.results.forQuery??``,lt,ut;t[33]!==tt||t[34]!==r?(lt=()=>{if(!r||!tt||ae.current)return;ae.current=!0,Y(`loading`);let e=!1;return eg().then(t=>{e||(J(t),Y(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tags failed`,t),J([]),Y(`error`))}),()=>{e=!0}},ut=[r,tt],t[33]=tt,t[34]=r,t[35]=lt,t[36]=ut):(lt=t[35],ut=t[36]),(0,Q.useEffect)(lt,ut);let dt=et.kind===`tag-docs`?et.tagName:null;(0,Q.useEffect)(()=>{if(!r||dt===null){ne([]),ie(`idle`);return}ie(`loading`),ne([]);let e=!1;return tg(dt).then(t=>{e||(ne(t),ie(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tag docs failed`,t),ne([]),ie(`error`))}),()=>{e=!0}},[r,dt]),(0,Q.useEffect)(()=>{if(!r||!m||nt||ye){_([]),y(`idle`),x(!1),C(!1);return}let e=!1,t=!1,n=0,i=null,a,o;y(`loading`);let s=()=>e||n>=uv?!1:(n+=1,o=window.setTimeout(l,lv),!0),c=()=>{e||t&&s()||(_([]),y(`error`),x(!1),C(!1))};function l(){let n=new AbortController;i=n,a=window.setTimeout(()=>{n.abort(),c()},cv),qh(m,{signal:n.signal}).then(n=>{let{entries:r,truncated:i,ready:o}=n;if(window.clearTimeout(a),!e){if(!o){t||(t=!0,_([]),x(!1),C(!0),y(`success`)),s()||C(!1);return}_(r),x(i),C(!1),y(`success`)}}).catch(t=>{window.clearTimeout(a),!e&&(t instanceof Error&&t.name===`AbortError`||c())})}return l(),()=>{e=!0,window.clearTimeout(a),window.clearTimeout(o),i?.abort()}},[r,m,nt,ye]);let ft;t[37]!==c||t[38]!==a?(ft=(e,t)=>{let n=t===void 0?c({id:`uuoHOU`}):t;a(!1),dv(async()=>{await e()},n)},t[37]=c,t[38]=a,t[39]=ft):ft=t[39];let pt=ft,mt;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(mt=function(e){let t={kind:e.kind,path:e.path,lastOpenedAt:new Date().toISOString()},n=Oh(Eh(),t);Dh(n),z(n)},t[40]=mt):mt=t[40];let gt=mt,_t;t[41]===a?_t=t[42]:(_t=function(e){a(!1),gt(e),fv(e.path)},t[41]=a,t[42]=_t);let vt=_t,bt=!nt&&m===``&&ze.length>0,St=vv({searchResults:g,fallbackSearchResults:We,searchStatus:v}),Ct=!nt&&St.length>0,wt=!nt&&m!==``&&(ye||S)&&!Ct,Tt=!nt&&m!==``&&v===`loading`&&!Ct&&!wt,Et;t[43]!==c||t[44]!==p||t[45]!==nt?(Et=!nt&&Jh(c({id:`HdkSiO`}),p,[`create file`]),t[43]=c,t[44]=p,t[45]=nt,t[46]=Et):Et=t[46];let Dt=Et,kt;t[47]!==c||t[48]!==p||t[49]!==nt?(kt=!nt&&Jh(c({id:`96G6Re`}),p,[`create folder`]),t[47]=c,t[48]=p,t[49]=nt,t[50]=kt):kt=t[50];let jt=kt,Mt;t[51]!==c||t[52]!==de||t[53]!==p||t[54]!==nt?(Mt=!nt&&de!==null&&Jh(c({id:`3Fcb0I`}),p,[`graph panel network`]),t[51]=c,t[52]=de,t[53]=p,t[54]=nt,t[55]=Mt):Mt=t[55];let Nt=Mt,Pt;t[56]!==c||t[57]!==p||t[58]!==nt?(Pt=!nt&&Jh(c({id:`fWi7pn`}),p,[`scaffold`,`seed`,`pack`,`starter`]),t[56]=c,t[57]=p,t[58]=nt,t[59]=Pt):Pt=t[59];let Ft=Pt,It;t[60]!==c||t[61]!==o||t[62]!==p||t[63]!==nt?(It=!nt&&o!==null&&Jh(c({id:`gKi-a_`}),p,[`create new project scaffold`]),t[60]=c,t[61]=o,t[62]=p,t[63]=nt,t[64]=It):It=t[64];let Lt=It,zt;t[65]!==c||t[66]!==o||t[67]!==p||t[68]!==nt?(zt=!nt&&o!==null&&Jh(c({id:`WPwDin`}),p,[`project`]),t[65]=c,t[66]=o,t[67]=p,t[68]=nt,t[69]=zt):zt=t[69];let Bt=zt,Vt;t[70]!==c||t[71]!==o||t[72]!==p||t[73]!==nt||t[74]!==l?(Vt=!nt&&!l&&o!==null&&Jh(c({id:`xaDWAI`}),p,[`switch project navigator projects`]),t[70]=c,t[71]=o,t[72]=p,t[73]=nt,t[74]=l,t[75]=Vt):Vt=t[75];let Ht=Vt,Ut;t[76]!==c||t[77]!==p||t[78]!==nt||t[79]!==l?(Ut=!nt&&!l&&Jh(c({id:`Tz0i8g`}),p,[`preferences config`]),t[76]=c,t[77]=p,t[78]=nt,t[79]=l,t[80]=Ut):Ut=t[80];let Wt=Ut,Gt;t[81]!==c||t[82]!==p||t[83]!==nt?(Gt=!1,t[81]=c,t[82]=p,t[83]=nt,t[84]=Gt):Gt=t[84];let Kt=Gt,qt=!nt&&o!==null&&Ve.length>0&&(m===``||Ve.some(e=>Jh(`${e.name} ${e.path}`,p,[`open recent project`]))),Jt=Kg(),Yt=!nt&&!Jt&&Le!==null&&(m===``||Yg.some(e=>{let t=e.displayName;return Jh(c({id:`WqLq6M`,values:{displayName:t}}),p,[e.id,`agent handoff`,`open in`])})),Xt=et.kind===`tag-list`?$h(q,et.query):[],Zt=et.kind===`tag-list`&&ee!==`loading`&&Xt.length===0,Qt=et.kind===`tag-docs`&&re===`success`&&X.length===0,$t=nt||bt||Ct||Tt||wt||Dt||jt||Nt||Ft||Lt||Bt||Ht||Wt||Kt||qt||Yt,en;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(en=function(e){f(`${Zh}${e}`)},t[85]=en):en=t[85];let tn=en,nn;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(nn=function(){le.current?.abort(),le.current=null,ue.current!==null&&(window.clearTimeout(ue.current),ue.current=null),O([]),A(null),M(`idle`)},t[86]=nn):nn=t[86];let rn=nn,an;t[87]===d?an=t[88]:(an=function(){T(!0),d.startsWith(`tag:`)&&f(d.slice(Zh.length)),rn(),ce.current?.focus()},t[87]=d,t[88]=an);let on=an,sn;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(sn=function(){T(!1),f(``),rn(),ce.current?.focus()},t[89]=sn):sn=t[89];let cn=sn,ln=function(e){let t=e.trim();if(!t||ye)return;le.current?.abort(),ue.current!==null&&window.clearTimeout(ue.current);let n=new AbortController;le.current=n,M(`loading`);let r=!1,i=window.setTimeout(()=>{r=!0,n.abort(),M(`error`)},cv);ue.current=i,qh(t,{signal:n.signal,semantic:!0,limit:30}).then(e=>{let{entries:r}=e;un(i,n),O(r),A(t),M(`success`)}).catch(e=>{un(i,n),!(e instanceof Error&&e.name===`AbortError`&&!r)&&(console.debug(`[semantic-search] fire failed`,{timedOut:r,error:e}),M(`error`))})};function un(e,t){window.clearTimeout(e),ue.current===e&&(ue.current=null),le.current===t&&(le.current=null)}let dn=function(e){!w||e.key!==`Enter`||(ot?.submit?(e.preventDefault(),e.stopPropagation(),ln(ot.submit.query)):j===`loading`&&(e.preventDefault(),e.stopPropagation()))},fn;t[90]===w?fn=t[91]:(fn=function(e){w&&(e.preventDefault(),cn())},t[90]=w,t[91]=fn);let pn=fn,mn;t[92]===c?mn=t[93]:(mn=c({id:`1bDVu5`}),t[92]=c,t[93]=mn);let hn;t[94]===c?hn=t[95]:(hn=c({id:`5GRxoA`}),t[94]=c,t[95]=hn);let gn;t[96]===Symbol.for(`react.memo_cache_sentinel`)?(gn={shouldFilter:!1,className:`[&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4`},t[96]=gn):gn=t[96];let _n;t[97]!==c||t[98]!==w?(_n=c(w?{id:`zXj1rA`}:{id:`ggs9f8`}),t[97]=c,t[98]=w,t[99]=_n):_n=t[99];let vn;t[100]!==w||t[101]!==tt?(vn=()=>{w&&(T(!1),rn()),f(tt?``:Zh),ce.current?.focus()},t[100]=w,t[101]=tt,t[102]=vn):vn=t[102];let yn=tt?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,bn;t[103]===yn?bn=t[104]:(bn=Oi(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,yn),t[103]=yn,t[104]=bn);let xn,Sn;t[105]===Symbol.for(`react.memo_cache_sentinel`)?(xn=(0,Z.jsx)(Rt,{className:`size-3.5`}),Sn=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`0rwwOn`})}),t[105]=xn,t[106]=Sn):(xn=t[105],Sn=t[106]);let Cn;t[107]!==tt||t[108]!==vn||t[109]!==bn?(Cn=(0,Z.jsxs)(`button`,{type:`button`,onClick:vn,"data-testid":`command-palette-filter-tag`,"data-active":tt,"aria-pressed":tt,className:bn,children:[xn,Sn]}),t[107]=tt,t[108]=vn,t[109]=bn,t[110]=Cn):Cn=t[110];let wn;t[111]!==on||t[112]!==w||t[113]!==Ae?(wn=Ae?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>w?cn():on(),"data-testid":`command-palette-filter-semantic`,"data-active":w,"aria-pressed":w,className:Oi(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,w?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,Z.jsx)(Vi,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`9tJX8r`})})]}):null,t[111]=on,t[112]=w,t[113]=Ae,t[114]=wn):wn=t[114];let Tn;t[115]!==Cn||t[116]!==wn?(Tn=(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 border-b px-3 py-2`,children:[Cn,wn]}),t[115]=Cn,t[116]=wn,t[117]=Tn):Tn=t[117];let En=w&&ot?(0,Z.jsxs)(Z.Fragment,{children:[Pe?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-indexing`,children:[(0,Z.jsx)(Te,{className:`size-3.5 animate-spin`}),(0,Z.jsx)(s,{id:`kCNU4q`,values:{semanticIndexedCount:je,semanticTotalCount:Ne}})]}):null,ot.submit?(0,Z.jsx)(Ee,{children:(0,Z.jsx)(se,{value:`semantic-submit`,onSelect:()=>ln(st),"data-testid":`command-palette-semantic-submit`,children:ot.submit.kind===`retry`?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 text-amber-700 dark:text-amber-400`,children:[(0,Z.jsx)(Vi,{}),(0,Z.jsx)(s,{id:`rBc32v`})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Vi,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:(0,Z.jsx)(s,{id:`FNTx6u`,values:{semanticSubmitQuery:st}})}),(0,Z.jsx)(qe,{children:`↵`})]})})}):null,ot.notice===`empty`?(0,Z.jsx)(ke,{"data-testid":`command-palette-semantic-empty`,children:(0,Z.jsx)(s,{id:`Xw_maT`})}):null,ot.notice===`searching`?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-searching`,children:[(0,Z.jsx)(Te,{className:`size-4 animate-spin`}),(0,Z.jsx)(s,{id:`PBwmDJ`})]}):null,ot.notice===`no-results`?(0,Z.jsx)(ke,{"data-testid":`command-palette-semantic-no-results`,children:(0,Z.jsx)(s,{id:`yFyZMJ`,values:{semanticQueryText:at}})}):null,ot.results.show?(0,Z.jsx)(Ee,{heading:ot.results.dimmed?c({id:`QlxHAH`,values:{semanticResultsLabel:ct}}):c({id:`9tJX8r`}),children:(0,Z.jsx)(`div`,{"data-testid":`command-palette-semantic-results`,"data-dimmed":ot.results.dimmed,children:D.map(e=>(0,Z.jsx)(mv,{entry:e,disabled:ot.results.dimmed,onSelect:()=>vt(e)},Th(e.kind,e.path)))})}):null]}):null,Dn;t[118]===wt?Dn=t[119]:(Dn=wt?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-search-preparing`,children:[(0,Z.jsx)(Te,{className:`size-4 animate-spin`}),(0,Z.jsx)(s,{id:`yIPXut`})]}):null,t[118]=wt,t[119]=Dn);let On;t[120]!==Ct||t[121]!==Tt?(On=Tt&&!Ct?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`WRNXKp`})}):null,t[120]=Ct,t[121]=Tt,t[122]=On):On=t[122];let kn=$t?null:(0,Z.jsx)(ke,{children:v===`error`?(0,Z.jsx)(s,{id:`pkAft1`}):(0,Z.jsx)(s,{id:`i3f2kh`})}),An=et.kind===`tag-list`?(0,Z.jsxs)(Ee,{heading:et.query?c({id:`evs0iw`,values:{tagListQuery:rt}}):c({id:`2QM24L`}),children:[ee===`loading`?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`a_u4ck`})}):null,ee===`error`?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`MZoxVx`})}):null,Zt?(0,Z.jsx)(ke,{children:et.query?c({id:`X0ttSN`,values:{tagListQuery:rt}}):c({id:`JLUTgi`})}):null,Xt.map(e=>(0,Z.jsxs)(se,{value:`tag ${e.name}`,onSelect:()=>tn(e.name),"data-testid":`command-palette-tag-${e.name}`,children:[(0,Z.jsx)(Rt,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.name}),(0,Z.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground tabular-nums`,children:(0,Z.jsx)(s,{id:`fVcm9t`,values:{0:e.count}})})]},`tag:${e.name}`))]}):null,jn=et.kind===`tag-docs`?(0,Z.jsxs)(Ee,{heading:c({id:`hGmuTc`,values:{tagDocsName:it}}),children:[re===`loading`?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`pWbsW6`})}):null,re===`error`?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`48uGTI`})}):null,Qt?(0,Z.jsx)(ke,{children:c({id:`NIWAux`,values:{tagDocsName:it}})}):null,X.map(e=>{let t=e.title||e.docName.split(`/`).pop()||e.docName,n=e.matchingTags.filter(e=>e!==et.tagName).map(bv).join(`, `);return(0,Z.jsxs)(se,{value:`tag-doc ${e.docName}`,onSelect:()=>{a(!1),fv(e.docName)},"data-testid":`command-palette-tag-doc-${e.docName}`,className:`items-start`,children:[(0,Z.jsx)(Qe,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:t}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.docName}),e.matchingTags.length>0&&e.matchingTags.some(e=>e!==et.tagName)?(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-[11px]`,children:(0,Z.jsx)(s,{id:`CvsD6Y`,values:{viaTags:n}})}):null]})]},`tag-doc:${e.docName}`)})]}):null,Mn=bt?(0,Z.jsx)(Ee,{heading:c({id:`MmDDWK`}),children:ze.map(e=>(0,Z.jsx)(mv,{entry:e,onSelect:()=>vt(e)},Th(e.kind,e.path)))}):null,Nn;t[123]!==c||t[124]!==de||t[125]!==a||t[126]!==V||t[127]!==U||t[128]!==Dt||t[129]!==jt||t[130]!==Nt||t[131]!==Ft?(Nn=Dt||jt||Nt||Ft?(0,Z.jsxs)(Ee,{heading:c({id:`45MZFs`}),children:[Dt?(0,Z.jsxs)(se,{value:`new file create file`,onSelect:()=>{a(!1),V(`file`)},"data-testid":`command-palette-new-file`,children:[(0,Z.jsx)(Ot,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`HdkSiO`})})]}):null,jt?(0,Z.jsxs)(se,{value:`new folder create folder`,onSelect:()=>{a(!1),V(`folder`)},"data-testid":`command-palette-new-folder`,children:[(0,Z.jsx)($l,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`96G6Re`})})]}):null,Nt?(0,Z.jsxs)(se,{value:`open graph graph panel network`,onSelect:()=>{de&&(a(!1),ag(`graph`))},"data-testid":`command-palette-open-graph`,children:[(0,Z.jsx)(pu,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`3Fcb0I`})})]}):null,Ft?(0,Z.jsxs)(se,{value:`initialize starter pack scaffold seed`,onSelect:()=>{a(!1),U(!0)},"data-testid":`command-palette-initialize-starter-pack`,children:[(0,Z.jsx)(hu,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`fWi7pn`})})]}):null]}):null,t[123]=c,t[124]=de,t[125]=a,t[126]=V,t[127]=U,t[128]=Dt,t[129]=jt,t[130]=Nt,t[131]=Ft,t[132]=Nn):Nn=t[132];let Pn=Yt?(0,Z.jsx)(Ee,{heading:c({id:`O7_W_a`}),children:Yg.filter(e=>{let t=e.displayName;return Jh(c({id:`WqLq6M`,values:{displayName:t}}),p,[e.id,`agent handoff`,`open in`])}).map(e=>{let t=xe[e.id],n=t.installed===!0&&Le!==null,r=e.displayName,i=t.installed===null?c({id:`IA6JW2`}):t.installed===!1?c({id:`5SwVv1`}):null,o=c(i?{id:`1ZpfyB`,values:{displayName:r,hint:i}}:{id:`WqLq6M`,values:{displayName:r}});return(0,Z.jsxs)(se,{value:`send to ai ${e.displayName} ${e.id} agent open in`,disabled:!n,onSelect:()=>{!n||!Le||(a(!1),Ce(e.id,Le))},"data-testid":`command-palette-open-in-${e.id}`,"aria-label":o,children:[(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`WqLq6M`,values:{displayName:r}})}),i?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-muted-foreground text-xs`,children:i}):null]},e.id)})}):null,Fn;t[133]!==c||t[134]!==o||t[135]!==a||t[136]!==pt||t[137]!==G||t[138]!==Lt||t[139]!==Kt||t[140]!==Bt||t[141]!==Ht||t[142]!==Wt?(Fn=Lt||Bt||Ht||Wt||Kt?(0,Z.jsxs)(Ee,{heading:c({id:`e0NrBM`}),children:[Lt&&o?(0,Z.jsxs)(se,{value:`new project create scaffold`,onSelect:()=>{a(!1),G(!0)},"data-testid":`command-palette-new-project`,children:[(0,Z.jsx)(At,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`gKi-a_`})})]}):null,Bt&&o?(0,Z.jsxs)(se,{value:`open folder on disk project`,onSelect:()=>pt(async()=>{let e=await o.dialog.openFolder();e&&await o.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})}),"data-testid":`command-palette-open-folder`,children:[(0,Z.jsx)(ht,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`WPwDin`})}),(0,Z.jsx)(qe,{children:Sc(`open-folder`)})]}):null,Ht&&o?(0,Z.jsxs)(se,{value:`switch-project navigator projects`,onSelect:()=>pt(()=>o.navigator.open(),c({id:`jol95m`})),"data-testid":`command-palette-switch-project`,children:[(0,Z.jsx)(xt,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`xaDWAI`})}),(0,Z.jsx)(qe,{children:Sc(`switch-project`)})]}):null,Wt?(0,Z.jsxs)(se,{value:`settings preferences config`,onSelect:()=>{a(!1),window.location.hash!==`#settings`&&(window.location.hash=t_)},"data-testid":`command-palette-settings`,children:[(0,Z.jsx)(Du,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`Tz0i8g`})}),(0,Z.jsx)(qe,{children:Sc(`settings`)})]}):null,Kt?(0,Z.jsxs)(se,{value:`install claude desktop cowork app`,onSelect:()=>{a(!1),window.location.hash=`#install-claude-desktop`},"data-testid":`command-palette-install-claude-desktop`,children:[(0,Z.jsx)(Co,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`62Pc08`})})]}):null]}):null,t[133]=c,t[134]=o,t[135]=a,t[136]=pt,t[137]=G,t[138]=Lt,t[139]=Kt,t[140]=Bt,t[141]=Ht,t[142]=Wt,t[143]=Fn):Fn=t[143];let In=qt&&o?(0,Z.jsx)(Ee,{heading:c({id:`3iyGWF`}),children:Ve.filter(e=>Jh(`${e.name} ${e.path}`,p,[`open recent project`])).slice(0,10).map(e=>(0,Z.jsxs)(se,{value:`${e.name} ${e.path} recent project`,disabled:e.missing,onSelect:()=>pt(()=>o.project.open({path:e.path,target:`new-window`,entryPoint:`recents`}),c({id:`SUOoXn`})),"data-testid":`command-palette-recent-${e.path}`,className:`items-start`,children:[(0,Z.jsx)(he,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),(0,Z.jsxs)(`span`,{className:`truncate text-muted-foreground text-xs`,children:[e.path,e.missing?(0,Z.jsxs)(Z.Fragment,{children:[` `,(0,Z.jsx)(s,{id:`ls1N1w`})]}):null]})]})]},e.path))}):null,Ln=Ct?(0,Z.jsx)(Ee,{heading:c({id:`A1taO8`}),children:St.map(e=>(0,Z.jsx)(mv,{entry:e,query:m,onSelect:()=>vt(e)},Th(e.kind,e.path)))}):null,Rn;t[144]!==En||t[145]!==Dn||t[146]!==On||t[147]!==kn||t[148]!==An||t[149]!==jn||t[150]!==Mn||t[151]!==Nn||t[152]!==Pn||t[153]!==Fn||t[154]!==In||t[155]!==Ln?(Rn=(0,Z.jsxs)(u,{ref:oe,className:`subtle-scrollbar`,children:[En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln]}),t[144]=En,t[145]=Dn,t[146]=On,t[147]=kn,t[148]=An,t[149]=jn,t[150]=Mn,t[151]=Nn,t[152]=Pn,t[153]=Fn,t[154]=In,t[155]=Ln,t[156]=Rn):Rn=t[156];let zn=hv,Bn=Yh(m,St,{truncated:b}),Vn;t[157]!==zn||t[158]!==nt||t[159]!==et.kind||t[160]!==Bn?(Vn=(0,Z.jsx)(zn,{mode:Bn,inExclusiveMode:nt,paletteModeKind:et.kind}),t[157]=zn,t[158]=nt,t[159]=et.kind,t[160]=Bn,t[161]=Vn):Vn=t[161];let Hn=B===`file`,Un;t[162]===V?Un=t[163]:(Un=e=>{e||V(null)},t[162]=V,t[163]=Un);let Wn;t[164]!==Ue||t[165]!==Hn||t[166]!==Un?(Wn=(0,Z.jsx)(_g,{open:Hn,onOpenChange:Un,kind:`file`,initialDir:Ue}),t[164]=Ue,t[165]=Hn,t[166]=Un,t[167]=Wn):Wn=t[167];let Gn=B===`folder`,Kn;t[168]===V?Kn=t[169]:(Kn=e=>{e||V(null)},t[168]=V,t[169]=Kn);let qn;t[170]!==Ue||t[171]!==Gn||t[172]!==Kn?(qn=(0,Z.jsx)(_g,{open:Gn,onOpenChange:Kn,kind:`folder`,initialDir:Ue}),t[170]=Ue,t[171]=Gn,t[172]=Kn,t[173]=qn):qn=t[173];let Jn;t[174]!==H||t[175]!==U?(Jn=(0,Z.jsx)(Vg,{open:H,onOpenChange:U}),t[174]=H,t[175]=U,t[176]=Jn):Jn=t[176];let Yn;return t[177]!==o||t[178]!==W||t[179]!==G?(Yn=o?(0,Z.jsx)(Kf,{open:W,onOpenChange:G,bridge:o}):null,t[177]=o,t[178]=W,t[179]=G,t[180]=Yn):Yn=t[180],(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(R,{open:r,onOpenChange:a,title:mn,description:hn,className:`sm:max-w-2xl`,commandProps:gn,onEscapeKeyDown:pn,children:[(0,Z.jsx)(Me,{ref:ce,value:d,onValueChange:f,onKeyDown:dn,placeholder:_n}),Tn,Rn,Vn]}),Wn,qn,Jn,Yn]})}function bv(e){return`#${e}`}function xv(e){return e.name}function Sv(e){return Th(e.kind,e.path)}var Cv=500;function wv(e,t,n){return t?`terminal`:e===null&&n?`retrying`:`hidden`}function Tv(e){return e?.kind===`null-collab`}function Ev(e){if(e===null)return Is._({id:`Ua78MH`});if(e.kind===`null-collab`)return Is._({id:`TJnkyf`});if(e.code===`network`)return Is._({id:`aoa6xA`});if(e.code===`invalid-body`)return Is._({id:`FRYB1Q`});let t=e.code;return Is._({id:`4nj6n8`,values:{code:t}})}function Dv(){let e=(0,$.c)(18),{collabUrl:t,collabTerminal:n,collabLastError:r,retryCollab:i}=yt(),[a,o]=(0,Q.useState)(!1),c,l;e[0]!==n||e[1]!==t?(c=()=>{if(t!==null||n){o(!1);return}let e=setTimeout(()=>o(!0),Cv);return()=>clearTimeout(e)},l=[t,n],e[0]=n,e[1]=t,e[2]=c,e[3]=l):(c=e[2],l=e[3]),(0,Q.useEffect)(c,l);let u=wv(t,n,a);if(u===`hidden`)return null;if(u===`terminal`){let t;e[4]===r?t=e[5]:(t=Tv(r),e[4]=r,e[5]=t);let n=t,a;e[6]===r?a=e[7]:(a=Ev(r),e[6]=r,e[7]=a);let o=a,c;e[8]!==o||e[9]!==n?(c=(0,Z.jsx)(`span`,{children:n?(0,Z.jsx)(s,{id:`AAlr5Y`,components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}}):(0,Z.jsx)(s,{id:`noH1JX`,values:{errorDetail:o},components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`}),1:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}})}),e[8]=o,e[9]=n,e[10]=c):c=e[10];let l;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(s,{id:`6gRgw8`}),e[11]=l):l=e[11];let u;e[12]===i?u=e[13]:(u=(0,Z.jsx)(`button`,{type:`button`,onClick:i,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900`,children:l}),e[12]=i,e[13]=u);let d;return e[14]!==c||e[15]!==u?(d=(0,Z.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:`fixed top-0 inset-x-0 z-50 bg-red-500/95 text-red-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md flex items-center justify-center gap-3 flex-wrap`,children:[c,u]}),e[14]=c,e[15]=u,e[16]=d):d=e[16],d}let d;return e[17]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`fixed top-0 inset-x-0 z-50 bg-amber-500/95 text-amber-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md`,children:(0,Z.jsx)(s,{id:`UYcGIW`})}),e[17]=d):d=e[17],d}function Ov(e){let t=(0,$.c)(6),{bridge:n}=e,[r,i]=(0,Q.useState)(!1),a,o;t[0]===n?(a=t[1],o=t[2]):(a=()=>n.onMenuAction(e=>{e===`new-project`&&i(!0)}),o=[n],t[0]=n,t[1]=a,t[2]=o),(0,Q.useEffect)(a,o);let s;return t[3]!==n||t[4]!==r?(s=(0,Z.jsx)(Kf,{open:r,onOpenChange:i,bridge:n}),t[3]=n,t[4]=r,t[5]=s):s=t[5],s}async function kv(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok){let e=await t.json().catch(()=>null),n=t.status,r=t.statusText;throw Error(hs(e)??Is._({id:`lHwYMr`,values:{status:n,statusText:r}}))}return(await t.json()).docs??[]}function Av(){let e=(0,$.c)(18),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={kind:`idle`},e[0]=a):a=e[0];let[o,c]=(0,Q.useState)(a),l=(0,Q.useRef)(0),u,d;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{let e=function(e){let t=e.detail;if(!t||typeof t.value!=`string`)return;let r=l.current+=1;i(t.value),n(!0),c({kind:`loading`}),kv(t.value).then(e=>{l.current===r&&c({kind:`ready`,docs:e})}).catch(e=>{l.current===r&&c({kind:`error`,message:e instanceof Error?e.message:String(e)})})};return document.addEventListener(et,e),()=>document.removeEventListener(et,e)},d=[],e[1]=u,e[2]=d):(u=e[1],d=e[2]),(0,Q.useEffect)(u,d);let f;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=function(e){n(!1),window.location.assign(ls(e))},e[3]=f):f=e[3];let p=f,m=r??``,h;e[4]===m?h=e[5]:(h={tagName:m},e[4]=m,e[5]=h);let g;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(g={0:(0,Z.jsx)(`span`,{className:`font-mono`})},e[6]=g):g=e[6];let _;e[7]===h?_=e[8]:(_=(0,Z.jsx)(Yo,{children:(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`7H4UHD`,values:h,components:g})})}),e[7]=h,e[8]=_);let v=r??``,y;e[9]!==o||e[10]!==v?(y=(0,Z.jsx)(qo,{children:(0,Z.jsx)(jv,{fetchState:o,tag:v,onSelectDoc:p})}),e[9]=o,e[10]=v,e[11]=y):y=e[11];let b;e[12]!==_||e[13]!==y?(b=(0,Z.jsxs)(Ko,{children:[_,y]}),e[12]=_,e[13]=y,e[14]=b):b=e[14];let x;return e[15]!==t||e[16]!==b?(x=(0,Z.jsx)(Xo,{open:t,onOpenChange:n,children:b}),e[15]=t,e[16]=b,e[17]=x):x=e[17],x}function jv(e){let t=(0,$.c)(15),{fetchState:n,tag:r,onSelectDoc:i}=e;if(n.kind===`idle`||n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-loading`,children:(0,Z.jsx)(s,{id:`yQE2r9`})}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`p`,{className:`text-destructive text-sm`,"data-testid":`tag-dialog-error`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.docs.length===0){let e;t[3]===r?e=t[4]:(e={tag:r},t[3]=r,t[4]=e);let n;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n={0:(0,Z.jsx)(`span`,{className:`font-mono`})},t[5]=n):n=t[5];let i;return t[6]===e?i=t[7]:(i=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-empty`,children:(0,Z.jsx)(s,{id:`lAiyU_`,values:e,components:n})}),t[6]=e,t[7]=i),i}let a;if(t[8]!==n.docs||t[9]!==i){let e;t[11]===i?e=t[12]:(e=e=>{let t=e.matchingTags??[];return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,className:`w-full rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring`,onClick:()=>i(e.docName),"data-testid":`tag-dialog-row`,children:[(0,Z.jsx)(`span`,{className:`block truncate font-medium`,children:e.title}),e.docName===e.title?null:(0,Z.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:e.docName}),t.length>0?(0,Z.jsx)(`span`,{className:`mt-1 flex flex-wrap items-center gap-1`,"data-testid":`tag-dialog-row-matches`,children:t.map(Mv)}):null]})},e.docName)},t[11]=i,t[12]=e),a=n.docs.map(e),t[8]=n.docs,t[9]=i,t[10]=a}else a=t[10];let o;return t[13]===a?o=t[14]:(o=(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1`,"data-testid":`tag-dialog-list`,children:a}),t[13]=a,t[14]=o),o}function Mv(e){return(0,Z.jsxs)(`span`,{"data-testid":`tag-dialog-row-match`,"data-tag":e,className:`tag pointer-events-none text-xs`,children:[`#`,e]},e)}var Nv=`raw-mdx-nav`,Pv=`ok-editor-mode-v1`,Fv=[`wysiwyg`,`source`],Iv=`wysiwyg`;function Lv(e){return Fv.includes(e)}function Rv(e=localStorage){try{let t=e.getItem(Pv);if(t===null)return Iv;if(Lv(t))return t;console.warn(`[editor-mode] invalid persisted value, falling back to default`,{raw:t})}catch{}return Iv}function zv(e=window,t=localStorage){let n=e.__OK_EDITOR_MODE__;return Lv(n)?n:Rv(t)}function Bv(e,t=localStorage){try{return t.setItem(Pv,e),!0}catch(e){return console.warn(`[editor-mode] persist failed`,e),!1}}function Vv(){let e=(0,$.c)(3),[t,n]=(0,Q.useState)(zv),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=function(e){n(e),Bv(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function Hv(e){let t=(0,$.c)(4),{_:n}=i(),r=(0,Q.useRef)(!1),a,o;t[0]!==n||t[1]!==e?(a=()=>{e===`no-push-permission`&&!r.current&&(r.current=!0,Ls.info(n({id:`JkCD2u`})))},o=[e,n],t[0]=n,t[1]=e,t[2]=a,t[3]=o):(a=t[2],o=t[3]),(0,Q.useEffect)(a,o)}function Uv(e){let t=(0,$.c)(25),{open:n,onResolved:r}=e,{_:a}=i(),o=no(),c;t[0]!==a||t[1]!==r||t[2]!==o?(c=function(e){if(o===null){Ls.error(a({id:`fiMNLl`}));return}let t=o(e);if(!t.ok){let n=t.error;Ls.error(a(e?{id:`FUMerq`,values:{detail:n}}:{id:`0t0bbC`,values:{detail:n}}));return}r()},t[0]=a,t[1]=r,t[2]=o,t[3]=c):c=t[3];let l=c,u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Yo,{children:(0,Z.jsx)(Ka,{})}),t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Ao,{}),t[5]=d):d=t[5];let f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsxs)(qo,{children:[d,(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`ZLQol-`,components:{0:(0,Z.jsx)(`span`,{className:`font-medium`})}})})]}),t[6]=f):f=t[6];let p;t[7]===l?p=t[8]:(p=()=>l(!1),t[7]=l,t[8]=p);let m=o===null,h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(s,{id:`IKoTAC`}),t[9]=h):h=t[9];let g;t[10]!==p||t[11]!==m?(g=(0,Z.jsx)(Ai,{variant:`outline`,className:`uppercase font-mono`,onClick:p,disabled:m,children:h}),t[10]=p,t[11]=m,t[12]=g):g=t[12];let _;t[13]===l?_=t[14]:(_=()=>l(!0),t[13]=l,t[14]=_);let v=o===null,y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(s,{id:`XU0OXn`}),t[15]=y):y=t[15];let b;t[16]!==v||t[17]!==_?(b=(0,Z.jsx)(Ai,{onClick:_,disabled:v,children:y}),t[16]=v,t[17]=_,t[18]=b):b=t[18];let x;t[19]!==b||t[20]!==g?(x=(0,Z.jsxs)(Ko,{className:`sm:max-w-lg`,showCloseButton:!1,children:[u,f,(0,Z.jsxs)(Jo,{children:[g,b]})]}),t[19]=b,t[20]=g,t[21]=x):x=t[21];let S;return t[22]!==n||t[23]!==x?(S=(0,Z.jsx)(Xo,{open:n,onOpenChange:Wv,children:x}),t[22]=n,t[23]=x,t[24]=S):S=t[24],S}function Wv(){}function Gv(e){return!e.autoSyncOnboardingDismissed&&e.hasRemote===!0&&e.projectLocalSynced===!0&&e.projectSynced===!0&&e.projectLocalConfig!==null&&e.projectLocalConfig.autoSync?.enabled===null&&(e.projectConfig?.autoSync?.default??null)===null&&(e.pushPermissionCheckStatus===`allowed`||e.pushPermissionCheckStatus===`unknown`)}var Kv=5;async function qv(e){let t=await fetch(`/api/backlinks?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=Or.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new qt(Is._({id:`XopE_I`,values:{status:r}}),{status:r})}let r=Nr.safeParse(n);if(!r.success)throw new qt(Is._({id:`lZAiSP`}),{status:t.status});return r.data.backlinks}async function Jv(e){let t=await fetch(`/api/forward-links?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=Or.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new qt(Is._({id:`GemPfn`,values:{status:r}}),{status:r})}let r=wi.safeParse(n);if(!r.success)throw new qt(Is._({id:`2YZwPB`}),{status:t.status});return r.data.forwardLinks}function Yv(e){let t=e.split(`/`);return t.length<=2?e:`…/${t.slice(-2).join(`/`)}`}function Xv(e){window.location.hash=ls(e)}function Zv(e){let t=(0,$.c)(9),{title:n,count:r,isLoading:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)($t,{className:`size-3.5 text-muted-foreground transition-transform group-data-[state=closed]:-rotate-90`}),t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,Z.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[a,(0,Z.jsx)(Mn,{children:n})]}),t[1]=n,t[2]=o);let s;t[3]!==r||t[4]!==i?(s=!i&&(0,Z.jsx)(jn,{children:r}),t[3]=r,t[4]=i,t[5]=s):s=t[5];let c;return t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(ns,{className:`group flex w-full cursor-pointer items-center justify-between px-5 py-3 text-left transition-colors hover:bg-muted/40`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function Qv(e){let t=(0,$.c)(10),{total:n,expanded:r,onToggle:i}=e;if(n<=Kv)return null;let a=n-Kv,o;t[0]===r?o=t[1]:(o=r?(0,Z.jsx)($t,{className:`size-3`}):(0,Z.jsx)(ts,{className:`size-3`}),t[0]=r,t[1]=o);let c;t[2]!==r||t[3]!==a?(c=r?(0,Z.jsx)(s,{id:`6fGjTz`}):(0,Z.jsx)(s,{id:`ZptNUh`,values:{hidden:a}}),t[2]=r,t[3]=a,t[4]=c):c=t[4];let l;return t[5]!==r||t[6]!==i||t[7]!==o||t[8]!==c?(l=(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,className:`mt-2 inline-flex cursor-pointer items-center gap-1 px-3 text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:i,children:[o,c]}),t[5]=r,t[6]=i,t[7]=o,t[8]=c,t[9]=l):l=t[9],l}function $v(e){let t=(0,$.c)(35),{icon:n,iconColorClass:r,rowTooltip:i,title:a,path:o,anchor:c,snippet:l,titleHover:u,ariaLabel:d,href:f,external:p,disabled:m,onClick:h}=e,g=o!==void 0&&o!==a,_=r??`text-muted-foreground`,v;t[0]===_?v=t[1]:(v=Oi(`mt-0.5 shrink-0`,_),t[0]=_,t[1]=v);let y;t[2]!==n||t[3]!==v?(y=(0,Z.jsx)(`span`,{className:v,children:n}),t[2]=n,t[3]=v,t[4]=y):y=t[4];let b=y,x;t[5]!==d||t[6]!==m||t[7]!==p||t[8]!==f||t[9]!==h||t[10]!==a||t[11]!==u?(x=f?(0,Z.jsxs)(`a`,{href:f,target:p?`_blank`:void 0,rel:p?`noopener noreferrer`:void 0,"aria-label":d,title:u,onClick:h,className:`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,children:[a,p?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[` `,(0,Z.jsx)(s,{id:`dbtjJh`})]}):null]}):(0,Z.jsx)(`button`,{type:`button`,"aria-label":d,title:u,disabled:m,onClick:h,className:Oi(`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,`cursor-pointer bg-transparent p-0 disabled:cursor-not-allowed disabled:opacity-60`),children:a}),t[5]=d,t[6]=m,t[7]=p,t[8]=f,t[9]=h,t[10]=a,t[11]=u,t[12]=x):x=t[12];let S=x,C;t[13]===b?C=t[14]:(C=(0,Z.jsx)(`div`,{className:`mt-px flex items-center`,children:b}),t[13]=b,t[14]=C);let w;t[15]!==c||t[16]!==o||t[17]!==g?(w=g?(0,Z.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,children:[o,c?(0,Z.jsxs)(`span`,{className:`ml-1`,children:[`· #`,c]}):null]}):null,t[15]=c,t[16]=o,t[17]=g,t[18]=w):w=t[18];let T;t[19]===l?T=t[20]:(T=l?(0,Z.jsx)(`p`,{className:`line-clamp-2 text-muted-foreground`,children:l}):null,t[19]=l,t[20]=T);let E;t[21]!==S||t[22]!==w||t[23]!==T?(E=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5 text-1sm`,children:[S,w,T]}),t[21]=S,t[22]=w,t[23]=T,t[24]=E):E=t[24];let D;t[25]!==C||t[26]!==E?(D=(0,Z.jsxs)(`div`,{className:`group relative flex items-start gap-2.5 rounded-md px-3 py-2.5 transition-colors hover:bg-muted/80`,children:[C,E]}),t[25]=C,t[26]=E,t[27]=D):D=t[27];let O=D;if(i){let e;t[28]===O?e=t[29]:(e=(0,Z.jsx)($s,{asChild:!0,children:O}),t[28]=O,t[29]=e);let n;t[30]===i?n=t[31]:(n=(0,Z.jsx)(tc,{side:`top`,children:i}),t[30]=i,t[31]=n);let r;return t[32]!==e||t[33]!==n?(r=(0,Z.jsxs)(ic,{children:[e,n]}),t[32]=e,t[33]=n,t[34]=r):r=t[34],r}return O}function ey(e){let t=(0,$.c)(39),{docName:n}=e,{_:r}=i(),{folderPaths:a,pages:o,pagesBySlug:c,pagesByBasename:l,loading:u}=Ts(),d,f;t[0]===n?(d=t[1],f=t[2]):(d=[`backlinks`,n],f=()=>qv(n),t[0]=n,t[1]=d,t[2]=f);let p;t[3]!==n||t[4]!==u||t[5]!==o?(p=!u&&o.has(n),t[3]=n,t[4]=u,t[5]=o,t[6]=p):p=t[6];let m;t[7]!==d||t[8]!==f||t[9]!==p?(m={queryKey:d,queryFn:f,enabled:p},t[7]=d,t[8]=f,t[9]=p,t[10]=m):m=t[10];let{data:h,isLoading:g,error:_}=yn(m),v;t[11]===h?v=t[12]:(v=h===void 0?[]:h,t[11]=h,t[12]=v);let y=v,[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(n);S!==n&&(C(n),x(!1));let w;t[13]!==y||t[14]!==b?(w=b?y:y.slice(0,Kv),t[13]=y,t[14]=b,t[15]=w):w=t[15];let T=w,E;t[16]===r?E=t[17]:(E=r({id:`9NJWgv`}),t[16]=r,t[17]=E);let D;t[18]!==y.length||t[19]!==g||t[20]!==E?(D=(0,Z.jsx)(Zv,{title:E,count:y.length,isLoading:g}),t[18]=y.length,t[19]=g,t[20]=E,t[21]=D):D=t[21];let O;t[22]!==r||t[23]!==y.length||t[24]!==_||t[25]!==b||t[26]!==a||t[27]!==g||t[28]!==o||t[29]!==l||t[30]!==c||t[31]!==T?(O=_?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(_n,{children:_ instanceof Error?_.message:r({id:`Xet9MX`})})}):y.length===0&&!g?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(wn,{children:(0,Z.jsx)(s,{id:`rVxu1k`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:T.map((e,t)=>{let n=fl(e.source,{pages:o,folderPaths:a,pagesBySlug:c,pagesByBasename:l});return(0,Z.jsx)($v,{icon:(0,Z.jsx)(Ge,{className:`size-3.5`}),title:e.title,path:Yv(e.source),titleHover:e.source,anchor:e.anchor,snippet:e.snippet,href:ls(n.hashDocName,e.anchor)},`${e.source}-${t}`)})}),(0,Z.jsx)(Qv,{total:y.length,expanded:b,onToggle:()=>x(ty)})]}),t[22]=r,t[23]=y.length,t[24]=_,t[25]=b,t[26]=a,t[27]=g,t[28]=o,t[29]=l,t[30]=c,t[31]=T,t[32]=O):O=t[32];let k;t[33]!==g||t[34]!==O?(k=(0,Z.jsx)(es,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":g,children:O})}),t[33]=g,t[34]=O,t[35]=k):k=t[35];let A;return t[36]!==k||t[37]!==D?(A=(0,Z.jsxs)(rs,{defaultOpen:!0,children:[D,k]}),t[36]=k,t[37]=D,t[38]=A):A=t[38],A}function ty(e){return!e}function ny(e){let t=(0,$.c)(49),{docName:n}=e,{_:r}=i(),{addPage:a,folderPaths:o,pages:c,pagesBySlug:l,pagesByBasename:u,loading:d}=Ts(),f,p;t[0]===n?(f=t[1],p=t[2]):(f=[`forward-links`,n],p=()=>Jv(n),t[0]=n,t[1]=f,t[2]=p);let m;t[3]!==n||t[4]!==c||t[5]!==d?(m=!d&&c.has(n),t[3]=n,t[4]=c,t[5]=d,t[6]=m):m=t[6];let h;t[7]!==f||t[8]!==p||t[9]!==m?(h={queryKey:f,queryFn:p,enabled:m},t[7]=f,t[8]=p,t[9]=m,t[10]=h):h=t[10];let{data:g,isLoading:_,error:v}=yn(h),y;t[11]===g?y=t[12]:(y=g===void 0?[]:g,t[11]=g,t[12]=y);let b=y,[x,S]=(0,Q.useState)(null),[C,w]=(0,Q.useState)(!1),[T,E]=(0,Q.useState)(n);T!==n&&(E(n),w(!1),S(null));let D;t[13]!==C||t[14]!==b?(D=C?b:b.slice(0,Kv),t[13]=C,t[14]=b,t[15]=D):D=t[15];let O=D,k;t[16]!==r||t[17]!==a||t[18]!==x?(k=async function(e,t){if(!x){S(t);try{await pe(e,{addPage:a,onCreated:Xv}),S(null)}catch(e){let t=e;Ls.error(t instanceof Error?t.message:r({id:`tfi40B`})),S(null)}}},t[16]=r,t[17]=a,t[18]=x,t[19]=k):k=t[19];let A=k,j;t[20]!==r||t[21]!==x||t[22]!==o||t[23]!==A||t[24]!==c||t[25]!==u||t[26]!==l||t[27]!==d?(j=function(e){let{title:t}=e;if(e.kind===`external`){let t=e.title===e.url;return(0,Z.jsx)($v,{icon:(0,Z.jsx)(Vo,{className:`size-3.5`}),rowTooltip:r({id:`XDzAnp`}),title:e.title,path:t?void 0:e.url,titleHover:e.url,snippet:e.snippet,href:e.url,external:!0},`ext:${e.url}`)}let n=V(e.docName,{pages:c,folderPaths:o,pagesBySlug:l,pagesByBasename:u}),i=!d&&n.kind===`create`,a=!d&&n.kind===`navigate`&&n.displayState===`folder`,s=Yv(e.docName),f=e.title===e.docName?s:e.title,p=`doc:${e.docName}:${e.anchor??``}`,m=ls(n.kind===`navigate`?n.hashDocName:e.docName,e.anchor);if(i&&n.kind===`create`){let i={initialDir:n.initialDir,suggestedName:n.suggestedName};return(0,Z.jsx)($v,{icon:(0,Z.jsx)(as,{className:`size-3.5`}),iconColorClass:`text-amber-600 dark:text-amber-400`,rowTooltip:r(x===p?{id:`kj9pAE`}:{id:`IQPyrD`}),ariaLabel:r(x===p?{id:`un8kBM`,values:{linkTitle:t}}:{id:`jEdF24`,values:{linkTitle:t}}),title:f,path:s,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,disabled:x!==null,onClick:()=>void A(i,p)},p)}return a&&n.kind===`navigate`?(0,Z.jsx)($v,{icon:(0,Z.jsx)(eu,{className:`size-3.5`}),iconColorClass:`text-sky-600 dark:text-sky-400`,ariaLabel:r({id:`P6lAT3`,values:{linkTitle:t}}),title:f,path:s,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:m},p):(0,Z.jsx)($v,{icon:(0,Z.jsx)(Ge,{className:`size-3.5`}),title:f,path:s,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:m},p)},t[20]=r,t[21]=x,t[22]=o,t[23]=A,t[24]=c,t[25]=u,t[26]=l,t[27]=d,t[28]=j):j=t[28];let M=j,N;t[29]===r?N=t[30]:(N=r({id:`O0Z2Xr`}),t[29]=r,t[30]=N);let P;t[31]!==_||t[32]!==b.length||t[33]!==N?(P=(0,Z.jsx)(Zv,{title:N,count:b.length,isLoading:_}),t[31]=_,t[32]=b.length,t[33]=N,t[34]=P):P=t[34];let F;t[35]!==r||t[36]!==v||t[37]!==C||t[38]!==_||t[39]!==b.length||t[40]!==M||t[41]!==O?(F=v?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(_n,{children:v instanceof Error?v.message:r({id:`pZAs1T`})})}):b.length===0&&!_?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(wn,{children:(0,Z.jsx)(s,{id:`roiUQQ`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:O.map(M)}),(0,Z.jsx)(Qv,{total:b.length,expanded:C,onToggle:()=>w(ry)})]}),t[35]=r,t[36]=v,t[37]=C,t[38]=_,t[39]=b.length,t[40]=M,t[41]=O,t[42]=F):F=t[42];let I;t[43]!==_||t[44]!==F?(I=(0,Z.jsx)(es,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":_,children:F})}),t[43]=_,t[44]=F,t[45]=I):I=t[45];let L;return t[46]!==P||t[47]!==I?(L=(0,Z.jsxs)(rs,{defaultOpen:!0,children:[P,I]}),t[46]=P,t[47]=I,t[48]=L):L=t[48],L}function ry(e){return!e}function iy(e){let t=(0,$.c)(11),{docName:n,className:r}=e,i=r===void 0?``:r,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(ny,{docName:n}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(so,{}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,Z.jsx)(ey,{docName:n}),t[3]=n,t[4]=s);let c;t[5]!==a||t[6]!==s?(c=(0,Z.jsxs)(On,{className:`px-0 py-0`,children:[a,o,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==i||t[9]!==c?(l=(0,Z.jsx)(Nn,{className:i,children:c}),t[8]=i,t[9]=c,t[10]=l):l=t[10],l}function ay(e){let t=e.setTimer??((e,t)=>setTimeout(e,t)),n=e.clearTimer??(e=>clearTimeout(e)),r=!1,i=!1,a=null,o=null,s=e.baseMs,c=!1,l=n=>{if(!r){if(e.isPaused()){c=!0;return}a=t(u,n)}};async function u(){if(a=null,c=!1,r)return;if(e.isPaused()){c=!0;return}o=new AbortController;let t=o.signal;try{let n=await e.poll(t);if(r)return;n===`ok`?(s=e.baseMs,l(e.baseMs)):(s=Math.min(s*2,e.maxBackoffMs),l(s))}catch{if(r||t.aborted)return;s=Math.min(s*2,e.maxBackoffMs),l(s)}}return{start(){r||i||(i=!0,u())},resume(){r||!e.isPaused()&&c&&a===null&&(c=!1,u())},stop(){r=!0,a!==null&&(n(a),a=null),o?.abort()}}}var oy=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends oy{};function sy(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function cy(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function ly(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function uy(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function dy(e,t){return ly(e,t,``)}function fy(e,t){return uy(e,t,``)}function py(e,t){return t.slice(0,my(e,t))}function my(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function hy(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function gy(e,t){if(t)return vy(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function _y(e,t){if(t)return vy(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function vy(e,t){if(!t)return[_y(e),gy(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=hy(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var yy=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,by=RegExp(`[${yy}]+|\\s+|[^${yy}]`,`ug`);new class extends oy{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=hy(e,r)}else n=e.match(by)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&xy(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&xy(n,i,r,null,t.intlSegmenter),e}};function xy(e,t,n,r,i){if(t&&n){let[a,o]=vy(t.value,i),[s,c]=vy(n.value,i);if(e){let r=sy(a,s);e.value=uy(e.value,s,r),t.value=dy(t.value,r),n.value=dy(n.value,r)}if(r){let e=cy(o,c);r.value=ly(r.value,c,e),t.value=fy(t.value,e),n.value=fy(n.value,e)}}else if(n){if(e){let e=_y(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=_y(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=_y(r.value,i),[a,o]=vy(t.value,i),s=sy(n,a);t.value=dy(t.value,s);let c=cy(dy(n,s),o);t.value=fy(t.value,c),r.value=ly(r.value,n,c),e.value=uy(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=_y(r.value,i),n=py(gy(t.value,i),e);t.value=fy(t.value,n)}else if(e){let n=py(gy(e.value,i),_y(t.value,i));t.value=dy(t.value,n)}}new class extends oy{tokenize(e){let t=RegExp(`(\\r?\\n)|[${yy}]+|[^\\S\\n\\r]+|[^${yy}]`,`ug`);return e.match(t)||[]}};var Sy=new class extends oy{constructor(){super(...arguments),this.tokenize=wy}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
12
+ `);o=s.pop()??``;for(let e of s){if(!e.trim())continue;let n;try{n=JSON.parse(e)}catch{console.warn(`[clone-transport] Dropped unparseable NDJSON line:`,e.slice(0,100));continue}if(n&&typeof n==`object`&&n.type===`error`&&`problem`in n){let e=n.problem;t({type:`error`,message:e?.detail||e?.title||`Unknown error`});break}t(n)}if(n.aborted)break}n.aborted||t({type:`error`,message:`Clone stream ended unexpectedly — check if the clone completed`})}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;t({type:`error`,message:`Clone failed — connection error`})}})()})}}}function ad(e){return{start(t){let n=typeof t.branch==`string`&&t.branch.length>0?t.branch:null;return e.localOp.clone.start({url:t.url,dir:t.dir,branch:n})}}}var od=`ContextMenu`,[sd,cd]=Vs(od,[Da]),ld=Da(),[ud,dd]=sd(od),fd=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:a=!0}=e,[o,s]=Q.useState(!1),c=ld(t),l=Us(r),u=Q.useCallback(e=>{s(e),l(e)},[l]);return(0,Z.jsx)(ud,{scope:t,open:o,onOpenChange:u,modal:a,children:(0,Z.jsx)(yo,{...c,dir:i,open:o,onOpenChange:u,modal:a,children:n})})};fd.displayName=od;var pd=`ContextMenuTrigger`,md=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...i}=e,a=dd(pd,n),o=ld(n),s=Q.useRef({x:0,y:0}),c=Q.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...s.current})}),l=Q.useRef(0),u=Q.useCallback(()=>window.clearTimeout(l.current),[]),d=e=>{s.current={x:e.clientX,y:e.clientY},a.onOpenChange(!0)};return Q.useEffect(()=>u,[u]),Q.useEffect(()=>void(r&&u()),[r,u]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(da,{...o,virtualRef:c}),(0,Z.jsx)(Hs.span,{"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,...i,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:Ws(e.onContextMenu,e=>{u(),d(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:Ws(e.onPointerDown,Ud(e=>{u(),l.current=window.setTimeout(()=>d(e),700)})),onPointerMove:r?e.onPointerMove:Ws(e.onPointerMove,Ud(u)),onPointerCancel:r?e.onPointerCancel:Ws(e.onPointerCancel,Ud(u)),onPointerUp:r?e.onPointerUp:Ws(e.onPointerUp,Ud(u))})]})});md.displayName=pd;var hd=`ContextMenuPortal`,gd=e=>{let{__scopeContextMenu:t,...n}=e,r=ld(t);return(0,Z.jsx)(za,{...r,...n})};gd.displayName=hd;var _d=`ContextMenuContent`,vd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=dd(_d,n),a=ld(n),o=Q.useRef(!1);return(0,Z.jsx)(Ro,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});vd.displayName=_d;var yd=`ContextMenuGroup`,bd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(Zi,{...i,...r,ref:t})});bd.displayName=yd;var xd=`ContextMenuLabel`,Sd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(Fa,{...i,...r,ref:t})});Sd.displayName=xd;var Cd=`ContextMenuItem`,wd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(La,{...i,...r,ref:t})});wd.displayName=Cd;var Td=`ContextMenuCheckboxItem`,Ed=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(ka,{...i,...r,ref:t})});Ed.displayName=Td;var Dd=`ContextMenuRadioGroup`,Od=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(sa,{...i,...r,ref:t})});Od.displayName=Dd;var kd=`ContextMenuRadioItem`,Ad=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(ha,{...i,...r,ref:t})});Ad.displayName=kd;var jd=`ContextMenuItemIndicator`,Md=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(la,{...i,...r,ref:t})});Md.displayName=jd;var Nd=`ContextMenuSeparator`,Pd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(pa,{...i,...r,ref:t})});Pd.displayName=Nd;var Fd=`ContextMenuArrow`,Id=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(_a,{...i,...r,ref:t})});Id.displayName=Fd;var Ld=`ContextMenuSub`,Rd=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=ld(t),[s,c]=Ks({prop:i,defaultProp:a??!1,onChange:r,caller:Ld});return(0,Z.jsx)(Ua,{...o,open:s,onOpenChange:c,children:n})};Rd.displayName=Ld;var zd=`ContextMenuSubTrigger`,Bd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(Ga,{...i,...r,ref:t})});Bd.displayName=zd;var Vd=`ContextMenuSubContent`,Hd=Q.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=ld(n);return(0,Z.jsx)(Va,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Hd.displayName=Vd;function Ud(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Wd=fd,Gd=md,Kd=gd,qd=vd,Jd=bd,Yd=Sd,Xd=wd,Zd=Ed,Qd=Md,$d=Pd,ef=Rd,tf=Bd,nf=Hd,rf=`Tabs`,[af,of]=Vs(rf,[dc]),sf=dc(),[cf,lf]=af(rf),uf=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=Js(s),[d,f]=Ks({prop:r,onChange:i,defaultProp:a??``,caller:rf});return(0,Z.jsx)(cf,{scope:n,baseId:Bs(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,Z.jsx)(Hs.div,{dir:u,"data-orientation":o,...l,ref:t})})});uf.displayName=rf;var df=`TabsList`,ff=Q.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=lf(df,n),o=sf(n);return(0,Z.jsx)(uc,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,Z.jsx)(Hs.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});ff.displayName=df;var pf=`TabsTrigger`,mf=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=lf(pf,n),s=sf(n),c=_f(o.baseId,r),l=vf(o.baseId,r),u=r===o.value;return(0,Z.jsx)(fc,{asChild:!0,...s,focusable:!i,active:u,children:(0,Z.jsx)(Hs.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Ws(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:Ws(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:Ws(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});mf.displayName=pf;var hf=`TabsContent`,gf=Q.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=lf(hf,n),c=_f(s.baseId,r),l=vf(s.baseId,r),u=r===s.value,d=Q.useRef(u);return Q.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,Z.jsx)(Gs,{present:i||u,children:({present:n})=>(0,Z.jsx)(Hs.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});gf.displayName=hf;function _f(e,t){return`${e}-trigger-${t}`}function vf(e,t){return`${e}-content-${t}`}var yf=uf,bf=ff,xf=mf,Sf=gf;function Cf(){let e=(0,$.c)(4),[t,n]=(0,Q.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=window.okDesktop;if(!e)return;let t=!1;return e.state.query().then(e=>{t||n(e.channel)}).catch(wf),()=>{t=!0}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={channel:t},e[2]=t,e[3]=a),a}function wf(e){console.warn(`[use-update-channel] bridge.state.query() failed`,e)}function Tf(e){let t=(0,$.c)(6),{className:n}=e,{_:r}=i(),{channel:a}=Cf();if(a!==`beta`)return null;let o;t[0]===r?o=t[1]:(o=r({id:`9fhQRL`}),t[0]=r,t[1]=o);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(s,{id:`cSCbv3`}),t[2]=c):c=t[2];let l;return t[3]!==n||t[4]!==o?(l=(0,Z.jsx)(le,{variant:`secondary`,"aria-label":o,"data-testid":`beta-badge`,className:n,children:c}),t[3]=n,t[4]=o,t[5]=l):l=t[5],l}function Ef(e){switch(e){case`receiving`:return{id:`qbfj1f`};case`resolving`:return{id:`adsMWO`};case`checking`:return{id:`1HBhDS`};case`init`:return{id:`LlHqdU`};case`done`:return{id:`bD8I7O`};default:return{id:`25Pw6a`}}}function Df(e){let t=e.trim();if(/^[\w.-]+\/[\w.-]+$/.test(t))return t.split(`/`)[1];try{return new URL(t.replace(/^git@([^:]+):/,`https://$1/`)).pathname.replace(/\.git$/,``).split(`/`).pop()??`repo`}catch{return t.split(`/`).pop()?.replace(/\.git$/,``)??`repo`}}function Of(e){let t=(0,$.c)(100),{open:n,onOpenChange:r,onSignIn:a,onCloneComplete:o,transport:c,authQueryTransport:l,pickParentFolder:u,initialUrl:d}=e,{_:f}=i(),p;t[0]===c?p=t[1]:(p=c??id(),t[0]=c,t[1]=p);let m=p,h;t[2]===l?h=t[3]:(h=l??Eo(),t[2]=l,t[3]=h);let g=h,_=u!==void 0,[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(``),[S,C]=(0,Q.useState)(null),[w,T]=(0,Q.useState)(!1),E;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=xa(),t[4]=E):E=t[4];let[D,k]=(0,Q.useState)(E),[A,j]=(0,Q.useState)(!1),[M,N]=(0,Q.useState)(!1),[P,I]=(0,Q.useState)(-1),L=(0,Q.useRef)(null),R=(0,Q.useRef)(null),z=(0,Q.useRef)(null),B=(0,Q.useId)(),V;t[5]!==n||t[6]!==g?(V=()=>{if(!n)return;let e=!1;return g.status().then(t=>{Ta(t.authenticated),e||k(t.authenticated)}).catch(()=>{e||k(!1)}),()=>{e=!0}},t[5]=n,t[6]=g,t[7]=V):V=t[7];let H;t[8]===n?H=t[9]:(H=[n],t[8]=n,t[9]=H),(0,Q.useEffect)(V,H);let U;t[10]!==D||t[11]!==n||t[12]!==g?(U=()=>{if(!D||!n)return;let e=!1;return T(!0),g.repos().then(t=>{e||(C(t.ok?t.repos:[]),T(!1))}).catch(()=>{e||(C([]),T(!1))}),()=>{e=!0}},t[10]=D,t[11]=n,t[12]=g,t[13]=U):U=t[13];let W;t[14]!==D||t[15]!==n?(W=[D,n],t[14]=D,t[15]=n,t[16]=W):W=t[16],(0,Q.useEffect)(U,W);let G,K;t[17]!==d||t[18]!==n||t[19]!==_?(G=()=>{if(!n||!d||(y(d),_))return;let e=Df(d);e&&x(`~/Documents/${e}`)},K=[n,d,_],t[17]=d,t[18]=n,t[19]=_,t[20]=G,t[21]=K):(G=t[20],K=t[21]),(0,Q.useEffect)(G,K);let q,J;t[22]!==P||t[23]!==B?(q=()=>{P<0||document.getElementById(`${B}-opt-${P}`)?.scrollIntoView({block:`nearest`})},J=[P,B],t[22]=P,t[23]=B,t[24]=q,t[25]=J):(q=t[24],J=t[25]),(0,Q.useEffect)(q,J);let ee;t[26]===_?ee=t[27]:(ee=function(e){if(y(e),N(!0),I(-1),_)return;let t=Df(e);t&&x(`~/Documents/${t}`)},t[26]=_,t[27]=ee);let Y=ee,te;t[28]===_?te=t[29]:(te=function(e){if(y(e.clone_url),_)return;let t=e.full_name.split(`/`)[1];x(`~/Documents/${t}`)},t[28]=_,t[29]=te);let X=te,ne;t[30]!==f||t[31]!==b||t[32]!==o||t[33]!==r||t[34]!==u||t[35]!==m||t[36]!==v?(ne=async function(){let e=v.trim();if(!e){Ls.error(f({id:`FTUGgh`}));return}let t=b||``;if(u){j(!0);let n=await u();if(!n){j(!1);return}let r=Df(e);t=`${n.replace(/\/$/,``)}/${r}`}else j(!0);let n=Ls.loading(f({id:`2tgFCe`}),{duration:1/0});R.current=n;let i=m.start({url:e,dir:t});L.current=i.cancel;try{let e=i.events[Symbol.asyncIterator](),t=await e.next();for(;!t.done;){let i=t.value;if(i.type===`progress`){let e=f(Ef(i.phase));Ls.loading(`${e} — ${i.pct}%`,{id:n})}else if(i.type===`complete`){Ls.success(f({id:`u_lS4C`}),{id:n}),r(!1),j(!1),L.current=null;let e=`port`in i?i.port:void 0;o?o({port:e,dir:i.dir}):e!==void 0&&(window.location.href=`http://localhost:${e}`);return}else if(i.type===`error`){let e=i.message;Ls.error(f({id:`eFJkVt`,values:{cloneError:e}}),{id:n}),j(!1),L.current=null;return}t=await e.next()}Ls.error(f({id:`Tz9pJB`}),{id:n}),j(!1),L.current=null}catch(e){console.error(`[CloneDialog] clone iteration failed:`,e),Ls.error(f({id:`K9J00P`}),{id:n}),j(!1),L.current=null}},t[30]=f,t[31]=b,t[32]=o,t[33]=r,t[34]=u,t[35]=m,t[36]=v,t[37]=ne):ne=t[37];let ie=ne,ae;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(ae=function(){L.current?.(),L.current=null,j(!1),Ls.dismiss(R.current??void 0)},t[38]=ae):ae=t[38];let oe=ae,se;t[39]!==A||t[40]!==r||t[41]!==_?(se=function(e){A||(r(e),e||(y(``),_||x(``),N(!1),I(-1)))},t[39]=A,t[40]=r,t[41]=_,t[42]=se):se=t[42];let ce=se,le;t[43]===X?le=t[44]:(le=function(e){X(e),N(!1),I(-1),z.current?.focus()},t[43]=X,t[44]=le);let ue=le,de=D===null||w&&S===null,fe;if(t[45]!==S||t[46]!==v){let e=v.trim().toLowerCase(),n;t[48]===S?n=t[49]:(n=S??[],t[48]=S,t[49]=n),fe=n.filter(t=>`${t.full_name} ${t.clone_url}`.toLowerCase().includes(e)),t[45]=S,t[46]=v,t[47]=fe}else fe=t[47];let pe=fe,me;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(me=/:\/\/|^git@|\.git$/i,t[50]=me):me=t[50];let he;t[51]===v?he=t[52]:(he=me.test(v.trim()),t[51]=v,t[52]=he);let ge=he,_e=D===!0&&S!==null&&pe.length===0&&!ge,ve=M&&D!==!1&&!A&&(de||pe.length>0||_e),ye=pe.length,be=`${B}-loading`,xe,Se;t[53]===ye?(xe=t[54],Se=t[55]):(xe=()=>{I(e=>e>=ye?ye-1:e)},Se=[ye],t[53]=ye,t[54]=xe,t[55]=Se),(0,Q.useEffect)(xe,Se);let Ce;t[56]!==P||t[57]!==A||t[58]!==ve||t[59]!==ue||t[60]!==pe?(Ce=function(e){if(!A)if(e.key===`ArrowDown`){if(e.preventDefault(),!ve){N(!0);return}I(e=>Math.min(e+1,pe.length-1))}else e.key===`ArrowUp`?(e.preventDefault(),I(Pf)):e.key===`Enter`?ve&&P>=0&&P<pe.length&&(e.preventDefault(),ue(pe[P])):e.key===`Escape`&&ve&&(e.preventDefault(),e.stopPropagation(),N(!1),I(-1))},t[56]=P,t[57]=A,t[58]=ve,t[59]=ue,t[60]=pe,t[61]=Ce):Ce=t[61];let we=Ce,Te;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Z.jsx)(Yo,{children:(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`VdXv4D`})})}),t[62]=Te):Te=t[62];let Ee;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,Z.jsx)(`label`,{htmlFor:`clone-source`,className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`IreQBq`})}),t[63]=Ee):Ee=t[63];let De;t[64]!==f||t[65]!==P||t[66]!==A||t[67]!==we||t[68]!==Y||t[69]!==D||t[70]!==B||t[71]!==be||t[72]!==a||t[73]!==ve||t[74]!==de||t[75]!==S||t[76]!==ue||t[77]!==pe||t[78]!==v?(De=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Ee,D===!1?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)($o,{id:`clone-source`,placeholder:f({id:`Xv_ijG`}),value:v,onChange:e=>Y(e.target.value),disabled:A}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-1sm text-muted-foreground`,children:[(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`9oE4C3`})}),(0,Z.jsx)(Ai,{variant:`link`,className:`h-auto p-0`,onClick:()=>a?.(),disabled:A,children:(0,Z.jsx)(s,{id:`3jod3l`})})]})]}):(0,Z.jsxs)(re,{open:ve,onOpenChange:N,children:[(0,Z.jsx)(O,{asChild:!0,children:(0,Z.jsx)($o,{id:`clone-source`,ref:z,role:`combobox`,"aria-expanded":ve,"aria-controls":ve?de?be:B:void 0,"aria-activedescendant":P>=0?`${B}-opt-${P}`:void 0,"aria-autocomplete":`list`,autoComplete:`off`,placeholder:f({id:`R0jJzV`}),value:v,onChange:e=>Y(e.target.value),onFocus:()=>N(!0),onKeyDown:we,disabled:A})}),(0,Z.jsx)(F,{align:`start`,sideOffset:4,className:`w-(--radix-popover-trigger-width) max-h-56 overflow-y-auto overscroll-y-contain subtle-scrollbar p-0`,onOpenAutoFocus:Nf,onCloseAutoFocus:Mf,onInteractOutside:e=>{z.current?.contains(e.target)&&e.preventDefault()},onWheel:jf,onTouchMove:Af,children:de?(0,Z.jsxs)(`output`,{id:be,className:`flex flex-col gap-1.5 px-3 py-2`,"aria-label":f({id:`8XQRON`}),children:[(0,Z.jsx)(ya,{className:`h-4 w-2/3`}),(0,Z.jsx)(ya,{className:`h-4 w-1/2`}),(0,Z.jsx)(ya,{className:`h-4 w-3/4`}),(0,Z.jsx)(ya,{className:`h-4 w-2/5`})]}):(0,Z.jsx)(`div`,{id:B,role:`listbox`,"aria-label":f({id:`KX1MZR`}),className:`py-1`,children:pe.length===0?(0,Z.jsx)(`div`,{role:`presentation`,className:`px-3 py-2 text-xs text-muted-foreground`,children:S&&S.length===0?(0,Z.jsx)(s,{id:`cOSAfL`}):(0,Z.jsx)(s,{id:`8eW0WQ`})}):pe.map((e,t)=>(0,Z.jsxs)(`div`,{id:`${B}-opt-${t}`,role:`option`,tabIndex:-1,"aria-selected":t===P,onMouseDown:kf,onMouseEnter:()=>I(t),onClick:()=>ue(e),className:Oi(`flex cursor-default items-center gap-2 px-3 py-1.5 text-sm`,t===P&&`bg-accent text-accent-foreground`),children:[e.private?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(du,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`n5n_vi`})})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(bs,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`NuH1jp`})})]}),(0,Z.jsx)(`span`,{className:`truncate`,children:e.full_name})]},e.full_name))})})]})]}),t[64]=f,t[65]=P,t[66]=A,t[67]=we,t[68]=Y,t[69]=D,t[70]=B,t[71]=be,t[72]=a,t[73]=ve,t[74]=de,t[75]=S,t[76]=ue,t[77]=pe,t[78]=v,t[79]=De):De=t[79];let Oe;t[80]!==A||t[81]!==b||t[82]!==_?(Oe=!_&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{htmlFor:`clone-path`,className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`Gp_twO`})}),(0,Z.jsx)($o,{id:`clone-path`,placeholder:`~/Documents/repo-name`,value:b,onChange:e=>x(e.target.value),disabled:A})]}),t[80]=A,t[81]=b,t[82]=_,t[83]=Oe):Oe=t[83];let ke;t[84]!==De||t[85]!==Oe?(ke=(0,Z.jsx)(qo,{children:(0,Z.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[De,Oe]})}),t[84]=De,t[85]=Oe,t[86]=ke):ke=t[86];let Ae;t[87]!==A||t[88]!==ie||t[89]!==ce||t[90]!==v||t[91]!==_?(Ae=(0,Z.jsx)(Jo,{children:A?(0,Z.jsx)(Ai,{variant:`outline`,className:`font-mono uppercase`,onClick:oe,children:(0,Z.jsx)(s,{id:`dEgA5A`})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Ai,{variant:`outline`,className:`font-mono uppercase`,onClick:()=>ce(!1),children:(0,Z.jsx)(s,{id:`dEgA5A`})}),(0,Z.jsx)(Ai,{onClick:()=>void ie(),disabled:!v.trim(),"aria-describedby":_?`clone-picker-hint`:void 0,children:(0,Z.jsx)(s,{id:`9UQ730`})}),_&&(0,Z.jsx)(`span`,{id:`clone-picker-hint`,className:`sr-only`,children:(0,Z.jsx)(s,{id:`EvPX7f`})})]})}),t[87]=A,t[88]=ie,t[89]=ce,t[90]=v,t[91]=_,t[92]=Ae):Ae=t[92];let je;t[93]!==ke||t[94]!==Ae?(je=(0,Z.jsxs)(Ko,{className:`sm:max-w-lg`,children:[Te,ke,Ae]}),t[93]=ke,t[94]=Ae,t[95]=je):je=t[95];let Me;return t[96]!==ce||t[97]!==n||t[98]!==je?(Me=(0,Z.jsx)(Xo,{open:n,onOpenChange:ce,children:je}),t[96]=ce,t[97]=n,t[98]=je,t[99]=Me):Me=t[99],Me}function kf(e){return e.preventDefault()}function Af(e){return e.stopPropagation()}function jf(e){return e.stopPropagation()}function Mf(e){return e.preventDefault()}function Nf(e){return e.preventDefault()}function Pf(e){return Math.max(e-1,-1)}var Ff=(0,Q.lazy)(()=>n(()=>import(`./ConsentDialogBody-CPn5k8Yj.js`),__vite__mapDeps([5,1,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url));function If(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(gc.subscribe,Rf,Lf))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(Ff,{})}),e[0]=t):t=e[0],t}function Lf(){return!1}function Rf(){return gc.getSnapshot()!==null}var zf=180,Bf=5e3;function Vf(e,t){if(e===``||t===``)return``;let n=e.includes(`\\`)&&!e.includes(`/`)?`\\`:`/`;return`${e.replace(/[/\\]+$/,``)}${n}${t}`}function Hf(e){if(e===``)return``;let t=e.split(/[/\\]/).filter(Boolean);return t.length>0?t[t.length-1]??e:e}function Uf(e){let{parent:t,sanitizedName:n,enclosingProject:r,enclosingGit:i,targetState:a}=e;return t===``||n===``?{kind:`idle`}:r===null?i===null?a===`exists-nonempty`?{kind:`block-nonempty`}:{kind:`free`}:{kind:`confirm-git`,gitRoot:i.gitRoot}:{kind:`block-nested`,rootPath:r.rootPath}}function Wf(e){let t=e instanceof Error?e.message:String(e);for(let e of kr)if(t.startsWith(`${e}:`)||t.includes(`${e}: `))return e===`nested-project`||e===`target-not-empty`?{reason:e}:{reason:e,message:t};return{reason:`unknown`,message:t}}function Gf(e){switch(e.reason){case`nested-project`:return{id:`ScwcF2`};case`target-not-empty`:return{id:`e8L17t`};case`invalid-args`:return{id:`6bTTAN`};case`mkdir-failed`:return{id:`gJR87V`};case`git-init-failed`:return{id:`4CfgPM`};case`init-failed`:return{id:`l17ab4`};case`discovery-failed`:return{id:`ThmUrC`};case`unknown`:return{id:`AddR83`}}}function Kf(e){let t=(0,$.c)(180),{open:n,onOpenChange:r,bridge:a}=e,{_:o}=i(),c=(0,Q.useId)(),l=(0,Q.useId)(),u=(0,Q.useId)(),d=(0,Q.useId)(),[f,p]=(0,Q.useState)(``),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(``),[v,y]=(0,Q.useState)($f),[b,x]=(0,Q.useState)(`shared`),[S,C]=(0,Q.useState)(!1),w;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(w={kind:`idle`},t[0]=w):w=t[0];let[T,E]=(0,Q.useState)(w),[D,O]=(0,Q.useState)(`idle`),[k,A]=(0,Q.useState)(!1),[j,M]=(0,Q.useState)(null),N;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(N={kind:`idle`},t[1]=N):N=t[1];let[P,F]=(0,Q.useState)(N),[I,L]=(0,Q.useState)(0),R;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(R=new Set,t[2]=R):R=t[2];let z=(0,Q.useRef)(R),B=(0,Q.useRef)(null),V=(0,Q.useRef)(null),H=(0,Q.useRef)(null),U=(0,Q.useRef)(0),W,G;t[3]!==a||t[4]!==n?(W=()=>{if(!n)return;z.current.clear(),M(null),E({kind:`idle`}),O(`idle`),A(!1),_(``),y(new Set(Hr)),x(`shared`),C(!1),F({kind:`idle`}),U.current+=1;let e=!1;p(``),h(!0),a.fs.defaultProjectsRoot().then(t=>{e||p(t)}).catch(Qf).finally(()=>{e||h(!1)});let t=requestAnimationFrame(()=>{H.current?.focus()});return()=>{e=!0,cancelAnimationFrame(t)}},G=[n,a],t[3]=a,t[4]=n,t[5]=W,t[6]=G):(W=t[5],G=t[6]),(0,Q.useEffect)(W,G);let K;t[7]!==a||t[8]!==f||t[9]!==g||t[10]!==n?(K=()=>{if(!n)return;V.current!==null&&clearTimeout(V.current),B.current!==null&&B.current.abort();let e=Fr(g);if(f===``||e===``){E({kind:`idle`}),O(`idle`);return}let t=f,r=Vf(t,e),i=new AbortController;return B.current=i,V.current=setTimeout(()=>{O(`in-flight`),Promise.all([a.fs.findEnclosingProjectRoot(t),a.fs.findEnclosingGitRoot(t),a.fs.folderState(r)]).then(n=>{let[r,a,o]=n;i.signal.aborted||(O(`idle`),E(Uf({parent:t,sanitizedName:e,enclosingProject:r,enclosingGit:a,targetState:o})))}).catch(e=>{i.signal.aborted||(console.warn(`[CreateProjectDialog] cascade probe failed:`,e),O(`idle`),E({kind:`free`}))})},zf),()=>{V.current!==null&&clearTimeout(V.current),i.abort()}},t[7]=a,t[8]=f,t[9]=g,t[10]=n,t[11]=K):K=t[11];let q;t[12]!==a||t[13]!==f||t[14]!==g||t[15]!==n||t[16]!==I?(q=[n,f,g,a,I],t[12]=a,t[13]=f,t[14]=g,t[15]=n,t[16]=I,t[17]=q):q=t[17],(0,Q.useEffect)(K,q);let J,ee;t[18]===n?(J=t[19],ee=t[20]):(J=()=>{if(!n)return;let e=()=>L(Zf);return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},ee=[n],t[18]=n,t[19]=J,t[20]=ee),(0,Q.useEffect)(J,ee);let Y=(0,Q.useRef)(`idle`),te,X;t[21]===D?(te=t[22],X=t[23]):(te=()=>{Y.current=D},X=[D],t[21]=D,t[22]=te,t[23]=X),(0,Q.useEffect)(te,X);let ne,re;t[24]!==T.kind||t[25]!==n?(ne=()=>{if(!n||T.kind!==`confirm-git`)return;let e=setInterval(()=>{Y.current!==`in-flight`&&L(Xf)},Bf);return()=>clearInterval(e)},re=[n,T.kind],t[24]=T.kind,t[25]=n,t[26]=ne,t[27]=re):(ne=t[26],re=t[27]),(0,Q.useEffect)(ne,re);let ie;t[28]!==T.gitRoot||t[29]!==T.kind||t[30]!==P.gitRoot||t[31]!==P.kind?(ie=()=>{if(T.kind!==`confirm-git`){P.kind!==`idle`&&(U.current+=1,F({kind:`idle`}));return}P.kind===`confirming`&&P.gitRoot!==T.gitRoot&&F({kind:`idle`}),P.kind===`pending`&&P.gitRoot!==T.gitRoot&&(U.current+=1,F({kind:`idle`}))},t[28]=T.gitRoot,t[29]=T.kind,t[30]=P.gitRoot,t[31]=P.kind,t[32]=ie):ie=t[32];let ae;t[33]!==T||t[34]!==P?(ae=[T,P],t[33]=T,t[34]=P,t[35]=ae):ae=t[35],(0,Q.useEffect)(ie,ae);let oe;t[36]!==a||t[37]!==T.kind||t[38]!==n?(oe=()=>{if(!n)return;let e=null;T.kind===`block-nested`?e=`nested`:T.kind===`block-nonempty`?e=`nonempty`:T.kind===`confirm-git`&&(e=`git-confirm`),e!==null&&(z.current.has(e)||(z.current.add(e),a.project.recordCreateNewBannerShown(e).catch(Yf)))},t[36]=a,t[37]=T.kind,t[38]=n,t[39]=oe):oe=t[39];let se;t[40]!==a||t[41]!==T||t[42]!==n?(se=[n,T,a],t[40]=a,t[41]=T,t[42]=n,t[43]=se):se=t[43],(0,Q.useEffect)(oe,se);let ce=g,le,ue,de,fe,pe;t[44]!==T.kind||t[45]!==f||t[46]!==ce?(fe=ce===``?``:Fr(ce),ue=ce!==``&&fe!==ce&&fe!==``,de=ce!==``&&fe===``,le=T.kind===`block-nonempty`,pe=f!==``&&fe!==``?Vf(f,fe):``,t[44]=T.kind,t[45]=f,t[46]=ce,t[47]=le,t[48]=ue,t[49]=de,t[50]=fe,t[51]=pe):(le=t[47],ue=t[48],de=t[49],fe=t[50],pe=t[51]);let me=pe,he=!k&&f!==``&&ce!==``&&fe!==``&&D===`idle`&&(T.kind===`free`||T.kind===`confirm-git`),ge=k||ce!==``&&!he,_e;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(_e=function(e){y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[52]=_e):_e=t[52];let ve=_e,ye;t[53]!==a||t[54]!==f?(ye=async function(){try{let e=await a.dialog.openFolder(f===``?void 0:{defaultPath:f});if(e===null)return;p(e),L(Jf),M(null)}catch(e){console.warn(`[CreateProjectDialog] dialog.openFolder failed:`,e)}},t[53]=a,t[54]=f,t[55]=ye):ye=t[55];let be=ye,xe;t[56]!==o||t[57]!==a||t[58]!==k||t[59]!==he||t[60]!==v||t[61]!==f||t[62]!==r||t[63]!==ce||t[64]!==fe||t[65]!==b?(xe=async function(e){if(e.preventDefault(),!k){if(ce.trim()===``){Ls.error(o({id:`5OqaJi`})),H.current?.focus();return}if(he){A(!0),M(null);try{await a.project.createNew({parent:f,name:fe,editors:Array.from(v),sharing:b}),r(!1)}catch(e){M(Wf(e)),A(!1)}}}},t[56]=o,t[57]=a,t[58]=k,t[59]=he,t[60]=v,t[61]=f,t[62]=r,t[63]=ce,t[64]=fe,t[65]=b,t[66]=xe):xe=t[66];let Se=xe,Ce;t[67]!==k||t[68]!==r?(Ce=function(e){k||r(e)},t[67]=k,t[68]=r,t[69]=Ce):Ce=t[69];let we=Ce,Te;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(Te=async function(e){F({kind:`confirming`,gitRoot:e})},t[70]=Te):Te=t[70];let Ee=Te,De;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(De=async function(){F({kind:`idle`})},t[71]=De):De=t[71];let Oe=De,ke;t[72]===a?ke=t[73]:(ke=async function(e){let t=U.current+1;U.current=t,F({kind:`pending`,gitRoot:e});try{if(await a.fs.removeGitFolder(e),U.current!==t)return;L(qf),F({kind:`idle`})}catch(e){let n=e;if(U.current!==t)return;let r=n instanceof Error?n.message:String(n);console.error(`[CreateProjectDialog] bridge.fs.removeGitFolder failed:`,n),F({kind:`error`,message:r})}},t[72]=a,t[73]=ke);let Ae=ke,je;t[74]!==a||t[75]!==r?(je=async function(e){r(!1);try{await a.project.open({path:e,target:`new-window`,entryPoint:`create-new-nested-redirect`})}catch(e){console.warn(`[CreateProjectDialog] project.open failed:`,e)}},t[74]=a,t[75]=r,t[76]=je):je=t[76];let Me=je,Ne=de||le||ue?`${u} ${d}`:u,Pe;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(Pe=(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`wbv9xO`})}),t[77]=Pe):Pe=t[77];let Fe;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,Z.jsxs)(Yo,{children:[Pe,(0,Z.jsx)(Wo,{children:(0,Z.jsx)(s,{id:`O6yEPk`})})]}),t[78]=Fe):Fe=t[78];let Ie;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,Z.jsx)(s,{id:`OyIC0Q`}),t[79]=Ie):Ie=t[79];let Le;t[80]===l?Le=t[81]:(Le=(0,Z.jsx)(cc,{htmlFor:l,children:Ie}),t[80]=l,t[81]=Le);let Re;t[82]===o?Re=t[83]:(Re=o({id:`cV7LOw`}),t[82]=o,t[83]=Re);let ze;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(ze=e=>_(e.target.value),t[84]=ze):ze=t[84];let Be=de||le,Ve;t[85]!==k||t[86]!==g||t[87]!==Ne||t[88]!==l||t[89]!==Re||t[90]!==Be?(Ve=(0,Z.jsx)($o,{id:l,ref:H,value:g,placeholder:Re,onChange:ze,disabled:k,autoComplete:`off`,"aria-invalid":Be,"aria-describedby":Ne,"data-testid":`create-name`}),t[85]=k,t[86]=g,t[87]=Ne,t[88]=l,t[89]=Re,t[90]=Be,t[91]=Ve):Ve=t[91];let He;t[92]!==d||t[93]!==le||t[94]!==ue||t[95]!==de||t[96]!==fe?(He=de?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-erased`,children:(0,Z.jsx)(s,{id:`_PBJRl`})}):le?(0,Z.jsx)(`p`,{id:d,role:`alert`,className:`text-1sm text-destructive`,"data-testid":`create-name-error-taken`,children:(0,Z.jsx)(s,{id:`7apDiJ`,values:{sanitized:fe},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):ue?(0,Z.jsx)(`p`,{id:d,role:`status`,"aria-live":`polite`,className:`text-1sm text-muted-foreground`,"data-testid":`create-name-hint-diverged`,children:(0,Z.jsx)(s,{id:`KnoB--`,values:{sanitized:fe},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}):null,t[92]=d,t[93]=le,t[94]=ue,t[95]=de,t[96]=fe,t[97]=He):He=t[97];let Ue;t[98]!==Le||t[99]!==Ve||t[100]!==He?(Ue=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[Le,Ve,He]}),t[98]=Le,t[99]=Ve,t[100]=He,t[101]=Ue):Ue=t[101];let We;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,Z.jsx)(cc,{children:(0,Z.jsx)(s,{id:`wJijgU`})}),t[102]=We):We=t[102];let Ge;t[103]!==f||t[104]!==m?(Ge=f===``?m?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`iHAJDj`})}):(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`8m8diM`})}):f,t[103]=f,t[104]=m,t[105]=Ge):Ge=t[105];let Ke;t[106]===Ge?Ke=t[107]:(Ke=(0,Z.jsx)(`div`,{className:`min-w-0 flex-1 rounded-md border border-input bg-muted/50 px-2.5 py-1 text-sm text-foreground wrap-break-word`,"data-testid":`create-location-display`,children:Ge}),t[106]=Ge,t[107]=Ke);let qe;t[108]===be?qe=t[109]:(qe=()=>void be(),t[108]=be,t[109]=qe);let Je;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,Z.jsx)(s,{id:`O2UpM1`}),t[110]=Je):Je=t[110];let Ye;t[111]!==k||t[112]!==qe?(Ye=(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,className:`shrink-0`,disabled:k,onClick:qe,"data-testid":`create-browse`,children:Je}),t[111]=k,t[112]=qe,t[113]=Ye):Ye=t[113];let Xe;t[114]!==Ke||t[115]!==Ye?(Xe=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Ke,Ye]}),t[114]=Ke,t[115]=Ye,t[116]=Xe):Xe=t[116];let Ze;t[117]===me?Ze=t[118]:(Ze=me===``?null:(0,Z.jsx)(s,{id:`k_yIIc`,values:{targetPreview:me},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}}),t[117]=me,t[118]=Ze);let Qe;t[119]!==u||t[120]!==Ze?(Qe=(0,Z.jsx)(`p`,{id:u,className:`text-1sm text-muted-foreground wrap-break-word`,"aria-live":`polite`,"data-testid":`create-target-caption`,children:Ze}),t[119]=u,t[120]=Ze,t[121]=Qe):Qe=t[121];let $e;t[122]!==Xe||t[123]!==Qe?($e=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[We,Xe,Qe]}),t[122]=Xe,t[123]=Qe,t[124]=$e):$e=t[124];let et;t[125]!==T||t[126]!==Ae||t[127]!==Me||t[128]!==P?(et=(0,Z.jsx)(ep,{cascade:T,onOpenNested:Me,removeGitState:P,onRequestRemoveGit:Ee,onCancelRemoveGit:Oe,onConfirmRemoveGit:Ae}),t[125]=T,t[126]=Ae,t[127]=Me,t[128]=P,t[129]=et):et=t[129];let tt;t[130]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,Z.jsxs)(ns,{className:`group flex w-full items-center justify-between gap-2 px-3 py-2 text-sm font-medium hover:bg-muted/50`,"data-testid":`create-advanced-trigger`,children:[(0,Z.jsx)(s,{id:`VNgKZz`}),(0,Z.jsx)(ts,{className:`size-4 transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`,"aria-hidden":!0})]}),t[130]=tt):tt=t[130];let nt;t[131]===Symbol.for(`react.memo_cache_sentinel`)?(nt=(0,Z.jsx)(`legend`,{className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`0YEbfk`})}),t[131]=nt):nt=t[131];let rt;t[132]===Symbol.for(`react.memo_cache_sentinel`)?(rt=(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`8IP5jY`})}),t[132]=rt):rt=t[132];let it;t[133]!==k||t[134]!==v?(it=Hr.map(e=>{let t=`create-editor-${e}`;return(0,Z.jsxs)(cc,{htmlFor:t,className:`text-sm font-normal`,children:[(0,Z.jsx)(lc,{id:t,checked:v.has(e),onCheckedChange:()=>ve(e),disabled:k,"data-testid":`create-editor-${e}`}),(0,Z.jsx)(`span`,{children:lr[e]})]},e)}),t[133]=k,t[134]=v,t[135]=it):it=t[135];let at;t[136]===it?at=t[137]:(at=(0,Z.jsxs)(`fieldset`,{className:`flex flex-col space-y-2 pb-2`,children:[nt,rt,it]}),t[136]=it,t[137]=at);let ot;t[138]!==k||t[139]!==b?(ot=(0,Z.jsx)(vc,{idPrefix:`create`,testIdPrefix:`create-sharing`,value:b,onValueChange:x,disabled:k}),t[138]=k,t[139]=b,t[140]=ot):ot=t[140];let st;t[141]!==at||t[142]!==ot?(st=(0,Z.jsxs)(es,{className:`space-y-6 border-t border-border px-3 py-4`,children:[at,ot]}),t[141]=at,t[142]=ot,t[143]=st):st=t[143];let ct;t[144]!==S||t[145]!==st?(ct=(0,Z.jsxs)(rs,{open:S,onOpenChange:C,className:`rounded-md border border-border`,"data-testid":`create-advanced`,children:[tt,st]}),t[144]=S,t[145]=st,t[146]=ct):ct=t[146];let lt;t[147]!==o||t[148]!==j?(lt=j===null?null:(0,Z.jsx)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-submit-error`,children:o(Gf(j))}),t[147]=o,t[148]=j,t[149]=lt):lt=t[149];let ut;t[150]!==c||t[151]!==Se||t[152]!==Ue||t[153]!==$e||t[154]!==et||t[155]!==ct||t[156]!==lt?(ut=(0,Z.jsx)(qo,{className:`space-y-6`,children:(0,Z.jsxs)(`form`,{id:c,onSubmit:Se,"data-testid":`create-project-form`,className:`space-y-6`,children:[Ue,$e,et,ct,lt]})}),t[150]=c,t[151]=Se,t[152]=Ue,t[153]=$e,t[154]=et,t[155]=ct,t[156]=lt,t[157]=ut):ut=t[157];let dt;t[158]===r?dt=t[159]:(dt=()=>r(!1),t[158]=r,t[159]=dt);let ft;t[160]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,Z.jsx)(s,{id:`dEgA5A`}),t[160]=ft):ft=t[160];let pt;t[161]!==k||t[162]!==dt?(pt=(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,className:`font-mono uppercase`,onClick:dt,disabled:k,"data-testid":`create-cancel`,children:ft}),t[161]=k,t[162]=dt,t[163]=pt):pt=t[163];let mt;t[164]===k?mt=t[165]:(mt=k?(0,Z.jsx)(s,{id:`E9bKSA`}):(0,Z.jsx)(s,{id:`hYgDIe`}),t[164]=k,t[165]=mt);let ht;t[166]!==c||t[167]!==ge||t[168]!==mt?(ht=(0,Z.jsx)(Ai,{type:`submit`,form:c,disabled:ge,"data-testid":`create-submit`,children:mt}),t[166]=c,t[167]=ge,t[168]=mt,t[169]=ht):ht=t[169];let gt;t[170]!==pt||t[171]!==ht?(gt=(0,Z.jsxs)(Jo,{children:[pt,ht]}),t[170]=pt,t[171]=ht,t[172]=gt):gt=t[172];let _t;t[173]!==ut||t[174]!==gt?(_t=(0,Z.jsxs)(Ko,{className:`sm:max-w-lg`,"data-testid":`create-project-dialog`,children:[Fe,ut,gt]}),t[173]=ut,t[174]=gt,t[175]=_t):_t=t[175];let vt;return t[176]!==we||t[177]!==n||t[178]!==_t?(vt=(0,Z.jsx)(Xo,{open:n,onOpenChange:we,children:_t}),t[176]=we,t[177]=n,t[178]=_t,t[179]=vt):vt=t[179],vt}function qf(e){return e+1}function Jf(e){return e+1}function Yf(){}function Xf(e){return e+1}function Zf(e){return e+1}function Qf(e){console.warn(`[CreateProjectDialog] defaultProjectsRoot probe failed:`,e)}function $f(){return new Set(Hr)}function ep(e){let t=(0,$.c)(37),{cascade:n,onOpenNested:r,removeGitState:i,onRequestRemoveGit:a,onCancelRemoveGit:o,onConfirmRemoveGit:c}=e;if(n.kind===`idle`||n.kind===`free`||n.kind===`block-nonempty`)return null;if(n.kind===`block-nested`){let{rootPath:e}=n,i;t[0]===e?i=t[1]:(i=Hf(e),t[0]=e,t[1]=i);let a=i,o;t[2]===e?o=t[3]:(o={rootPath:e},t[2]=e,t[3]=o);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c={0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})},t[4]=c):c=t[4];let l;t[5]===o?l=t[6]:(l=(0,Z.jsx)(`p`,{className:`mb-2`,children:(0,Z.jsx)(s,{id:`W7XJN4`,values:o,components:c})}),t[5]=o,t[6]=l);let u;t[7]!==r||t[8]!==e?(u=()=>r(e),t[7]=r,t[8]=e,t[9]=u):u=t[9];let d;t[10]===a?d=t[11]:(d=(0,Z.jsx)(s,{id:`1Ta7Fd`,values:{basename:a}}),t[10]=a,t[11]=d);let f;t[12]!==u||t[13]!==d?(f=(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,size:`sm`,onClick:u,"data-testid":`create-banner-nested-open`,children:d}),t[12]=u,t[13]=d,t[14]=f):f=t[14];let p;return t[15]!==l||t[16]!==f?(p=(0,Z.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-sm text-destructive`,"data-testid":`create-banner-nested`,children:[l,f]}),t[15]=l,t[16]=f,t[17]=p):p=t[17],p}if(n.kind===`confirm-git`){let{gitRoot:e}=n,r;if(t[18]!==e){let n;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(n=/\/+$/,t[20]=n):n=t[20],r=e.replace(n,``),t[18]=e,t[19]=r}else r=t[19];let l=`${r}/.git`,u=i.kind===`error`?i.message:null,d;t[21]===e?d=t[22]:(d={gitRoot:e},t[21]=e,t[22]=d);let f;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(f={0:(0,Z.jsx)(`code`,{}),1:(0,Z.jsx)(`code`,{})},t[23]=f):f=t[23];let p;t[24]===d?p=t[25]:(p=(0,Z.jsx)(`p`,{children:(0,Z.jsx)(s,{id:`FEK4oC`,values:d,components:f})}),t[24]=d,t[25]=p);let m;t[26]!==e||t[27]!==o||t[28]!==c||t[29]!==a||t[30]!==u||t[31]!==i.kind||t[32]!==l?(m=i.kind===`idle`||i.kind===`error`?(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1`,children:[(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>a(e),"data-testid":`create-banner-git-remove`,children:(0,Z.jsx)(s,{id:`YTLmTM`,components:{0:(0,Z.jsx)(`code`,{})}})}),i.kind===`error`?(0,Z.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive`,"data-testid":`create-banner-git-remove-error`,children:(0,Z.jsx)(s,{id:`SkMZlS`,values:{targetGitPath:l,removeGitError:u},components:{0:(0,Z.jsx)(`code`,{})}})}):null]}):(0,Z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 rounded border border-blue-400/60 bg-white/40 p-2 dark:border-blue-600/60 dark:bg-black/20`,"data-testid":`create-banner-git-remove-confirm`,children:[(0,Z.jsx)(`p`,{className:`text-xs`,children:(0,Z.jsx)(s,{id:`WZ-vBy`,values:{targetGitPath:l},components:{0:(0,Z.jsx)(`code`,{className:`font-mono break-all`})}})}),(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,Z.jsx)(Ai,{type:`button`,variant:`destructive`,size:`sm`,disabled:i.kind===`pending`,onClick:()=>c(e),"data-testid":`create-banner-git-remove-confirm-button`,children:i.kind===`pending`?(0,Z.jsx)(s,{id:`0-31GV`}):(0,Z.jsx)(s,{id:`v-h2hx`,values:{targetGitPath:l}})}),(0,Z.jsx)(Ai,{type:`button`,variant:`outline`,size:`sm`,disabled:i.kind===`pending`,onClick:o,"data-testid":`create-banner-git-remove-cancel`,children:(0,Z.jsx)(s,{id:`dEgA5A`})})]})]}),t[26]=e,t[27]=o,t[28]=c,t[29]=a,t[30]=u,t[31]=i.kind,t[32]=l,t[33]=m):m=t[33];let h;return t[34]!==p||t[35]!==m?(h=(0,Z.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded-md border border-blue-300 bg-blue-50 px-3 py-2 text-sm text-blue-900 dark:border-blue-700 dark:bg-blue-950 dark:text-blue-200`,"data-testid":`create-banner-git-confirm`,children:[p,m]}),t[34]=p,t[35]=m,t[36]=h):h=t[36],h}return null}function tp(e){let t=(0,$.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`GitHub`}),r=(0,Z.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,Z.jsxs)(`svg`,{role:`img`,fill:`currentColor`,height:24,width:24,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r]}),t[2]=e,t[3]=i),i}function np(e){let t=(0,$.c)(5),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(`title`,{children:`OpenKnowledge icon`}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsxs)(`g`,{filter:`url(#filter0_d_ok)`,children:[(0,Z.jsx)(`path`,{d:`M66.8902 16.1017C58.2694 3.86669 46.1739 -0.690239 29.9182 2.17749C21.3995 3.67813 13.4602 9.555 8.67934 17.9009C3.93974 26.1701 2.98514 35.6533 6.05714 43.9166C9.31574 52.6868 16.7168 58.4752 24.2299 63.4231C25.7973 64.4562 26.1351 65.7172 26.3551 68.9896C26.5221 71.4625 26.799 75.6011 30.6842 77.7204C31.8176 78.3372 33.0648 78.6515 34.3946 78.6515C37.0796 78.6515 39.4033 77.3649 40.5189 76.7482C47.1049 73.1046 68.8878 59.7147 72.6453 40.4027C74.3444 31.6679 70.9797 21.9019 66.8922 16.1017H66.8902Z`,fill:`white`}),(0,Z.jsx)(`path`,{d:`M37.4214 71.154C28.7888 75.929 36.787 64.0397 27.7458 58.0843C21.6372 54.0616 14.788 49.0568 12.0499 41.6911C6.74463 27.4192 17.5438 10.8473 31.028 8.47262C45.1977 5.97613 54.6946 9.8947 61.6635 19.7844C65.2089 24.8167 67.6013 32.8365 66.3658 39.1828C63.6906 52.9341 49.073 64.7075 37.4214 71.154Z`,fill:`#69A3FF`}),(0,Z.jsx)(`path`,{d:`M52.7244 29.2638C53.4665 28.5217 54.6697 28.5217 55.4119 29.2638V29.2638C56.154 30.0059 56.154 31.2091 55.4119 31.9513L49.2589 38.1042L46.5715 35.4167L52.7244 29.2638Z`,fill:`#D5E5FF`}),(0,Z.jsx)(`path`,{d:`M55.4119 38.8821C56.154 39.6242 56.154 40.8274 55.4119 41.5696V41.5696C54.6698 42.3117 53.4665 42.3117 52.7244 41.5696L46.5715 35.4166L49.259 32.7292L55.4119 38.8821Z`,fill:`#D5E5FF`})]}),t[1]=r):r=t[1];let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Z.jsx)(`defs`,{children:(0,Z.jsxs)(`filter`,{id:`filter0_d_ok`,x:`-9.53674e-07`,y:`-0.0799994`,width:`77.3817`,height:`85.8743`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,Z.jsx)(`feFlood`,{floodOpacity:`0`,result:`BackgroundImageFix`}),(0,Z.jsx)(`feColorMatrix`,{in:`SourceAlpha`,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0`,result:`hardAlpha`}),(0,Z.jsx)(`feOffset`,{dy:`2.85714`}),(0,Z.jsx)(`feGaussianBlur`,{stdDeviation:`2.14286`}),(0,Z.jsx)(`feComposite`,{in2:`hardAlpha`,operator:`out`}),(0,Z.jsx)(`feColorMatrix`,{type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in2:`BackgroundImageFix`,result:`effect1_dropShadow_ok`}),(0,Z.jsx)(`feBlend`,{mode:`normal`,in:`SourceGraphic`,in2:`effect1_dropShadow_ok`,result:`shape`})]})}),t[2]=i):i=t[2];let a;return t[3]===e?a=t[4]:(a=(0,Z.jsxs)(`svg`,{role:`img`,"aria-label":`OpenKnowledge icon`,fill:`none`,height:24,width:24,viewBox:`0 0 78 80`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var rp=(0,Q.lazy)(()=>n(()=>import(`./McpConsentDialogBody-_slAuRpY.js`),__vite__mapDeps([17,1,6,7,8,9,10,11,18]),import.meta.url));function ip(){let e=(0,$.c)(1);if(!(0,Q.useSyncExternalStore)(yc.subscribe,op,ap))return null;let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(Q.Suspense,{fallback:null,children:(0,Z.jsx)(rp,{})}),e[0]=t):t=e[0],t}function ap(){return!1}function op(){return yc.getSnapshot()!==null}var sp=new Set([`main`,`master`]);function cp(e){let t=(0,$.c)(19),{owner:n,repo:r,path:i,branch:a,kind:o,testId:c,branchTestId:l}=e,u=o===void 0?`doc`:o,d;t[0]===a?d=t[1]:(d=a!==``&&!sp.has(a),t[0]=a,t[1]=d);let f=d,p;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(s,{id:`IreQBq`}),t[2]=p):p=t[2];let m;t[3]!==n||t[4]!==r?(m=(0,Z.jsx)(lp,{label:p,children:(0,Z.jsxs)(`span`,{children:[n,`/`,r]})}),t[3]=n,t[4]=r,t[5]=m):m=t[5];let h;t[6]!==u||t[7]!==i||t[8]!==c?(h=i?(0,Z.jsx)(lp,{label:u===`folder`?(0,Z.jsx)(s,{id:`kNqMMd`}):(0,Z.jsx)(s,{id:`J2eKUI`}),children:(0,Z.jsx)(`span`,{className:`font-mono`,"data-testid":`${c}-target`,children:i})}):null,t[6]=u,t[7]=i,t[8]=c,t[9]=h):h=t[9];let g;t[10]!==a||t[11]!==l||t[12]!==f?(g=f?(0,Z.jsx)(lp,{label:(0,Z.jsx)(s,{id:`ssuwjF`}),children:(0,Z.jsx)(`span`,{className:`font-mono`,"data-testid":l,children:a})}):null,t[10]=a,t[11]=l,t[12]=f,t[13]=g):g=t[13];let _;return t[14]!==m||t[15]!==h||t[16]!==g||t[17]!==c?(_=(0,Z.jsxs)(`dl`,{className:`space-y-2 text-1sm text-muted-foreground`,"data-testid":c,children:[m,h,g]}),t[14]=m,t[15]=h,t[16]=g,t[17]=c,t[18]=_):_=t[18],_}function lp(e){let t=(0,$.c)(7),{label:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,Z.jsx)(`dt`,{className:`w-20 shrink-0 font-mono uppercase tracking-wide text-xs`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,Z.jsx)(`dd`,{className:`min-w-0 flex-1 break-all text-foreground`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Z.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}var up=e=>({phase:`ready`,seed:e});function dp(e){return e.phase===`ready`?{phase:`initializing`,seed:e.seed}:e}function fp(e,t){return e.phase===`initializing`?t.ok?{phase:`opening`,seed:e.seed}:{phase:`error`,seed:e.seed,reason:t.reason,message:t.message}:e}function pp(e,t){return e.phase===`opening`?t.ok?{phase:`done`,seed:e.seed}:{phase:`error`,seed:e.seed,reason:`network-error`,message:t.message}:e}function mp(e){return e.phase===`done`||e.phase===`cancelled`||e.phase===`error`?e:{phase:`cancelled`,seed:e.seed}}function hp(){let e=null,t=new Set,n=!1,r=null;function i(){for(let e of t)e()}function a(){e!==null&&(e=null,i())}return{install({bridge:t}){if(t)return n?r??void 0:(n=!0,r=t.onShareReceived(t=>{e=t,i()}),()=>{r?.(),r=null,n=!1,a()})},getSnapshot(){return e},subscribe(e){return t.add(e),()=>{t.delete(e)}},dismiss(){a()}}}var gp=hp();function _p(e){return gp.install(e)}function vp(e){return e!==null&&e.kind===`launcher-consent`}function yp(e){return e!==null&&e.kind===`launcher-miss`}function bp(e){let t=(0,$.c)(14),{bridge:n,cloneController:r,store:i}=e,a=i===void 0?gp:i,o=(0,Q.useSyncExternalStore)(a.subscribe,a.getSnapshot,Sp),[s,c]=(0,Q.useState)(0),[l,u]=(0,Q.useState)(o);o!==l&&(u(o),c(xp));let d,f;t[0]!==o||t[1]!==a?(d=()=>{if(!o)return;let e=$u(o);e&&(Ls.error(e.message),a.dismiss())},f=[o,a],t[0]=o,t[1]=a,t[2]=d,t[3]=f):(d=t[2],f=t[3]),(0,Q.useEffect)(d,f);let p;t[4]===o?p=t[5]:(p=yp(o)?o:null,t[4]=o,t[5]=p);let m=p,h;t[6]===o?h=t[7]:(h=vp(o)?o:null,t[6]=o,t[7]=h);let g=h??m;if(!g)return null;let _;return t[8]!==g||t[9]!==n||t[10]!==r||t[11]!==s||t[12]!==a?(_=(0,Z.jsx)(Cp,{payload:g,bridge:n,cloneController:r,store:a},s),t[8]=g,t[9]=n,t[10]=r,t[11]=s,t[12]=a,t[13]=_):_=t[13],_}function xp(e){return e+1}function Sp(){return null}function Cp(e){let t=(0,$.c)(169),{payload:n,bridge:r,cloneController:a,store:o}=e,{_:c}=i(),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(null),[p,m]=(0,Q.useState)(!1),[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(null),[y,b]=(0,Q.useState)(null),x=(0,Q.useRef)(!1),S=(0,Q.useRef)(null),C,w;t[0]===_?(C=t[1],w=t[2]):(C=()=>{_&&S.current?.focus()},w=[_],t[0]=_,t[1]=C,t[2]=w),(0,Q.useEffect)(C,w);let T;t[3]!==y||t[4]!==n?(T=()=>{vp(n)&&y===null&&(console.warn(`[receive] q1_hit=true selection=branch_match_non_ok candidate=${n.candidatePath}`),b(up({candidatePath:n.candidatePath,branch:n.share.branch,targetPath:sn(n.share.target),targetKind:n.share.target.kind,parentProjectName:n.parentProjectName})))},t[3]=y,t[4]=n,t[5]=T):T=t[5];let E;t[6]===n?E=t[7]:(E=[n],t[6]=n,t[7]=E),(0,Q.useEffect)(T,E);let D;t[8]!==d||t[9]!==a||t[10]!==n?(D=()=>{a&&yp(n)&&d===null&&(x.current||(x.current=!0,m(!0),a.getAuthStatus().then(e=>{f(e)}).catch(e=>{console.warn(`[receive] auth pre-flight probe failed`,e instanceof Error?e.message:e),f({authenticated:!1,host:`github.com`})}).finally(()=>{m(!1)})))},t[8]=d,t[9]=a,t[10]=n,t[11]=D):D=t[11];let O;t[12]!==d||t[13]!==n?(O=[n,d],t[12]=d,t[13]=n,t[14]=O):O=t[14],(0,Q.useEffect)(D,O);let k=yp(n)?n:null,A=vp(n)?n:null,j=k?.share??A?.share??null,M,N,P,F,I,L,R,z,B,V;if(t[15]!==c||t[16]!==p||t[17]!==r||t[18]!==a||t[19]!==h||t[20]!==y||t[21]!==k||t[22]!==l||t[23]!==j||t[24]!==o){B=Symbol.for(`react.early_return_sentinel`);bb0:{let e=j?{owner:j.owner,repo:j.repo}:null,n;t[35]!==c||t[36]!==j?.target.kind?(n=j?.target.kind===`folder`?c({id:`ugoTXs`}):c({id:`XH30C4`}),t[35]=c,t[36]=j?.target.kind,t[37]=n):n=t[37],V=n,P=async function(){if(!k||!e)return;if(console.log(td({q2_path:`clone`})),!a){Ls.info(c({id:`27XW26`}),{action:{label:c({id:`B3NAZC`}),onClick:()=>{r.navigator.open()}},duration:8e3});return}if(h)return;v(null),g(!0);let t=Zu(e),n;try{n=await a.runClone({url:t,branch:k.share.branch})}catch(e){let t=e;console.warn(`[receive] runClone threw unexpectedly`,t),g(!1),v({detail:t instanceof Error?t.message:String(t)});return}if(g(!1),n.kind===`error`){v({detail:n.detail??null});return}if(n.kind===`ok`){try{await r.project.open({path:n.dir,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:k.share.target.kind,path:sn(k.share.target)}}),o.dismiss()}catch(e){let t=e;console.warn(`[receive] project open after clone failed`,t instanceof Error?t.message:t),Ls.error(c({id:`438Fca`}))}return}};let i;t[38]!==c||t[39]!==p||t[40]!==a?(i=async function(){if(!(!a||p)){m(!0);try{let e=await a.startSignIn();m(!1),e!==null&&f(e)}catch(e){let t=e;m(!1),console.warn(`[receive] startSignIn failed`,t instanceof Error?t.message:t),Ls.error(c({id:`lzwo7p`}))}}},t[38]=c,t[39]=p,t[40]=a,t[41]=i):i=t[41],I=i,F=async function(){if(!(!k||!e||l)){v(null),u(!0),console.log(td({q2_path:`local`}));try{for(;;){let t=await r.dialog.openFolder();if(!t)break;let n=await r.share.validateLocalFolder({folderPath:t,owner:e.owner,repo:e.repo});if(console.log(td({folder_validate:n.kind})),n.kind===`ok`){let e=k.share.branch,n={currentBranch:null,headSha:null,detached:!1};try{n=await r.project.readHeadBranch(t)}catch(e){let t=e;console.warn(`[receive] local-folder readHeadBranch failed`,t instanceof Error?t.message:t)}let i=er(e,n)!==`true`;try{await r.project.open({path:t,target:`new-window`,entryPoint:`share-receive`,...i?{pendingShareBranchSwitch:{share:k.share,projectPath:t,currentBranch:n.currentBranch}}:{pendingDeepLinkTarget:{kind:k.share.target.kind,path:sn(k.share.target)}}}),o.dismiss()}catch(e){let t=e;console.warn(`[receive] local-folder-open failed`,t instanceof Error?t.message:t),Ls.error(c({id:`phM8Kh`}))}break}let i=Qu(n,e);i&&Ls.error(i)}}catch(e){let t=e;console.warn(`[receive] local-folder-validate failed`,t instanceof Error?t.message:t),Ls.error(c({id:`rlUzXK`}))}u(!1)}};let d;t[42]!==c||t[43]!==r||t[44]!==y||t[45]!==o?(d=function(){if(y===null||y.phase!==`ready`)return;let e=y.seed;console.warn(`[receive] consent_dialog action=initialize worktree=${e.candidatePath}`),b(Op),r.project.okInit({projectPath:e.candidatePath}).then(async t=>{if(t.ok===!0){b(e=>e===null?e:fp(e,{ok:!0,projectPath:t.projectPath}));try{await r.project.open({path:t.projectPath,target:`new-window`,entryPoint:`share-receive`,pendingDeepLinkTarget:{kind:e.targetKind,path:e.targetPath},pendingBranch:e.branch}),b(Dp),o.dismiss()}catch(t){let n=t,r=n instanceof Error?n.message:String(n);b(e=>e===null?e:pp(e,{ok:!1,message:r})),Ls.error(c({id:`nDT8qt`,values:{0:e.candidatePath}}))}return}let n=t.reason,i=t.message||`Initialization failed.`;b(e=>e===null?e:fp(e,{ok:!1,reason:n,message:i})),Ls.error(i)}).catch(t=>{let n=t instanceof Error?t.message:String(t);b(e=>e===null?e:fp(e,{ok:!1,reason:`network-error`,message:n})),Ls.error(c({id:`3Mwaly`,values:{0:e.candidatePath}}))})},t[42]=c,t[43]=r,t[44]=y,t[45]=o,t[46]=d):d=t[46];let _=d,x;t[47]!==y||t[48]!==o?(x=function(){y!==null&&console.warn(`[receive] consent_dialog action=cancel worktree=${y.seed.candidatePath}`),b(Ep),o.dismiss()},t[47]=y,t[48]=o,t[49]=x):x=t[49];let S=x;if(y!==null&&y.phase!==`cancelled`&&y.phase!==`done`&&j!==null){let e=y.seed,n=y.phase===`initializing`||y.phase===`opening`,r;t[50]===S?r=t[51]:(r=e=>{e||S()},t[50]=S,t[51]=r);let i;t[52]===V?i=t[53]:(i=(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`RY6Bq1`,values:{targetNoun:V}})}),t[52]=V,t[53]=i);let a;t[54]===j.target?a=t[55]:(a=sn(j.target)?`— ${sn(j.target)}`:``,t[54]=j.target,t[55]=a);let o;t[56]!==j.owner||t[57]!==j.repo||t[58]!==a?(o=(0,Z.jsx)(Wo,{className:`sr-only`,children:(0,Z.jsx)(s,{id:`pgq_xf`,values:{0:j.owner,1:j.repo,2:a}})}),t[56]=j.owner,t[57]=j.repo,t[58]=a,t[59]=o):o=t[59];let c=j.owner,l=j.repo,u;t[60]===j.target?u=t[61]:(u=sn(j.target),t[60]=j.target,t[61]=u);let d;t[62]!==j.branch||t[63]!==j.owner||t[64]!==j.repo||t[65]!==j.target.kind||t[66]!==u?(d=(0,Z.jsx)(cp,{owner:c,repo:l,path:u,kind:j.target.kind,branch:j.branch,testId:`share-receive-metadata`,branchTestId:`share-receive-metadata-branch`}),t[62]=j.branch,t[63]=j.owner,t[64]=j.repo,t[65]=j.target.kind,t[66]=u,t[67]=d):d=t[67];let f;t[68]!==i||t[69]!==o||t[70]!==d?(f=(0,Z.jsxs)(Yo,{children:[i,o,d]}),t[68]=i,t[69]=o,t[70]=d,t[71]=f):f=t[71];let p;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`KsAPaB`})}),t[72]=p):p=t[72];let m;t[73]===e.candidatePath?m=t[74]:(m=(0,Z.jsx)(`p`,{className:`mt-2 break-all rounded bg-muted px-2 py-1 font-mono text-xs text-foreground/80`,"data-testid":`share-receive-consent-path`,children:e.candidatePath}),t[73]=e.candidatePath,t[74]=m);let h;t[75]===e.parentProjectName?h=t[76]:(h=e.parentProjectName===null?null:(0,Z.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,"data-testid":`share-receive-consent-parent`,children:(0,Z.jsx)(s,{id:`JmfgFc`,values:{0:e.parentProjectName}})}),t[75]=e.parentProjectName,t[76]=h);let g;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`w7SsvI`})}),t[77]=g):g=t[77];let v;t[78]!==y.message||t[79]!==y.phase?(v=y.phase===`error`?(0,Z.jsx)(`p`,{className:`mt-3 text-sm text-destructive`,"data-testid":`share-receive-consent-error`,role:`alert`,children:y.message}):null,t[78]=y.message,t[79]=y.phase,t[80]=v):v=t[80];let b;t[81]!==m||t[82]!==h||t[83]!==v?(b=(0,Z.jsxs)(qo,{children:[p,m,h,g,v]}),t[81]=m,t[82]=h,t[83]=v,t[84]=b):b=t[84];let x;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(s,{id:`dEgA5A`}),t[85]=x):x=t[85];let C;t[86]===S?C=t[87]:(C=(0,Z.jsx)(Ai,{variant:`ghost`,onClick:S,"data-testid":`share-receive-consent-cancel`,children:x}),t[86]=S,t[87]=C);let w=n||y.phase===`error`,T=n||y.phase===`error`,E;t[88]===n?E=t[89]:(E=n?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Te,{className:`mr-2 h-4 w-4 animate-spin`,"aria-hidden":`true`}),(0,Z.jsx)(s,{id:`NKkZXl`})]}):(0,Z.jsx)(s,{id:`NKkZXl`}),t[88]=n,t[89]=E);let D;t[90]!==_||t[91]!==w||t[92]!==T||t[93]!==E?(D=(0,Z.jsx)(Ai,{onClick:_,disabled:w,"aria-disabled":T,"data-testid":`share-receive-consent-initialize`,children:E}),t[90]=_,t[91]=w,t[92]=T,t[93]=E,t[94]=D):D=t[94];let O;t[95]!==C||t[96]!==D?(O=(0,Z.jsxs)(Jo,{children:[C,D]}),t[95]=C,t[96]=D,t[97]=O):O=t[97];let k;t[98]!==f||t[99]!==b||t[100]!==O?(k=(0,Z.jsxs)(Ko,{className:`sm:max-w-xl`,"data-testid":`share-receive-consent-dialog`,onInteractOutside:Tp,onPointerDownOutside:wp,children:[f,b,O]}),t[98]=f,t[99]=b,t[100]=O,t[101]=k):k=t[101];let A;t[102]!==r||t[103]!==k?(A=(0,Z.jsx)(Xo,{open:!0,onOpenChange:r,children:k}),t[102]=r,t[103]=k,t[104]=A):A=t[104],B=A;break bb0}if(!k||!j||!e){B=null;break bb0}M=a!==void 0&&!h;let C;t[105]!==c||t[106]!==h?(C=c(h?{id:`YjhKI5`}:{id:`LE7t79`}),t[105]=c,t[106]=h,t[107]=C):C=t[107],N=C,L=j.owner,R=j.repo,z=Gn(e)}t[15]=c,t[16]=p,t[17]=r,t[18]=a,t[19]=h,t[20]=y,t[21]=k,t[22]=l,t[23]=j,t[24]=o,t[25]=M,t[26]=N,t[27]=P,t[28]=F,t[29]=I,t[30]=L,t[31]=R,t[32]=z,t[33]=B,t[34]=V}else M=t[25],N=t[26],P=t[27],F=t[28],I=t[29],L=t[30],R=t[31],z=t[32],B=t[33],V=t[34];if(B!==Symbol.for(`react.early_return_sentinel`))return B;let H=z,U=d?.authenticated?d.login:void 0,W;t[108]===_?W=t[109]:(W=_?.detail?ed(_.detail):``,t[108]=_,t[109]=W);let G=W,K;t[110]===o?K=t[111]:(K=e=>{e||o.dismiss()},t[110]=o,t[111]=K);let q;t[112]===V?q=t[113]:(q=(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`RY6Bq1`,values:{targetNoun:V}})}),t[112]=V,t[113]=q);let J;t[114]===j.target?J=t[115]:(J=sn(j.target)?` — ${sn(j.target)}`:null,t[114]=j.target,t[115]=J);let ee;t[116]!==j.owner||t[117]!==j.repo||t[118]!==J?(ee=(0,Z.jsxs)(Wo,{className:`sr-only`,children:[j.owner,`/`,j.repo,J]}),t[116]=j.owner,t[117]=j.repo,t[118]=J,t[119]=ee):ee=t[119];let Y=j.owner,te=j.repo,X;t[120]===j.target?X=t[121]:(X=sn(j.target),t[120]=j.target,t[121]=X);let ne;t[122]!==j.branch||t[123]!==j.owner||t[124]!==j.repo||t[125]!==j.target.kind||t[126]!==X?(ne=(0,Z.jsx)(cp,{owner:Y,repo:te,path:X,kind:j.target.kind,branch:j.branch,testId:`share-receive-metadata`,branchTestId:`share-receive-metadata-branch`}),t[122]=j.branch,t[123]=j.owner,t[124]=j.repo,t[125]=j.target.kind,t[126]=X,t[127]=ne):ne=t[127];let re;t[128]!==q||t[129]!==ee||t[130]!==ne?(re=(0,Z.jsxs)(Yo,{children:[q,ee,ne]}),t[128]=q,t[129]=ee,t[130]=ne,t[131]=re):re=t[131];let ie;t[132]!==a||t[133]!==M||t[134]!==_||t[135]!==G||t[136]!==N||t[137]!==h||t[138]!==P||t[139]!==F||t[140]!==l||t[141]!==L||t[142]!==R?(ie=_?(0,Z.jsxs)(`div`,{ref:S,tabIndex:-1,className:`rounded-lg border border-destructive/40 bg-destructive/5 p-4 outline-none`,"data-testid":`share-receive-clone-error`,children:[(0,Z.jsx)(`p`,{className:`text-sm font-semibold text-foreground`,role:`alert`,children:(0,Z.jsx)(s,{id:`aiArms`})}),G?(0,Z.jsxs)(`p`,{className:`mt-2 break-words text-xs text-destructive`,"data-testid":`share-receive-clone-error-message`,children:[(0,Z.jsx)(s,{id:`4BITzH`}),` `,(0,Z.jsxs)(`span`,{className:`font-mono text-foreground/80`,children:[`"`,G,`"`]})]}):null,(0,Z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`Llyqvo`})}),(0,Z.jsxs)(`ul`,{className:`mt-1 list-disc space-y-1 pl-5 text-sm text-muted-foreground`,"data-testid":`share-receive-clone-error-reasons`,children:[(0,Z.jsx)(`li`,{children:(0,Z.jsx)(s,{id:`6LbUG7`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(s,{id:`_pY_Vq`})}),(0,Z.jsx)(`li`,{children:(0,Z.jsx)(s,{id:`J6mxC1`})})]}),(0,Z.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,Z.jsx)(Ai,{onClick:()=>{P()},"data-testid":`share-receive-clone-retry`,children:(0,Z.jsx)(s,{id:`KDw4GX`})}),(0,Z.jsx)(Ai,{variant:`outline`,onClick:()=>{F()},disabled:l||h,"data-testid":`share-receive-error-local`,children:(0,Z.jsx)(s,{id:`xFQRu4`})})]})]}):(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-clone`,className:`flex flex-col items-start gap-2 rounded-lg border-2 border-primary/40 bg-card p-4 text-left transition hover:border-primary hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-primary/40 disabled:hover:bg-card`,onClick:()=>{P()},disabled:a!==void 0&&!M,"aria-disabled":a!==void 0&&!M,children:[(0,Z.jsx)(`span`,{className:`text-sm font-semibold`,children:N}),(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`jGJy-9`,values:{shareOwner:L,shareRepo:R}})})]}),(0,Z.jsxs)(`button`,{type:`button`,"data-testid":`share-receive-local`,className:`flex flex-col items-start gap-2 rounded-lg border border-border bg-card p-4 text-left transition hover:border-foreground/50 hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>{F()},disabled:l||h,children:[(0,Z.jsx)(`span`,{className:`text-sm font-semibold`,children:(0,Z.jsx)(s,{id:`HfI1dR`})}),(0,Z.jsx)(`span`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`_qD6mn`})})]})]}),t[132]=a,t[133]=M,t[134]=_,t[135]=G,t[136]=N,t[137]=h,t[138]=P,t[139]=F,t[140]=l,t[141]=L,t[142]=R,t[143]=ie):ie=t[143];let ae;t[144]!==p||t[145]!==d||t[146]!==a||t[147]!==I||t[148]!==U?(ae=a?(0,Z.jsx)(`div`,{className:`mt-3 flex items-center justify-between rounded-md border border-border bg-muted/30 px-3 py-2 text-xs`,"data-testid":`share-receive-auth-banner`,role:`status`,"aria-live":`polite`,children:d===null?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`UDFrWm`})}):d.authenticated?(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`VAHWL_`,values:{signedInLogin:U},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground/90`})}})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`span`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`SgKLfA`})}),(0,Z.jsx)(`button`,{type:`button`,"data-testid":`share-receive-signin`,className:`font-medium text-primary underline-offset-2 hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded`,onClick:()=>{I()},disabled:p,children:p?(0,Z.jsx)(s,{id:`PKLY-1`}):(0,Z.jsx)(s,{id:`3jod3l`})})]})}):null,t[144]=p,t[145]=d,t[146]=a,t[147]=I,t[148]=U,t[149]=ae):ae=t[149];let oe;t[150]!==_||t[151]!==H?(oe=_?null:(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`RJ3a8Z`,values:{lookingForUrl:H},components:{0:(0,Z.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 text-foreground/80`})}})}),t[150]=_,t[151]=H,t[152]=oe):oe=t[152];let se;t[153]!==ie||t[154]!==ae||t[155]!==oe?(se=(0,Z.jsxs)(qo,{children:[ie,ae,oe]}),t[153]=ie,t[154]=ae,t[155]=oe,t[156]=se):se=t[156];let ce;t[157]===o?ce=t[158]:(ce=()=>o.dismiss(),t[157]=o,t[158]=ce);let le;t[159]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,Z.jsx)(s,{id:`dEgA5A`}),t[159]=le):le=t[159];let ue;t[160]===ce?ue=t[161]:(ue=(0,Z.jsx)(Jo,{children:(0,Z.jsx)(Ai,{variant:`outline`,className:`font-mono uppercase`,onClick:ce,children:le})}),t[160]=ce,t[161]=ue);let de;t[162]!==re||t[163]!==se||t[164]!==ue?(de=(0,Z.jsxs)(Ko,{className:`sm:max-w-xl`,"data-testid":`share-receive-dialog`,children:[re,se,ue]}),t[162]=re,t[163]=se,t[164]=ue,t[165]=de):de=t[165];let fe;return t[166]!==K||t[167]!==de?(fe=(0,Z.jsx)(Xo,{open:!0,onOpenChange:K,children:de}),t[166]=K,t[167]=de,t[168]=fe):fe=t[168],fe}function wp(e){return e.preventDefault()}function Tp(e){return e.preventDefault()}function Ep(e){return e===null?e:mp(e)}function Dp(e){return e===null?e:pp(e,{ok:!0})}function Op(e){return e===null?e:dp(e)}var kp=(e,t,n)=>Yu(e,t,n,`NavigatorApp`);function Ap(e,t){return e.filter(e=>e.path!==t)}function jp(e){let t=(0,$.c)(116),{bridge:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],t[0]=r):r=t[0];let[a,o]=(0,Q.useState)(r),c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=new Map,t[1]=c):c=t[1];let[l,u]=(0,Q.useState)(c),[d,f]=(0,Q.useState)(!0),[p,m]=(0,Q.useState)(null),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(!1),[w,T]=(0,Q.useState)(null),E=typeof window<`u`&&window.okDesktop!=null,[D,O]=(0,Q.useState)(`auth`),{theme:k}=Ar(),{_:A}=i();h(n,k??`system`);let j;t[2]!==A||t[3]!==n.project?(j=()=>{let e=!1;return n.project.listRecent().then(async t=>{if(e)return;o(t);let r=t.filter(Mp),i=await Promise.all(r.map(async e=>{try{let{currentBranch:t}=await n.project.readHeadBranch(e.path);return[e.path,t]}catch{return[e.path,null]}}));e||u(e=>{let t=new Map(e);for(let[e,n]of i)t.set(e,n);return t})}).catch(t=>{console.error(`[NavigatorApp] listRecent failed:`,t),e||m(t instanceof Error?t.message:A({id:`fYKgzG`}))}).finally(()=>{e||f(!1)}),()=>{e=!0}},t[2]=A,t[3]=n.project,t[4]=j):j=t[4];let M;t[5]!==A||t[6]!==n?(M=[n,A],t[5]=A,t[6]=n,t[7]=M):M=t[7],(0,Q.useEffect)(j,M);let N,P;t[8]===n?(N=t[9],P=t[10]):(N=()=>n.onMenuAction(e=>{e===`new-project`&&y(!0),e===`close-active-tab-or-window`&&window.close()}),P=[n],t[8]=n,t[9]=N,t[10]=P),(0,Q.useEffect)(N,P);let F;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(F=(e,t)=>kp(e,t,m),t[11]=F):F=t[11];let I=F,L;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(L=()=>_(!0),t[12]=L):L=t[12];let R=L,z;t[13]!==A||t[14]!==n?(z=()=>I(async()=>{let e=await n.dialog.openFolder();e&&await Fp(n,e,`pick-existing`)},A({id:`gmJ0An`})),t[13]=A,t[14]=n,t[15]=z):z=t[15];let B=z,V;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(V=()=>y(!0),t[16]=V):V=t[16];let H=V,U;t[17]!==A||t[18]!==n?(U=e=>I(async()=>{await Fp(n,e,`recents`)},A({id:`SUOoXn`})),t[17]=A,t[18]=n,t[19]=U):U=t[19];let W=U,G;t[20]!==A||t[21]!==n.project?(G=e=>I(async()=>{await n.project.removeRecent(e),o(t=>Ap(t,e)),u(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},A({id:`viwC-K`})),t[20]=A,t[21]=n.project,t[22]=G):G=t[22];let K=G,q;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,Z.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-0 z-10 h-9 ${E?`[-webkit-app-region:drag]`:``}`,"data-electron-drag":E?``:void 0,"data-testid":`nav-chrome-row`}),t[23]=q):q=t[23];let J;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,Z.jsx)(np,{className:`size-12 shrink-0`}),t[24]=J):J=t[24];let ee;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`h1`,{className:`font-medium text-xl tracking-tight`,children:`OpenKnowledge`}),(0,Z.jsx)(Tf,{})]}),t[25]=ee):ee=t[25];let Y;t[26]===n.appVersion?Y=t[27]:(Y=(0,Z.jsxs)(`header`,{className:`shrink-0 flex-wrap flex items-center gap-2.5`,children:[J,(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[ee,(0,Z.jsxs)(`p`,{className:`text-muted-foreground text-xs font-mono`,children:[`v`,n.appVersion]})]})]}),t[26]=n.appVersion,t[27]=Y);let te;t[28]===A?te=t[29]:(te=A({id:`wbv9xO`}),t[28]=A,t[29]=te);let X;t[30]===A?X=t[31]:(X=A({id:`0uTHCg`}),t[30]=A,t[31]=X);let ne;t[32]!==te||t[33]!==X?(ne=(0,Z.jsx)(Np,{title:te,description:X,onClick:H,dataTestId:`nav-create-new`,Icon:At}),t[32]=te,t[33]=X,t[34]=ne):ne=t[34];let re;t[35]===A?re=t[36]:(re=A({id:`WPwDin`}),t[35]=A,t[36]=re);let ie;t[37]===A?ie=t[38]:(ie=A({id:`tUvUfp`}),t[37]=A,t[38]=ie);let ae;t[39]!==B||t[40]!==re||t[41]!==ie?(ae=(0,Z.jsx)(Np,{title:re,description:ie,onClick:B,dataTestId:`nav-open`,Icon:ht}),t[39]=B,t[40]=re,t[41]=ie,t[42]=ae):ae=t[42];let oe;t[43]===A?oe=t[44]:(oe=A({id:`VdXv4D`}),t[43]=A,t[44]=oe);let se;t[45]===A?se=t[46]:(se=A({id:`JOcPqH`}),t[45]=A,t[46]=se);let ce;t[47]!==oe||t[48]!==se?(ce=(0,Z.jsx)(Np,{title:oe,description:se,onClick:R,dataTestId:`nav-clone`,Icon:tp}),t[47]=oe,t[48]=se,t[49]=ce):ce=t[49];let le;t[50]!==ne||t[51]!==ae||t[52]!==ce?(le=(0,Z.jsxs)(`section`,{className:`grid shrink-0 sm:grid-cols-3 gap-3`,children:[ne,ae,ce]}),t[50]=ne,t[51]=ae,t[52]=ce,t[53]=le):le=t[53];let ue;t[54]===p?ue=t[55]:(ue=p===null?null:(0,Z.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between gap-3 rounded-md border border-red-500/30 bg-red-500/10 px-3 py-2`,"data-testid":`nav-error-banner`,role:`alert`,children:[(0,Z.jsx)(`span`,{className:`text-red-700 text-xs dark:text-red-300`,children:p}),(0,Z.jsx)(Ai,{type:`button`,variant:`link`,size:`sm`,onClick:()=>m(null),className:`h-auto p-0 text-red-700 text-xs dark:text-red-300`,"data-testid":`nav-error-dismiss`,children:(0,Z.jsx)(s,{id:`1QfxQT`})})]}),t[54]=p,t[55]=ue);let de;t[56]!==d||t[57]!==W||t[58]!==K||t[59]!==l||t[60]!==a?(de=d?(0,Z.jsx)(`section`,{className:`flex shrink-0 flex-col items-center`,children:(0,Z.jsx)(Te,{className:`size-4 animate-spin text-muted-foreground/60`})}):a.length>0?(0,Z.jsxs)(`section`,{className:`flex min-h-0 flex-col`,children:[(0,Z.jsx)(`h2`,{className:`mb-2 shrink-0 font-medium text-muted-foreground font-mono text-xs uppercase tracking-wide`,children:(0,Z.jsx)(s,{id:`CCTop_`})}),(0,Z.jsx)(`ul`,{className:`min-h-0 max-h-48 subtle-scrollbar scroll-fade-mask overflow-y-auto space-y-0.5 -mx-4`,"data-testid":`nav-recent-list`,children:a.map(e=>(0,Z.jsx)(Pp,{project:e,branch:l.get(e.path)??null,onOpen:()=>W(e.path),onRemove:()=>K(e.path)},e.path))})]}):null,t[56]=d,t[57]=W,t[58]=K,t[59]=l,t[60]=a,t[61]=de):de=t[61];let fe;t[62]!==Y||t[63]!==le||t[64]!==ue||t[65]!==de?(fe=(0,Z.jsx)(`div`,{className:`mx-auto flex h-full w-full max-w-5xl flex-col overflow-hidden px-12 py-12`,children:(0,Z.jsxs)(`div`,{className:`my-auto flex min-h-0 flex-col space-y-10`,children:[Y,le,ue,de]})}),t[62]=Y,t[63]=le,t[64]=ue,t[65]=de,t[66]=fe):fe=t[66];let pe,me;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,Z.jsx)(ip,{}),me=(0,Z.jsx)(If,{}),t[67]=pe,t[68]=me):(pe=t[67],me=t[68]);let he;t[69]!==n||t[70]!==v?(he=(0,Z.jsx)(Kf,{open:v,onOpenChange:y,bridge:n}),t[69]=n,t[70]=v,t[71]=he):he=t[71];let ge;t[72]===w?ge=t[73]:(ge=e=>{x(e),e||(C(!1),w&&(w(null),T(null)))},t[72]=w,t[73]=ge);let _e;t[74]===n?_e=t[75]:(_e=qi(n),t[74]=n,t[75]=_e);let ve;t[76]===n?ve=t[77]:(ve=uo(n),t[76]=n,t[77]=ve);let ye=D===`identity`,be;t[78]!==S||t[79]!==w?(be=e=>{x(!1),S&&(C(!1),_(!0)),w&&(w({authenticated:!0,host:`github.com`,login:e.login}),T(null))},t[78]=S,t[79]=w,t[80]=be):be=t[80];let xe;t[81]!==b||t[82]!==ge||t[83]!==_e||t[84]!==ve||t[85]!==ye||t[86]!==be?(xe=(0,Z.jsx)(aa,{open:b,onOpenChange:ge,transport:_e,queryTransport:ve,identityPrompt:ye,onSuccess:be}),t[81]=b,t[82]=ge,t[83]=_e,t[84]=ve,t[85]=ye,t[86]=be,t[87]=xe):xe=t[87];let Se;t[88]===n?Se=t[89]:(Se=ad(n),t[88]=n,t[89]=Se);let Ce;t[90]===n?Ce=t[91]:(Ce=uo(n),t[90]=n,t[91]=Ce);let we;t[92]===n.dialog?we=t[93]:(we=()=>n.dialog.openFolder(),t[92]=n.dialog,t[93]=we);let Ee;t[94]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=()=>{_(!1),O(`auth`),C(!0),x(!0)},t[94]=Ee):Ee=t[94];let De;t[95]!==A||t[96]!==n?(De=e=>{let{dir:t}=e;I(()=>Fp(n,t,`pick-existing`),A({id:`iSnkwB`}))},t[95]=A,t[96]=n,t[97]=De):De=t[97];let Oe;t[98]!==g||t[99]!==Se||t[100]!==Ce||t[101]!==we||t[102]!==De?(Oe=(0,Z.jsx)(Of,{open:g,onOpenChange:_,transport:Se,authQueryTransport:Ce,pickParentFolder:we,onSignIn:Ee,onCloneComplete:De}),t[98]=g,t[99]=Se,t[100]=Ce,t[101]=we,t[102]=De,t[103]=Oe):Oe=t[103];let ke;if(t[104]!==n){let e;t[106]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>new Promise(e=>{T(()=>e),x(!0)}),t[106]=e):e=t[106],ke=rd({bridge:n,authQueryTransport:uo(n),cloneTransport:ad(n),openSignIn:e}),t[104]=n,t[105]=ke}else ke=t[105];let Ae;t[107]!==n||t[108]!==ke?(Ae=(0,Z.jsx)(bp,{bridge:n,cloneController:ke}),t[107]=n,t[108]=ke,t[109]=Ae):Ae=t[109];let je;return t[110]!==fe||t[111]!==he||t[112]!==xe||t[113]!==Oe||t[114]!==Ae?(je=(0,Z.jsxs)(`div`,{className:`relative flex h-screen w-screen flex-col overflow-hidden bg-primary-foreground dark:bg-background text-foreground`,children:[q,fe,pe,me,he,xe,Oe,Ae]}),t[110]=fe,t[111]=he,t[112]=xe,t[113]=Oe,t[114]=Ae,t[115]=je):je=t[115],je}function Mp(e){return!e.missing}function Np(e){let t=(0,$.c)(14),{title:n,description:r,onClick:i,dataTestId:a,Icon:o}=e,s;t[0]===o?s=t[1]:(s=o?(0,Z.jsx)(o,{className:`size-4 shrink-0 text-muted-foreground`}):null,t[0]=o,t[1]=s);let c;t[2]===n?c=t[3]:(c=(0,Z.jsx)(`span`,{className:`font-medium text-gray-700 dark:text-foreground text-sm`,children:n}),t[2]=n,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs leading-snug`,children:r}),t[7]=r,t[8]=u);let d;return t[9]!==a||t[10]!==i||t[11]!==l||t[12]!==u?(d=(0,Z.jsxs)(Ai,{type:`button`,variant:`outline`,onClick:i,"data-testid":a,className:`h-auto flex-col items-start justify-start gap-1.5 whitespace-normal bg-card px-4 py-3.5 text-left`,children:[l,u]}),t[9]=a,t[10]=i,t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function Pp(e){let t=(0,$.c)(33),{project:n,branch:r,onOpen:a,onRemove:o}=e,{_:c}=i(),{name:l}=n,u=n.missing,d=n.missing&&`opacity-50`,f;t[0]===d?f=t[1]:(f=Oi(`h-auto min-w-0 flex-1 justify-between gap-2 py-3.5 pl-4 pr-2 text-left hover:bg-transparent`,d),t[0]=d,t[1]=f);let p;t[2]===n.name?p=t[3]:(p=(0,Z.jsx)(`span`,{className:`font-medium text-sm text-gray-700 dark:text-foreground`,children:n.name}),t[2]=n.name,t[3]=p);let m;t[4]===n.path?m=t[5]:(m=(0,Z.jsx)(`span`,{className:`truncate w-full text-muted-foreground text-xs`,children:n.path}),t[4]=n.path,t[5]=m);let h;t[6]!==p||t[7]!==m?(h=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-1 truncate`,children:[p,m]}),t[6]=p,t[7]=m,t[8]=h):h=t[8];let g;t[9]!==r||t[10]!==n.missing||t[11]!==n.path?(g=n.missing?(0,Z.jsx)(le,{className:`text-2xs rounded-sm`,variant:`warning`,children:(0,Z.jsx)(s,{id:`VU3Nrn`})}):r===null?null:(0,Z.jsxs)(`span`,{className:`flex max-w-[40%] items-center gap-1 text-muted-foreground text-xs`,"data-testid":`nav-recent-branch-${n.path}`,children:[(0,Z.jsx)(He,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,Z.jsx)(`span`,{className:`truncate`,children:r})]}),t[9]=r,t[10]=n.missing,t[11]=n.path,t[12]=g):g=t[12];let _;t[13]!==a||t[14]!==n.missing||t[15]!==f||t[16]!==h||t[17]!==g?(_=(0,Z.jsxs)(Ai,{type:`button`,variant:`ghost`,onClick:a,disabled:u,className:f,children:[h,g]}),t[13]=a,t[14]=n.missing,t[15]=f,t[16]=h,t[17]=g,t[18]=_):_=t[18];let v;t[19]!==c||t[20]!==l?(v=c({id:`hDoLrm`,values:{projectName:l}}),t[19]=c,t[20]=l,t[21]=v):v=t[21];let y;t[22]===c?y=t[23]:(y=c({id:`Es-eZU`}),t[22]=c,t[23]=y);let b=`nav-recent-remove-${n.path}`,x;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(Rs,{"aria-hidden":`true`}),t[24]=x):x=t[24];let S;t[25]!==o||t[26]!==y||t[27]!==b||t[28]!==v?(S=(0,Z.jsx)(Ai,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:o,"aria-label":v,title:y,className:`pointer-events-none mr-2 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100 focus-visible:pointer-events-auto focus-visible:opacity-100`,"data-testid":b,children:x}),t[25]=o,t[26]=y,t[27]=b,t[28]=v,t[29]=S):S=t[29];let C;return t[30]!==S||t[31]!==_?(C=(0,Z.jsxs)(`li`,{className:`group flex items-center justify-between rounded-lg hover:bg-accent`,children:[_,S]}),t[30]=S,t[31]=_,t[32]=C):C=t[32],C}async function Fp(e,t,n){await e.project.open({path:t,target:`new-window`,entryPoint:n})}var Ip=e=>{let t=(0,$.c)(8),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{theme:r}=Ar(),i=r===void 0?`system`:r,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={success:(0,Z.jsx)(us,{className:`size-4`}),info:(0,Z.jsx)(Qo,{className:`size-4`}),warning:(0,Z.jsx)(as,{className:`size-4`}),error:(0,Z.jsx)(mu,{className:`size-4`}),loading:(0,Z.jsx)(Te,{className:`size-4 animate-spin`})},o={"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={classNames:{toast:`cn-toast`}},t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,Z.jsx)(zs,{theme:i,className:`toaster group`,icons:a,style:o,toastOptions:s,...n}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c},Lp=Symbol.for(`ok.client.fetchWrapper`);function Rp(e={}){if(typeof window>`u`)return;let t=e.apiOrigin&&e.apiOrigin.length>0?e.apiOrigin:void 0;if(window.fetch[Lp])return;let n=window.fetch.bind(window),r=J(),i=((e,i)=>{let a=Bp(e,t);if(!a.isApi)return n(e,i);if(e instanceof Request){let t=zp(e.headers,r);return n(new Request(a.url,e),{headers:t})}let o=zp(i?.headers,r);return n(a.url,{...i,headers:o})});i[Lp]=!0,window.fetch=i}function zp(e,t){let n=new Headers(e);for(let[e,r]of Object.entries(t))n.set(e,r);return n}function Bp(e,t){if(typeof e==`string`){if(e.startsWith(`/api/`))return{isApi:!0,url:t?t+e:e};let n=Vp(e);return n&&Hp(n,t)?{isApi:!0,url:e}:{isApi:!1,url:e}}let n=e instanceof URL?e:Vp(e.url,window.location.origin);if(n&&Hp(n,t)){let r=e instanceof URL?e.href:e.url;return t&&(n.origin===window.location.origin||n.protocol===`file:`)?{isApi:!0,url:t+n.pathname+n.search+n.hash}:{isApi:!0,url:r}}return{isApi:!1,url:e instanceof URL?e.href:e.url}}function Vp(e,t){try{return new URL(e,t)}catch{return null}}function Hp(e,t){if(!e.pathname.startsWith(`/api/`))return!1;if(e.origin===window.location.origin||e.protocol===`file:`)return!0;if(t){let n=Vp(t);if(n&&e.origin===n.origin)return!0}return!1}var Up={messages:JSON.parse(`{"-3Qbv7":[["count","plural",{"one":["matches ","#"," file"],"other":["matches ","#"," files"]}]],"-3ois8":["Hard break"],"-8PP0T":["Match case"],"-K0AvT":["Disconnect"],"-KCZ6n":["Mark a block as the source of truth. Mirror references elsewhere render this content read-only and update live as you edit here."],"-LHLx7":["edited template"],"-QCLWk":["Templates available"],"-Qw-1t":["GitHub authentication failed. Try signing in again."],"-WFFG2":["Default properties"],"-YV1Uo":["Pattern ",["patternNumber"]],"-g6KIS":["Unrecognized link"],"-gdcIo":["Auto-sync is on — your commits push and remote changes pull on intervals."],"-i7ik4":["Collapse burst ",["burstNumber"]," diff"],"-lCAuQ":["Loading graph"],"-q4abP":["Results capped — this workspace has more files than search can index. A missing file may be a cap artifact, not a typo."],"-slrNR":["Toggle a task list."],"-wePNM":["Search matches file names, paths, and folders. Open a file to search its body (⌘F)."],"-zy2Nq":["Type"],"0-31GV":["Removing"],"02P3hL":["Upload failed: ",["message"]],"04RA0-":["Failed to enable sync — ",["detail"]],"05n5wS":["Doc mention suggestions"],"06SZfb":["Template \\"",["trimmedTitle"],"\\" created"],"07gHun":["You don't have access to this private repo. Sign in with an account that does."],"07q4Qk":["File sidebar"],"09Tv5j":["Reconnecting…"],"0BB9ID":["No headings yet."],"0E9DR6":["Type to find a doc"],"0Gd0NU":["Shared"],"0HYJGg":["Cursor (CLI)"],"0NA4b3":["Keep my version"],"0YEbfk":["Connect to AI tools"],"0_J12R":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in ",["targetLabel"]],"0eHrMb":["Could not complete delete"],"0jD-Gn":["A team knowledge base, a personal wiki, project docs..."],"0kTAXe":["Open source: ",["mirrorSrc"]],"0njBIq":["Setup files include: <0>.ok/</0>, AI-tool MCP configs (<1>.mcp.json</1> and per-tool files), project skills, and <2>.claude/launch.json</2>.<3/><4>Shared</4> commits them to git, so anyone who clones the repo gets the same setup. <5/><6>Local only</6> keeps them out of git (via <7>.git/info/exclude</7>)."],"0rwwOn":["By tag"],"0s8-e8":["Select, enter, or leave block components and fallback source blocks from keyboard boundaries."],"0t0bbC":["Could not save sync preference: ",["detail"]],"0uTHCg":["Start a new OpenKnowledge project."],"0wswKc":["Horizontal rule that divides sections."],"0xnmlQ":["Repository name"],"0yL--g":["Review conflicts"],"12F9WL":["(no id)"],"16D5Zj":["Are you sure you want to delete ",["itemName"],"? This action cannot be undone."],"1AumWo":["Push failed — check the server logs for details."],"1EcCom":[["keyName"]," value"],"1FLarN":["Describe what you want to create to continue"],"1GhYxC":["of ",["totalPages"]],"1HBhDS":["Checking out files"],"1MGRQl":["Terminal sessions"],"1QfxQT":["Dismiss"],"1RluQD":["Show replace"],"1TNIig":["Open"],"1Ta7Fd":["Open ",["basename"]],"1WgmEM":["Failed to load template: ",["errorMessage"]],"1XSMhZ":["Switching to <0>local-only</0> will refuse until they're untracked via<1> git rm --cached</1>."],"1ZpfyB":["Open with AI ",["displayName"],", ",["hint"]],"1bDVu5":["Workspace Command Palette"],"1d1F11":["Select all files and folders"],"1di5fu":["Document not found"],"1nke1r":["Open ",["0"]," on GitHub (opens in a new tab)"],"1t_NnN":["Reject"],"2277Tu":["Collapse graph"],"237hSL":["Ended"],"25Pw6a":["Cloning"],"27XW26":["Clone happens in the Project Navigator. Reclick the share link there."],"29VNqC":["Unknown error"],"29XZXN":["Set git identity"],"2BBAbc":["List"],"2FYpfJ":["More"],"2GT3Hf":["Global"],"2QM24L":["All tags"],"2RBzMG":["Network error — check your connection and try again"],"2XQ8Ww":["Open preview when agent edits"],"2YOwme":["Restarted — now running v",["appRuntime"],"."],"2YZwPB":["Forward-links response did not match expected shape."],"2Znqb1":[" (missing)"],"2fkdnR":["Nothing to undo on this file"],"2hpdRq":["Hide panel (",["panelShortcutLabel"],")"],"2n3oDU":["Project-level pages ordered by inbound link count, up to ",["FULLSCREEN_HUB_LIMIT"]," results."],"2q_Q7x":["Visibility"],"2ryd91":["Failed to rename property"],"2tgFCe":["Starting clone"],"2vIPtm":["Open link in new tab"],"2wxgft":["Rename"],"322lyb":["Highlight tips, warnings, and notes."],"34qyH5":["Could not reach server"],"36WXSC":["Couldn't delete template: ",["error"]],"379t2h":["Unified diff"],"38foVZ":["Loading diff"],"3DTatP":["Copy a prompt for your agent, start a blank file, or scaffold from a template."],"3Fcb0I":["Open graph"],"3HNlwb":["Hello, world!"],"3Ib6FN":["Move down"],"3IseAk":["Install an AI agent to create with AI"],"3J7d2N":["Big section heading."],"3JYy1p":["Branch ",["0"]," no longer exists. Cloned to default branch."],"3MnvrL":["Showing top ",["0"]," matches — keep typing to narrow"],"3Mwaly":["Could not initialize ",["0"],"."],"3SDfZl":["<0>Mirror — pick a source.</0> Set <1>src</1> + <2>anchor</2> via the property panel to point at a <3><MirrorSource></3> elsewhere."],"3TCafD":["Stored on this machine."],"3VbwPp":["Open ",["keyName"]," in browser"],"3VsNTI":["Loading document"],"3YvS-c":["New tab"],"3_6U6f":["Connect to GitHub"],"3__SjS":["breadcrumb"],"3a_Bd7":["Open source doc: ",["mirrorSrc"]],"3aeN7X":["All files"],"3h5zMp":["Something went wrong loading the settings panel."],"3iyGWF":["Open recent project"],"3jod3l":["Connect GitHub"],"3m2GBo":["Searching docs"],"3mFsc3":["Restore with remote changes"],"3o3tur":["Starter content"],"3oh0nQ":["Nested .okignore error in ",["path"]],"3pU8e-":["Pin tab"],"3wiBAs":["Where should it live?"],"3y6XTb":["Semantic search"],"3zyg_A":["Ignore patterns"],"438Fca":["Cloned successfully, but could not open the project."],"44DSl0":["Already have a git repository? Add it with <0>git remote add origin <url></0> in this project's folder. This page updates automatically once a remote is detected."],"45MZFs":["Commands"],"484LKL":["Remove link"],"48uGTI":["Failed to load docs. Press Escape and re-open to retry."],"4A3Yzu":["Code block"],"4BITzH":["Error:"],"4CfgPM":["Project folder created, but git init failed. Try again."],"4Gz2wC":["Failed to upload file"],"4KmEoC":["Hotkeys"],"4NC2Ym":["Move to the next or previous table cell."],"4PYsOz":["Hide Files (",["sidebarShortcutLabel"],")"],"4Sxexw":["Source undo or redo"],"4TzU0n":["Initialize"],"4buZWd":["Inherited from ",["path"]],"4c_a6S":["Nothing set yet."],"4g19V6":["Failed to update property"],"4hJhzz":["Table"],"4jDd0j":["Anyone can see"],"4niEzY":["Sandboxed HTML embed — write HTML, see the rendered preview live."],"4nj6n8":["/api/config returned HTTP ",["code"]],"4rjwLG":["Create with ",["0"]," CLI"],"4sKwf6":["File already exists"],"4uNLmk":["Pulling"],"4v2Yyz":["Select every visible file-tree row when focus is in the Files sidebar."],"4xtLTl":["Hidden folder “",["basename"],"”"],"4zGlN_":["Paste image URL or click upload"],"5-FeN2":["Share URL"],"54Y6Fg":["Could not load templates. Try again later."],"56WWtu":["Couldn't load starter packs: ",["error"]],"56xUL1":["Property name"],"57fiu8":["(read-only — edit in source mode for now)"],"5ALjdr":["Move through visual-editor find results from the find field."],"5Ajb15":["The formula <0>c = √(a² + b²)</0> renders inline."],"5ClEAu":["Inline hashtag for cross-doc grouping."],"5D3Ior":["Hide folder"],"5DFPDh":["Started a fresh OpenKnowledge server (v",["appRuntime"],") for this dev session — the server already running for this project was terminated. Connected agents (Claude Code, Codex, Cursor) just lost their OpenKnowledge MCP connection; restart the agent, or toggle its OpenKnowledge MCP server off and on, to reconnect."],"5F5HYj":[["ahead"]," ahead, ",["behind"]," behind"],"5GKMSz":["Indent or outdent the current list item."],"5GRxoA":["Search files, folders, and commands for the current workspace."],"5LXwX8":["This permanently removes ",["path"],". Agents that reference this template by name will fail until it's recreated or replaced by one in a parent folder."],"5OTgC7":["Open and focus the bottom Ask AI prompt composer."],"5OqaJi":["Enter a project name"],"5QGTaA":["Could not copy relative path"],"5SwVv1":["Not installed"],"5Tk8Fb":["Loading files"],"5WDhAk":["Link to a page or external URL."],"5ZB7XC":["File drop zone"],"5gr_ev":["Becomes the document's content when someone creates a doc from this template. Type <0>",["dateToken"],"</0> or <1>",["userToken"],"</1> to fill in today's date or the author's name automatically."],"5kWklo":["(some may already be hidden by other rules)"],"5lWFkC":["Sign in"],"5mksg0":["Failed to disable semantic search — ",["detail"]],"5qNxOe":[["count","plural",{"one":["#"," item could not be moved to the Trash. Do you want to permanently delete instead?"],"other":["#"," items could not be moved to the Trash. Do you want to permanently delete instead?"]}]],"5wV2qQ":["and more"],"5y_9lO":["Waiting for authorization"],"62Pc08":["Install for Claude Chat & Cowork (Desktop App)"],"636K3K":["Delete adjacent chip"],"67f-3g":["Duplicate succeeded but the sidebar may be out of date — refresh to resync"],"6Aih4U":["Offline"],"6LbUG7":["The repository is private and your GitHub account doesn't have access to it."],"6MnZEC":["Terminal failed to load"],"6O626z":["No headings match \\"",["trimmedAnchorQuery"],"\\""],"6Pxqwv":["No project templates yet. Create one to make it available everywhere in this project. Folder-scoped templates live on each folder's overview page."],"6Uau97":["Skip"],"6V3Ea3":["Copied"],"6VqW-1":["Remove ",["keyName"]],"6WdDG7":["Page"],"6YtxFj":["Name"],"6_ZOw4":["Copied full path"],"6bTTAN":["Invalid input — pick a different folder."],"6cR-PU":["Already open"],"6caB2T":["Connect an existing repository"],"6cuT_1":["Open date picker for ",["keyName"]],"6cyguR":["Connect GitHub to continue."],"6eniID":["Map the architecture"],"6fGjTz":["Show fewer"],"6gRgw8":["Retry"],"6h4zVU":["What would you like to create?"],"6hfDJr":["Server error: ",["status"]],"6ibbCg":["Create your first file"],"6ki7F2":[["0","plural",{"one":["#"," item"],"other":["#"," items"]}]],"6m_7We":["Open this settings dialog."],"6q0rnH":["writing"],"6qMe0o":["Draft a technical spec for my project. Start with an overview, then add cross-linked pages for the architecture, the key modules, and the open questions, all linked from a specs index."],"6s7LXO":["Heads up"],"6u9LvN":[["days","plural",{"one":["#"," day ago"],"other":["#"," days ago"]}]],"6vEr3W":["Link target"],"74-bX-":["A pull quote stands out from the surrounding text."],"74eHt-":["No file or folder selected"],"75Y1dk":["Horizontal pill strip + active panel below; click a pill to switch panels."],"77SdEP":["Delete ",["itemName"]],"7FamGZ":["Go to line"],"7Fkcej":["+ Add ",["addChildName"]],"7H4UHD":["Documents tagged <0>#",["tagName"],"</0>"],"7JtSLi":["Failed to delete path"],"7KeV5F":["Undo all failed: ",["message"]],"7OhaRy":["Source search"],"7Ongq0":["Condense my AGENTS.md file to less than 40k characters"],"7OwvEL":["Show HTML preview"],"7PNNNs":["This sends content off your machine"],"7PzzBU":["User"],"7YRrJ9":["Available in the OpenKnowledge desktop app. From a terminal, use<0> ok config-sharing status</0> / <1>share</1> / <2>unshare</2>."],"7_bFEL":["Drag ",["patternText"]," to reorder"],"7apDiJ":["A folder named <0>",["sanitized"],"</0> already has files here. Pick a different name."],"7d1a0d":["Public"],"7hctf2":["Describe the project you want to create"],"7qRHf0":["Install for Claude Chat & Cowork"],"80c4-P":["Code copied to clipboard"],"81H_23":["Add properties"],"881Uwh":["Delete selected table"],"89TtiD":["New file from template \\"",["displayTitle"],"\\" (",["fileName"],") in the project root"],"8BsGpU":["A key is set, but the embeddings provider rejected it or was unreachable — search fell back to keyword matching. Check the key in <0>Settings → Account</0> and your provider settings."],"8F1i42":["Page not found"],"8FqTCr":[["chunksRemaining","plural",{"one":["#"," unresolved hunk"],"other":["#"," unresolved hunks"]}]],"8IP5jY":["Each selected tool gets an OpenKnowledge MCP entry."],"8Jm2EP":["Toggle heading levels 1 through 6."],"8OGgNM":["Open or close visual-editor find."],"8OxKZy":["Move succeeded but the sidebar may be out of date — refresh to resync"],"8PmoQF":["Open the insert menu in an empty or active text position."],"8RtNI0":["Failed to load documents"],"8S1E33":["Search recent projects..."],"8TLE9g":["Read-only copy of a MirrorSource block from another doc. Edit at the source — every Mirror reflects the change live."],"8XQRON":["Loading repositories"],"8_brI5":["Name is required"],"8cS0nH":["Config sharing unavailable: ",["0"],"."],"8cpOa8":["Couldn't disconnect — please try again."],"8cpeU3":["Shared repositories"],"8eW0WQ":["No matching repositories."],"8fRyLo":["Invalid patch payload"],"8fc_3j":["Protected branch — cannot push"],"8m8diM":["No location selected. Use Browse to choose a folder."],"8tjQCz":["Explore"],"8uAWix":["This template lives in a parent folder — deleting it affects every folder beneath it that doesn't define its own version."],"92rbk2":["Mirror loading <0>",["mirrorRef"],"</0>"],"96G6Re":["New folder"],"96w9hU":["Something went wrong opening this file (HTTP ",["status"],")."],"99eR72":["Visual editor table selection"],"9Bd18D":["Failed to load hub pages"],"9NJWgv":["Backlinks"],"9PQysm":["Hide advanced"],"9R7pRC":["No tags match \\"",["trimmed"],"\\". Continue typing to create one."],"9UQ730":["Clone"],"9V0W-R":["Adds the OpenKnowledge skill to the <0>Claude Desktop App</0> so it's available in Chat and Cowork sessions."],"9bCiQ8":["No pages are missing incoming graph links."],"9clcD5":["Open documents tagged #",["chip"]],"9dw5bW":["Create with ",["0"]],"9euN0m":[["count","plural",{"one":["#"," more cross-doc participant"],"other":["#"," more cross-doc participants"]}]],"9fhQRL":["Beta channel"],"9fvog2":["Preview unavailable: ",["errorDetail"]],"9i21pa":["Commits happen automatically"],"9jnjV0":["Embed an audio file with native player controls."],"9npOH9":["Open file"],"9o1bIV":[["behind"]," behind"],"9oE4C3":["Browse your repos:"],"9tJX8r":["By meaning"],"9zb2WA":["Connecting"],"A1taO8":["Search"],"A5CYnd":["Broken link"],"A5hiCy":["Create template"],"A67Uwj":["Still loading"],"A6h5b-":["File duplicated"],"AAlr5Y":["No collab server for this worktree — run <0>ok start</0> here, or reopen the project."],"AB4qw9":["New terminal"],"AE7BY3":["The terminal session ended."],"AIn2Yv":[["displayName"]," CLI, ",["hint"]],"ALhMYW":["Terminal"],"AQ-Lfg":["Couldn't load templates"],"AQGtjK":["Commands run with the full access of your macOS user account on this machine. Turn this off to disable the shell."],"AVW-K9":["Failed to load orphan pages"],"AWOSPo":["Zoom in"],"AcK_r0":["Claude CLI"],"AdcGcG":["Applying your change"],"AddR83":["Could not create project. Try again or pick a different location."],"AeHuzT":["# One pattern per line.\\n# Examples:\\n# drafts/\\n# *.draft.md\\n# !keep.md"],"AeXO77":["Account"],"AiNMQ7":["This project lives only on this computer. Connect it to GitHub to back it up and share it with other people."],"Aif3E7":["Enable semantic search"],"Am78jY":["Drag ",["keyName"]," to reorder"],"Aq-O0x":["status"],"AqnqMJ":["API key set"],"ArBWJf":["Undo last edit"],"B11p-O":["Edit markdown link"],"B2DrPb":["Auto-save"],"B3NAZC":["Open Navigator"],"B4_ipX":[["conflictCount","plural",{"one":["#"," file conflicted"],"other":["#"," files conflicted"]}]],"BAH4qX":["Selected graph item"],"BBqGS9":["Desktop"],"BD0XSC":["Failed to load project templates"],"BEkF-P":[["userName"],", ",["tabCount","plural",{"one":["#"," concurrent tab"],"other":["#"," concurrent tabs"]}]],"BGHHtQ":["Single page"],"BH56dn":["Custom display text"],"BQKHuL":["Restart terminal"],"BQu9Pg":["Symlink"],"BY-g4_":["Add pattern"],"Bdha5y":["Publishing..."],"BeWTQy":["Loading starter packs"],"BgV29F":["Visual editor find input focused"],"Bv5a9_":["Selection statistics"],"Bx4EXG":["Actions for ",["label"]],"By-7Pn":["Toggle a bullet list."],"BymzO4":["Document outline"],"C37Zkt":["Send to"],"C62P6b":["Editor selection"],"C9TBvF":["No Outgoing"],"CCTop_":["Recent"],"CKyk7Q":["Go back"],"COr1Y7":["Pick <0>openknowledge.skill</0> from your <1>Downloads</1> folder. It enables automatically."],"CSL0l1":["Couldn't clear the key — please try again."],"CTJLpz":["\\"",["trimmed"],"\\" already exists here"],"CU3AiE":["Switching branches"],"CXj9C-":["New property name"],"C_WGy8":["This file is too large to open in the built-in text editor (1 MB limit). Use Open file below to open it in another app."],"C_cPoW":["Your GitHub session expired — sign in again to verify push access."],"ChAtFg":["You don't have permission to push to this repo"],"Ck9XRt":["Couldn't save the key — please try again."],"CmeH9S":["Add property to ",["keyName"]],"CvsD6Y":["via ",["viaTags"]],"D4H2N6":["Remove ",["tag"]],"D8OV7J":["Only collaborators"],"DDTdLl":["Code block settings"],"DELNQk":["Collaborators see your in-progress edits as soon as they sync."],"DF1MtZ":["Loading conflict for ",["filePath"]],"DFfRbX":["Sync status: ",["syncStateLabel"]," — git identity unset"],"DId6MT":["Project-level pages with no outgoing graph edges."],"DPfwMq":["Done"],"DVh_Tb":["Failed to clean up after trash"],"D_WKe_":["Click an agent's avatar in the presence bar to view their session."],"DbILZA":["No matches. Some files are excluded from search (hidden or ignored files)."],"DeDYLr":["Unrecognized wiki link"],"DhLHEb":["Failed to load activity"],"DiFKSL":["Counting markdown files"],"Dnn2XG":["Automatic"],"DrYM2Z":["Sync disabled"],"DskIkK":["Sign-in stream ended without confirmation — please try again"],"Dub54T":["Preview browsers can't auto-copy. Use Cmd/Ctrl+C on the URL above, or open OK in the desktop app."],"Dw1T_W":["Rename ",["label"]],"E1_c72":["Task list"],"E1tG2u":["Get Claude Code"],"E2Mv-X":["Copy source"],"E4XYYH":["Enable terminal for this project"],"E6lrpp":["Manage the GitHub account OpenKnowledge uses to browse and sync your repositories."],"E7BhZn":["Blank note"],"E9bKSA":["Creating"],"EBVbtP":["Could not duplicate item"],"EDm3wJ":["Loading diff renderer"],"EEYbdt":["Publish"],"EJuO7B":["Connect a GitHub account to browse and sync your repositories."],"EL_YRd":["Mirror of <0>api-spec</0>"],"EOjU5V":["Inline Math Properties"],"ETyvvg":["No language match."],"EVnzPs":["Edit with AI"],"EWX92Z":["Collapse Ask AI"],"EZVxVz":["Replace the active match from the replace field."],"E_BHoD":["Could not move \\"",["targetName"],"\\" to the Trash. Do you want to permanently delete instead?"],"E_tNGD":["Connected as @",["login"]],"EarrCe":["Search emoji"],"EbZT7P":["Toggle the left file sidebar."],"EcM3k7":["Failed to clean up pending ",["kind"]],"EcR0fl":["Checking for installed agents"],"EdQY6l":["None"],"EeRZnZ":["Expand burst ",["burstNumber"]," diff"],"Ef7StM":["Unknown"],"EhDLBx":["You modified <0>",["filePath"],"</0> locally, but it was deleted upstream."],"Ehkru0":["Open, navigate, accept, or dismiss CodeMirror completion suggestions."],"EiVgl5":["You don't have permission to push to this repo."],"Eji13z":["Toggle highlight formatting."],"El7NbA":["Heading 2"],"Emz5BG":["Embeddings are computed only when a search runs and are cached locally under <0>.ok/local</0>."],"EqrC_R":["Undo failed: ",["message"]],"EqtBXb":["Visual editor find open"],"ErRi6L":["Template \\"",["label"],"\\" deleted"],"Es-eZU":["Remove from recent projects"],"Ev2r9A":["No results"],"EvPX7f":["Opens a folder picker to choose where to clone the repository."],"Evq3lu":["Orphan mode"],"ExPiRQ":["Move to the next CodeMirror lint diagnostic."],"F-NRCj":["Add property"],"F-vBv0":["Ask"],"F0OA00":["Get ",["displayName"]],"F1T9y_":["Showing top matches — keep typing to narrow"],"F4IYWe":["Share doc"],"F4vEsL":["Sync status: ",["syncStateLabel"]],"F6pfE9":["Active"],"FBknns":["HTML"],"FCAcjR":["Run a real terminal docked inside OpenKnowledge, starting in this project's folder."],"FCxvG5":["First item"],"FEK4oC":["OpenKnowledge will be initialized at <0>",["gitRoot"],"</0> — the parent of your new folder, because it contains a <1>.git</1> folder (one project per git repo)."],"FEr96N":["Theme"],"FNTx6u":["Search \\"",["semanticSubmitQuery"],"\\" by meaning"],"FOGD7m":["Create something great."],"FOyCTr":["Your OpenAI API key, used only to create embeddings of your content for semantic search. Stored once for this machine in <0>~/.ok/secrets.yml</0> (readable only by your user account) and shared across all projects. Turn the feature on per project in This project → Search."],"FRYB1Q":["/api/config returned a malformed body"],"FTUGgh":["Enter a repository URL or owner/repo"],"FUMerq":["Could not enable sync: ",["detail"]],"FWQuPE":["This project is running a different, incompatible build of OpenKnowledge than this app (v",["0"],")."],"FjkaiT":["Zoom out"],"FnMkli":["Sync disabled — you don't have permission to push"],"FqTpiN":["Bird wiki"],"Fqr8BP":["Multi-page PDF viewer with toolbar controls (thumbnails, page nav, zoom)."],"FvMSms":["Renaming changes the file on disk and the id agents use to pick this template."],"FvpFSZ":["Reveal in Finder, ",["hint"]],"Fxf4jq":["Description (optional)"],"FyW0WO":["Authorize in browser"],"G-JBA1":["Source mode requires a live connection — your edits are saved and will appear when you reconnect."],"G0YZ-I":["Indent or outdent list item"],"G1Gw0v":["New template"],"G1XxbZ":["Checkbox"],"G4-bgo":["Ask AI (from selection)"],"G7-rf8":["Pattern syntax error: ",["message"]],"G7cMuO":["HTML preview"],"G8t9NN":["Add a property"],"GA-UkN":[["keyName"]," type: ",["typeLabel"],". Click to change."],"GDvlUT":["Role"],"GGsM4y":["Selected in graph"],"GJH-AT":[["docName"]," is ",["0"],". OpenKnowledge currently opens files up to ",["1"],"."],"GK-IRZ":["Undo buttons are disabled — per-session state has been garbage-collected."],"GN6L5F":["Filename"],"GQDSBN":["Layout options"],"GUYwCr":["Dismiss notice"],"GUpclA":["Created if missing; reused if it exists."],"GUqTzn":["Competitor research"],"GXf9hG":["Cloning ",["repoName"],"..."],"G_686w":["Task List"],"G_mWXb":["Filter languages"],"GamjcN":["Template saved"],"GemPfn":["Failed to parse forward-links error response (HTTP ",["status"],")"],"Gfr4fu":["Server can't open documents"],"GhjUB_":["Reconnected"],"Gp_twO":["Local path"],"GsBUCk":["Loading settings"],"GubkSu":["Use a starter pack"],"GuqOb1":["Failed to load headings"],"Gx0VS1":["e.g. drafts/ or *.draft.md"],"H-vDm3":["Relaunching to install the update…"],"H0WlWQ":["Grid of rows and columns with a header row."],"H86f9p":["Collapse"],"H8Ng4Z":["Search recent projects"],"HCn0Ay":["Toggle strikethrough formatting."],"HGNCsl":["Connection lost — keep this tab open, your edits will sync when reconnected"],"HIb0vl":["Network error — please try again"],"HM56Bx":["Creating..."],"HNnVG1":["No other recent projects."],"HPTPGr":["Create a new spec file for my user story"],"HXFyWD":["Split diff"],"HdkSiO":["New file"],"HfI1dR":["I already have it locally →"],"Hl89Qd":["Loading templates"],"HlmZBk":["Documents response did not match expected shape."],"HpK_8d":["Reload"],"HptUxX":["Number"],"HqiZvw":["OpenKnowledge stores its configuration and internal files inside a newly created <0>.ok</0> directory in your project root folder."],"Hrz9NY":["Wiki link"],"I1gRhX":["Failed to rename"],"I5AfhE":["Sync status unavailable — server unreachable."],"IA1wNb":["The Claude Desktop App didn't open the file. Is it installed? (",["msg"],")"],"IA6JW2":["Detecting"],"ICoNYz":["You can also manage this in Settings."],"IInnZo":["Conflict"],"IKoTAC":["Keep disabled"],"IN4UX8":["Search (",["searchShortcut"],")"],"INEQsp":["Items to be created"],"IQPyrD":["Missing page — click to create"],"IRv9cH":["Cloned ",["repoName"],"."],"IWGfGF":["Checking your GitHub connection"],"IX7-sq":["Something went wrong opening \\"",["docName"],"\\"."],"IajAbS":["Add a starter pack"],"If0crP":["Open with AI ",["targetDisplayName"],", ",["hint"]],"IgTwLt":["Open this document in the editor and collapse the graph."],"Ik-gP0":["Heading H",["level"],": ",["text"]],"Iq8zdU":["Close terminal"],"IrB5AK":["Server-side cleanup failed for ",["failedCount","plural",{"one":["#"," item"],"other":["#"," items"]}]],"IreQBq":["Repository"],"It9ARY":["Toggle the right document panel."],"Ix0K8o":["Hide external URL nodes"],"J2MgzQ":["Undo all edits on ",["docName"]],"J2Mv98":["Name (e.g. ",["login"],")"],"J2eKUI":["File"],"J3HzPL":["Collapse ",["keyName"]],"J6N5MX":["Couldn't construct the share URL. Try Done and re-share."],"J6mxC1":["A network problem or GitHub outage interrupted the clone."],"JCxGEX":["No disconnected pages. Pages appear here only when they have no incoming and no outgoing graph edges."],"JE21eh":["Symlink to ",["targetPath"]],"JK-Ave":["Hide thumbnails"],"JLUTgi":["No tags yet — author \`#tagname\` in any doc to populate the index."],"JLzQi_":["Close ",["accessibleLabel"]],"JOcPqH":["Bring a remote repository onto this machine."],"JWsZlx":["Open a project to edit."],"JZ8cO6":["Light, dark, or follow the OS."],"Jejur6":["Couldn't load document"],"Jhj_lh":["Modify the link target, anchor, and display label."],"JkCD2u":["Sync paused — you don't have permission to push to this repo"],"JmfgFc":["(a worktree of ",["0"],")"],"Jqqevv":["System error"],"JtD-Br":["Page link"],"Jw6EC4":["Branch switch failed — try opening the ",["targetNoun"]," manually."],"K-a33w":["Start writing to create this page"],"K-h9cT":["Couldn't save the resolution for ",["filePath"],"."],"K0N7zS":["Config sharing status read failed"],"K1ckLX":["Failed to create folder"],"K6jjWB":[["packName"]," was already set up. Nothing to do."],"K6jxcj":["Add a key"],"K8-WWn":["Move between table cells"],"K9J00P":["Clone failed — connection error"],"KDuPiY":["Uploading ",["fileName"]],"KDw4GX":["Try again"],"KFdXwz":["Show panel (",["panelShortcut"],")"],"KH5bQi":["Using the <0>OK_EMBEDDINGS_API_KEY</0> environment variable (managed outside OpenKnowledge)."],"KIIamL":["OpenKnowledge will create commits and push them to your remote automatically. If you do not want automatic commits in your git history, you should not enable auto-sync."],"KOZud0":["Build a competitor research knowledge base. Start with an overview page, then add cross-linked pages for each competitor, their products and pricing, and the sources behind every claim."],"KPW5WC":["moved template"],"KRJ6xh":["No tags yet. Continue typing to create one."],"KWL_Ih":["Blog post"],"KX1MZR":["Your repositories"],"KYSocE":["Research the extinction of flightless birds"],"KYcZ6Y":["Above"],"KZLdgR":["See <0>#design-docs</0> for the latest specs."],"K_vT1F":["Upstream sync"],"KaFCD3":["Open this link in a new tab and collapse the graph."],"Kf7GG5":["Restarting the server…"],"Kgdbkt":["Switch to local-only refused"],"Kh1n4a":["<",["componentName"],"> isn't a known component. Copy the source to use it elsewhere, or delete the block."],"Khxcyu":["Terminal access isn't enabled for this project."],"KkEAud":["Create a file from the current document or folder context."],"KmydK6":["Bold"],"KnoB--":["Will be saved as <0>",["sanitized"],"</0>."],"KsAPaB":["This branch is checked out in:"],"KujtjC":["Find"],"L-rMC9":["Reset to default"],"L1ZE3M":["Document statistics"],"L3CEC1":["this item"],"L4Cdd9":["or create a new file <0/>"],"L6Hhh6":["(root)"],"L8fKuc":["Run this in your terminal"],"L9Y9Om":["Top linked pages"],"LBwUR6":["Branch switch timed out — try opening the ",["targetNoun"]," manually."],"LCUy_N":["Session ended"],"LDuM35":["Replace current match from field"],"LE7t79":["Clone to a new folder"],"LKOLNn":["No AI agents installed"],"LNum6A":[["minutes"]," min ago"],"LRgZAt":[["owner"],"/",["name"]," already exists"],"LXdWeS":["Medium section heading."],"LXfNU-":["Navigation and suggestions"],"LYufDw":["Failed to enable semantic search — ",["detail"]],"Lcehxn":["Save resolution"],"LdABLa":["Could not open ",["target"],". Try opening it manually."],"LdKIHS":["Draft a spec"],"LhQlGR":["This project is running an older version of OpenKnowledge (v",["0"],") than this app (v",["1"],")."],"LhWYpm":["Other OK paths are tracked upstream:"],"LlHqdU":["Initializing project"],"Llyqvo":["This usually means one of:"],"LpB85N":["Plain"],"LtI9AS":["Owner"],"LtSYdi":["Reveal in Finder"],"LuoJWu":[["truncatedShownCount","plural",{"one":["Showing the first item in one folder — the rest of that folder is hidden."],"other":["Showing the first ",["formattedCount"]," items in one folder — the rest of that folder is hidden."]}]],"M1OfV9":["Next source diagnostic"],"M3ytY_":["This looks like a drive root (e.g., C:\\\\). Scaffolding here will scan an entire drive."],"M5mfAe":["Add tag"],"M9597s":["Preparing share URL..."],"MCjC9A":["Delete ",["deleteDescriptorLabel"]],"MGb89P":["Insert, delete, move, copy, and indent source editor lines through CodeMirror's default keymap."],"MHrjPM":["Title"],"MKOVhz":["Enable git auto-sync"],"MQIM_Y":["Couldn't copy. Select the URL above to copy it manually."],"MTs6g3":["Couldn't reconnect after server restart"],"MUBR8r":["Rename succeeded but the tabstrip may be out of date — refresh to resync"],"MV-Dkb":["Found ",["countDisplay"]," markdown files"],"MVxpbf":["Find and replace"],"MWrUEd":["Undo all"],"MZSBsh":["No templates yet. Add one to give new docs in this folder a ready-made starting point."],"MZoxVx":["Failed to load tags. Press Escape and re-open to retry."],"Mb_20S":["Visual"],"Md709y":["Loading ",["fileName"]],"MmDDWK":["Recently opened"],"Mnavhe":[["propPanelDescriptorLabel"]," Properties"],"MqQoV-":["Describe what you want to build, start a blank file, or scaffold from a template."],"MrwYIK":["Toggle a source comment through CodeMirror."],"MsuXaI":["Hide panel (",["panelShortcut"],")"],"N1YYa7":["Loading image"],"N1mdmS":["This file can't be opened in the text editor."],"N2FcBE":["Synced"],"N2S1rs":["Empty"],"N2eHWq":["Code Block"],"N3_ozB":["Hubs"],"N55YNr":["Choose whether this project's OpenKnowledge setup, including its AI-tool connections, is saved with the project so teammates get it too, or kept only on your computer."],"NIWAux":["No docs registered under #",["tagDocsName"],"."],"NJyQi_":["Branch ",["shareBranch"]," no longer exists on the remote."],"NKkZXl":["Initialize and open"],"NOHyEE":["Retry push"],"NORKZU":["Pattern warnings: ",["summary"]],"NQ8llq":["Add item"],"NRSLBe":[["diffMin"],"m ago"],"NSnIUP":["Two-page (even)"],"NUr4kz":["A reusable starting point for new documents in this folder."],"N_7kkF":["Read through this codebase and draft a technical spec for the most complex module: an overview, the architecture, key files, and open questions, all linked from a specs index page."],"NjrIak":["File: <0>",["fixedName"],".md</0>"],"NkXEFS":["Restore failed — document unchanged"],"NmPNJJ":["Copy code"],"Nn4GgW":["Will be created as <0>",["sanitizedName"],"</0>"],"NnQapF":["Open with AI ",["targetDisplayName"]],"NpC29w":["Create a new list item from the current list item."],"Nu4DdT":["Sync"],"Nu4oKW":["Description"],"NuH1jp":["Public repository"],"Nv3mUj":["Show advanced"],"NvOvTi":["Create in <0>",["dirDisplay"],"</0>"],"Nx7BWE":["Git auto-sync"],"NxW-md":["Resize ",["handleKey"]],"NzFvyK":["Session ended — undo unavailable"],"O0Z2Xr":["Outgoing"],"O2UpM1":["Browse"],"O3oNi5":["Email"],"O6yEPk":["Create a new OpenKnowledge project in the folder of your choice."],"O7_W_a":["Open with AI"],"OD0FCX":["Hidden “",["basename"],"”"],"ODD5Jc":["Edit ",["templateLabel"]],"ODGGlj":["Folder name: ",["detail"]],"OETysD":["No hub pages yet. Hubs appear once pages accumulate inbound graph links."],"OJTOUj":["Requires ",["brand"],"."],"OJeiSH":["Failed to add property"],"OLBz-_":["Mermaid diagram failed to render."],"OLIKgw":["Drag item ",["0"]," to reorder"],"ONPvOb":["Loading agent activity"],"ONgEZF":["Loading headings for ",["pageTarget"]],"OTF92M":["Label <0>(optional display text)</0>"],"OUcBW4":["Codex CLI"],"OVjNeX":["Terminal ",["0"]],"OX2Neh":["Inline code"],"OYnx7O":["Path cannot start with \\"/\\""],"OdmsFg":["Failed to delete item"],"OgyJSr":["Local only"],"OiHJdA":["Move through slash, wiki-link, tag, and path suggestions; accept or dismiss the active suggestion."],"Okd2Xv":["Toggle underline formatting."],"OlAl5i":["Expand all"],"OmHTGj":["Disable git auto-sync"],"Oo_WWc":["No pages found"],"Oos8fo":["Copy command"],"OuY8t9":["Open in current branch"],"OvEjsP":["Copying..."],"Oxyd5f":["Pick a name"],"OyIC0Q":["Project name"],"P-ye9o":["Could not open folder picker"],"P3NS4G":["Pattern syntax error (line ",["lineNumber"],"): ",["message"]],"P3hnm0":["File too large to open"],"P47EWZ":["Could not update sidebar settings"],"P6gXB-":["Replace ",["keyName"]],"P6lAT3":["Folder target: ",["linkTitle"],". Click to open the overview."],"P8yDjG":["Name can’t be empty, \\".\\", \\"..\\", or contain / or \\\\"],"PB4upl":["Find previous match"],"PBwmDJ":["Searching by meaning"],"PBxg_E":["Not now"],"PKLY-1":["Opening..."],"PMyJ9C":["No edit session yet"],"PQCdtv":["\\"",["docName"],"\\" doesn't exist."],"PR9FSv":["Move to the next visual-editor find result."],"PVUn_c":["Open folder"],"PZt1uN":["Search files, commands, projects, and AI handoff actions."],"PdA9NZ":[["ahead"]," ahead"],"Pgu10b":["Saved as <0>",["slug"],".md</0>"],"PgzIpb":["Move to the previous visual-editor find result."],"PiH3UR":["Copied!"],"PkeYXL":["Expanded graph mode"],"Pkw7J9":["This folder is empty."],"PqYWiC":["Couldn't restart the server automatically. Try running \`ok stop all\` in a terminal, then reopen this project — or restart your computer if it persists."],"Pyp1NA":["Restore to this point?"],"Q5fqMz":["Connection error — try again"],"Q6hhn8":["Preferences"],"Q8A-U_":["Connected to"],"QDZbvN":[["diffDays"],"d ago"],"QOINDn":["empty"],"QQghPu":["Install in Claude Desktop"],"QR5SP1":["created template"],"QWks14":["A short line shown under the name in the template list."],"QYfQdv":[["displayName"]," CLI"],"QcpeeE":["Navigate to ",["docName"]],"QlxHAH":["Showing results for \\"",["semanticResultsLabel"],"\\""],"QqBQu1":["Label <0>(visible link text)</0>"],"Qvls7J":["Eng specs"],"QyioBP":["Move up"],"R0cyYB":[["0","plural",{"one":["#"," request blocked by the preview's security policy"],"other":["#"," requests blocked by the preview's security policy"]}]],"R0jJzV":["Paste URL, owner/repo, or search your repos"],"R3y75Z":["Edit source"],"R65q-K":["A real shell is off for this project. Turning it on runs commands with the full access of your macOS user account."],"RDjuBN":["Setup"],"RDrXh4":["Configure user, project, and integration settings."],"RG4XHV":["Copy ",["0"]," prompt"],"RGCCrg":["Copy share link"],"RGkNeJ":["Initialize a starter pack"],"RJ3a8Z":["Looking for <0>",["lookingForUrl"],"</0>."],"RN62Q8":["We'll build <0>openknowledge.skill</0>, save it to <1>~/Downloads</1>, and open the Claude Desktop App for you."],"RSqaSd":["Project root"],"RY6Bq1":["Open shared ",["targetNoun"]],"RaPMZv":["Keyboard shortcuts available in the editor and workspace."],"Rah7yq":["What should the AI do? (optional)"],"RfHNf8":["Open activity panel for ",["tooltipName"]],"RfaEio":["Toggle source comment"],"RgbKEe":["You don't have access to this repository."],"Rj01Fz":["Links"],"RlCInP":["Slash commands"],"RmBY0A":["No git remote"],"RobAKV":["Update the destination and optional section anchor."],"Rq1vFD":["Tree view options"],"RrAIZx":["What config sharing covers"],"Rx5ReQ":["Rename ",["keyName"]],"S33tz3":["Not connected"],"S6l5dv":["Could not start creating a new item"],"S9Vnum":["Remove ",["patternText"]],"SCoBBH":["Tag suggestions"],"SCzAbA":[["phase"]," — ",["pct"],"%"],"SEYWYq":["Undo all edits on this file?"],"SFN6dN":["Heading 3"],"STTOnz":[["keyName"]," type: complex value (nested; read-only)"],"SUOoXn":["Failed to open project."],"SYfHmN":["Unpin tab"],"Sc1bKE":["Local collaboration data for \\"",["docName"],"\\" could not be cleared in time. Reload to retry."],"ScwcF2":["A project already exists at this location. Pick a different parent folder."],"Sfh6zL":["The file on disk, and the id agents use. It can't be changed later."],"SgKLfA":["Not connected to GitHub."],"SiUUCS":["Next match"],"SkMZlS":["Couldn't remove <0>",["targetGitPath"],"</0>: ",["removeGitError"]],"SrOuyg":["Document panels"],"T-4cw2":["Pick a layout that matches what you're building. Each pack ships with folders, templates, and agent-readable descriptions. You can mix and match later."],"T-654M":["Loading PDF"],"T0OVm7":["The default branch is protected — pushes need a pull request."],"T67A0Y":["Auto-sync pushes/pulls commits to your git remote on intervals and on save. Toggling on requires confirmation."],"TEEPPF":["Will replace existing OpenKnowledge entry"],"TJnkyf":["ok ui responded but server.lock has no port yet"],"TKQ7K-":["Install"],"TLIO3j":["Toggle italic formatting."],"T_wG4n":["We couldn't check your GitHub connection."],"Ta25TG":["No history yet"],"TbjyhA":["Docs"],"Tgalot":["OpenCode (CLI)"],"ThmUrC":["Could not finalize project setup. Try again."],"Tjc1pH":["Section <0>(optional heading anchor)</0>"],"TwYboS":["Navigate CodeMirror source search results or dismiss the search panel."],"Tz0i8g":["Settings"],"Tz9pJB":["Clone stream ended unexpectedly — check if the clone completed"],"U2Kx6T":["Close all unpinned"],"U2pMtf":["tag-name"],"U3IvM5":["Full guide"],"U5Spo9":["Content directory must be inside the project"],"U8CD-l":["Copy full path, No workspace"],"UBv8UK":["Delete Permanently"],"UDFrWm":["Checking GitHub connection..."],"UL8A9w":["Tag"],"UQAp48":["Search templates"],"URmyfc":["Details"],"UTNVyS":["Select the full source document."],"UTZ97u":["Selection must be inside the project"],"UVLlMV":["Couldn't reach GitHub. Try again?"],"UW2Fg3":["This project's running server doesn't support live editing. Restart OpenKnowledge to fix."],"UW93oq":["Replace key"],"UYcGIW":["Connecting — waiting for collab server"],"Ua78MH":["no response"],"UaDyeb":["Hide selection preview"],"Uci-Ph":["Ordered List"],"Ud0Pj9":["<0>Mirror source removed.</0> The doc <1>",["src"],"</1> is no longer available."],"UfW9Kr":["Your search queries and the full text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"UkQGhd":["Hide replace"],"Up2_7p":["Copy full path"],"Uuj_R4":["New from template"],"Uw6ERJ":["Couldn't copy: ",["detail"]],"UyROxs":[["mins","plural",{"one":["#"," min ago"],"other":["#"," min ago"]}]],"V48OUT":["You deleted <0>",["filePath"],"</0> locally, but it was modified upstream."],"V7QxyT":["Connection dropped"],"VAHWL_":["Connected as <0>@",["signedInLogin"],"</0>"],"VNgKZz":["Advanced settings"],"VU3Nrn":["Missing"],"VUijjF":["Embed an image with optional alt text."],"VYd_YA":["Open an existing project folder from disk."],"VZGh8G":["Fold, unfold, fold all, or unfold all source ranges."],"VZSBXL":["Semantic ranking activates the first time an agent runs a search."],"V_6bJ4":["Terminal settings not loaded yet — try again in a moment."],"V_wltx":["Enter a title for this template."],"VbqhBI":["Already at ",["assetContentPath"]," — reusing."],"VcqWBy":["Upload may have succeeded but the sidebar is out of date — refresh to resync"],"VdXv4D":["Clone from GitHub"],"Vlc75q":["Keep file deleted"],"VuxVSP":["Start source completion"],"VvS_k_":["Config sharing is now local-only."],"W-ntoW":["heading-slug"],"W0i24j":["Object"],"W1qRuM":["This document is already active in the editor. Use Open to collapse the graph."],"W3Xlpc":["Set the auto-sync default for users opening this project for the first time. This setting is committed to your repository."],"W5A0Ly":["An unexpected error occurred."],"W7XJN4":["Can't nest projects. An OpenKnowledge project already exists at <0>",["rootPath"],"</0>. Choose a location outside it, or open that project instead."],"W8vpBM":["starter pack"],"W9_Bub":["Local changes overlap with incoming sync"],"WL6puM":["Path resolves outside project"],"WMIKXK":["Are you sure you want to delete ",["targetCount"]," selected items? Folders and all files inside them will be deleted. This action cannot be undone."],"WPwDin":["Open folder on disk"],"WR0y2O":["Share folder"],"WRNXKp":["Searching"],"WZ-vBy":["Permanently deletes <0>",["targetGitPath"],"</0> and all its git history. Working files stay in place. If the parent git repo is intentional (e.g. you cloned it), cancel and pick a location outside it."],"WamGNs":["Failed to load PDF: ",["error"]],"WcWS__":["Download file"],"Wcv-Zi":["Make this knowledge base available as a Claude Skill."],"We7h2I":["📝 or assets/icon.png"],"Weq9zb":["General"],"Wgmlsw":["Fetching"],"Wh0im4":["editing [[",["realCurrentDoc"],"]]"],"WhOsNE":["Strikethrough"],"WqLq6M":["Open with AI ",["displayName"]],"Wt5W56":["Sync is off — your edits will not sync to the remote repository."],"Wtw22s":["Installing"],"WyXG7w":["Close all"],"Wyxs0x":["Path cannot contain \\"..\\""],"X0ttSN":["No tags match \\"",["tagListQuery"],"\\"."],"X7u0xR":[["0"]," templates available"],"X8kjQX":["Re-authenticate with GitHub"],"X9VpsP":["Loading folder contents"],"XDzAnp":["Opens in a new tab"],"XH30C4":["document"],"XJOV1Y":["Activity"],"XPJ0sN":[["settingsDescriptorLabel"]," properties"],"XPqe3B":["Create new tag #",["tagValue"]],"XRuL0i":["Create page"],"XU0OXn":["Enable auto-sync"],"XW18jo":["Page headings response did not match success schema"],"XYlJJT":["Setting up"],"XcGbim":["Show hidden files"],"Xet9MX":["Failed to load backlinks"],"XfzqjK":["template \\"",["name"],"\\""],"Xl-UUg":["guides/install or https://example.com"],"XnlF3W":["Add the next matching source selection."],"XnoA1k":["This ",["targetNoun"]," only exists on branch <0>",["shareBranch"],"</0>. You have uncommitted changes that prevent switching. Commit or stash your changes, then open the share link again."],"XopE_I":["Failed to parse backlinks error response (HTTP ",["status"],")"],"XpIZmv":["Fenced code block with monospace text."],"XtRoxT":["Page ",["pageNumber"]],"XvPJaT":["Diff layout"],"Xv_ijG":["https://github.com/owner/repo or owner/repo"],"Xw_maT":["Type a query, then press ↵ to search your pages by meaning."],"XyOUTJ":["Exit merge"],"Xzy0s0":["Remove ",["fullLabel"]," from context"],"Y-Urt2":["Block math equation rendered with KaTeX from a LaTeX source string."],"Y1kX2z":["OpenKnowledge initializes at <0>",["projectDir"],"</0> — the parent of <1>",["pickedRelative"],"</1> because it contains a <2>.git</2> folder (one .ok/ per git repo). <3>Content directory</3> defaults to <4>.</4> (the whole repo); type a sub-folder to narrow it."],"Y8ViJx":["A newer version may have been deployed since this tab opened."],"YC6_wP":["Edit ",["keyName"]],"YEP3X2":["Delete a table when the active table cell selection covers the full table."],"YGIi_c":["Reinstall"],"YGQm6y":["OpenKnowledge manages the <0>open-knowledge</0> MCP server name, the <1>open-knowledge-ui</1> launch config, and <2>ok</2> / <3>open-knowledge</3> on PATH (including OK-owned symlinks). Using a custom wrapper? Register it under a different name."],"YKLP_-":["Template renamed"],"YPFBfr":[["detail"]," - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"YSFv5w":["No git repository — config sharing does not apply here."],"YTLmTM":["Remove the parent <0>.git</0> folder"],"YW7Q86":["Search settings not yet loaded — try again in a moment"],"Y_kL7X":["Customize how the editor looks and behaves."],"YaeyFh":["Pulls may overwrite uncommitted edits in your local files."],"Yea-K5":["Restore to this point"],"Yi0VMG":["Upload ",["keyName"]],"YjhKI5":["Cloning..."],"YlDuro":["Fit height"],"YoLi1r":["Claude (CLI)"],"YsEYYS":[["behind","plural",{"one":["#"," commit behind"],"other":["#"," commits behind"]}]],"YwPUUP":["This pack is already set up here."],"YyXtnN":["Underline"],"Z1LF1M":["Sharing a doc needs a GitHub repository. Create one for this project."],"Z2M5XM":["Reason: ",["reason"]," (",["osDetail"],")"],"Z3FXyt":["Loading..."],"Z5HWHd":["On"],"Z5h97D":["Hide files and folders from your knowledge base. Hidden items don’t appear in the file tree, search, or AI tools. <0>Learn more about patterns</0>."],"Z8KDox":["Enter a folder name (e.g. brain)."],"Z8lGw6":["Share"],"ZBYKxv":["Reverts every change this agent made to <0>",["docName"],"</0> this session (",["burstCount","plural",{"one":["#"," burst"],"other":["#"," bursts"]}],"). Other files and writers are unaffected."],"ZBt4rI":["Instruction for the AI"],"ZLQol-":["You can turn this on later in <0>Settings → Sync</0>."],"ZNK2Tq":["root"],"ZQLDTl":["created folder"],"ZU8VV_":["Remove failed: ",["error"]],"ZWgr0b":["In a subfolder"],"ZWolSV":["You picked the filesystem root (/). Scaffolding here will scan every file on this machine — make sure that's what you want."],"ZWxfrc":["cleared folder properties"],"ZWyHmq":["This project"],"ZhhOwV":["Quote"],"ZjtgI-":["Command palette"],"Zon_qG":["Mirror source <0>",["label"],"</0>"],"ZptNUh":["Show ",["hidden"]," more"],"ZsGpr_":["Paste link"],"Zue_jx":["Your GitHub token is missing required scopes. Try signing in again."],"Zul8Ry":["never"],"ZxXhLY":["Hide Files (",["sidebarShortcut"],")"],"Zz25kq":["Show Files (",["sidebarShortcut"],")"],"_7UQ7y":["Whole word"],"_8quCH":["From template"],"_902BE":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. You're currently on <1>",["currentLabel"],"</1>."],"_BthEY":["Open in ",["shareBranch"]],"_K2CvV":["Template"],"_PACVa":["Release notes"],"_PBJRl":["Add at least one letter or number."],"_QwkMu":["No matching paths"],"_RcqUM":["You picked your home directory. OpenKnowledge will index everything in your home tree — large and may surface personal files."],"_TDESN":["Network error - ",["kind"]," \\"",["createdPath"],"\\" still exists on disk"],"_TF8ep":["Failed to render PDF"],"_VRtd7":["Couldn't send the selection — please try again."],"_W-elG":["(inline)"],"_XWY2J":["Terminal disabled"],"_bth6g":["Claude Code is installed, but OpenKnowledge tools aren't connected to it yet."],"_eguJc":["Uploading"],"_gkGSK":["deleted template"],"_pY_Vq":["The repository was moved, renamed, or deleted."],"_qD6mn":["Pick the folder where you've cloned it."],"_rP3HI":[["minutes"],"m ago"],"_tekeB":["updated folder properties"],"a-cKXz":["Select all source"],"a3H_MR":["Open and focus the Ask AI composer for the current editor selection."],"a5Gha5":["Local changes blocked the merge"],"a5W0q0":["Are you sure you want to delete ",["folderName"],"/ and all files inside? This action cannot be undone."],"a9OzSn":["No pages found for \\"",["trimmedQuery"],"\\""],"aByJ8j":["How does sharing work?"],"aE2_XM":["One pattern per line — appended to <0>.okignore</0>."],"aENGMB":["Semantic search adds meaning-based ranking to the search tool so conceptually-related pages surface even without shared keywords."],"aM23Wr":["page-name"],"aOp3hw":["Couldn't move to Trash"],"aWlJai":["Starting sign-in flow"],"a_u4ck":["Loading tags"],"aaE55D":["Clear ",["keyName"]],"aalx4E":["Editing broken MDX source: ",["reason"]],"abiHje":["Delete selected items"],"adsMWO":["Resolving deltas"],"aiArms":["We couldn't clone this repository."],"ajz9F8":["Couldn't load conflict content for ",["filePath"],". Try reloading the page."],"aoa6xA":["network error (is \`ok ui\` running?)"],"az8lvo":["Off"],"b3Thhd":["Upload failed"],"b4AQFK":["Open activity panel for ",["tooltipName"],", editing ",["realCurrentDoc"]],"b4itZn":["Working"],"b5aNbi":["The ",["targetNoun"]," could not be opened — try navigating to it manually."],"bBE5tC":["Detected on this machine"],"bBcFK_":["Open emoji picker for ",["keyName"]],"bD8I7O":["Complete"],"bGa3Fk":["Uploading file"],"bH382I":["Edit this HTML — the preview updates live."],"bHboUQ":["Edit template"],"bS_boY":["Replace current match"],"bUUVED":["Asset"],"bWLmRK":["Could not fetch branch. Check your connection."],"bcDHUM":[["descriptorLabel"]," — render error, source editable below"],"bcjYUA":["Fold or unfold source"],"bkQRMh":["Paragraph"],"bmC18N":["Clearing local collaboration data for \\"",["docName"],"\\" before reconnecting."],"brCtGB":["History unavailable"],"bultyE":["When enabled, the agent opens or refreshes the preview after each edit. Disable if you manage your own preview window (OK Desktop, a browser tab on another display, etc.)."],"bwil08":["Building <0>openknowledge.skill</0> and opening the Claude Desktop App"],"c1LZZH":["Link copied."],"c5f7sm":["Code block language: ",["currentLabel"],". Click to change."],"c5rF4v":["What is this knowledge base for?"],"c863eW":["Could not switch to ",["shareBranch"],". Try switching manually."],"c8iK2Y":["No templates found."],"cEoyWz":["Add item to ",["keyName"]],"cF9DyA":["Reconnecting after server restart"],"cIptmH":["In the Claude Desktop App"],"cKjLuT":["(project + user)"],"cOSAfL":["No repositories found on your GitHub account."],"cOrTMo":["Your share link is ready below."],"cSCbv3":["BETA"],"cUK8lW":[["conflictCount","plural",{"one":["#"," conflict"],"other":["#"," conflicts"]}]],"cUk6TF":["Sync failed — check the server logs for details."],"cV7LOw":["Team Wiki"],"cZGNlb":["Add another pattern"],"cZI5AL":["OK Desktop"],"cZ_8zB":["Stays on this computer."],"cdm00A":["No Incoming"],"cdmk8A":["Uncommitted changes"],"cio8--":["Codex (CLI)"],"cklVjM":["Timeline"],"cn1sLi":["Couldn't connect OpenKnowledge tools to Claude Code. Please try again."],"cnGeoo":["Delete"],"cqQyPB":["Folder name"],"cs4mps":["Config sharing"],"csDS2L":["Available"],"ct2kv5":["No headings in ",["pageTarget"]],"cuA8QW":["Organize specs"],"d2uTPx":["Server error (HTTP ",["status"],")"],"d5rK4X":[["chars","plural",{"one":["char"],"other":["chars"]}]],"dD7NPy":["Outline"],"dDpCOp":["Rename succeeded but the sidebar may be out of date — refresh to resync"],"dEgA5A":["Cancel"],"dJw2_7":["Saved with the project for your team."],"dN20LW":["Semantic search is on, but no API key is set — search falls back to keyword matching. Add one in <0>Settings → Account</0> (it's stored once for your whole machine)."],"dNM58w":["Claude Code (claude) isn't installed or on your PATH."],"dOHMA0":["Failed to move"],"dOxPd4":["Footnote"],"dPOFid":["Show or hide terminal"],"dTaauv":["Reason: ",["reason"]],"dUQ7_J":["Add meaning-based ranking to search so conceptually-related pages surface even when they share no keywords. This setting applies only to this computer."],"dURmlQ":["\\"frontmatter\\" is a reserved property name"],"dbhUX1":["Hide this file"],"dbtjJh":["(opens in new tab)"],"djc1l9":["More than ",["0"]," requests were blocked by the preview's security policy"],"djjdjr":[["deleteCount","plural",{"one":["Delete"],"other":["Delete ","#"," items"]}]],"dprWmL":["Anchor in this page"],"dr1vFs":["Replace all matches"],"dvGKu2":["Shared auto-sync default"],"dw_dUJ":["Failed to duplicate path"],"e0NrBM":["Project"],"e1Rn_k":["Open containing folder"],"e1hptq":["Embed a video with native player controls."],"e4GHWP":["Pull"],"e8L17t":["A non-empty folder already exists at this path. Pick a different folder."],"e8zRrb":["Show Files"],"eBIT9h":["Paste failed.",["restoreSuffix"]],"eFJkVt":["Clone failed: ",["cloneError"]],"eG8Jsg":["Toggle source tab focus mode"],"eJitUk":["Upload from computer"],"eKThTQ":["Failed to reorder"],"eNQGRb":["Inline LaTeX math rendered with KaTeX."],"ePK91l":["Edit"],"eSu2Xn":["Writes a project-MCP config for each selected tool; Claude also gets <0>.claude/launch.json</0>."],"eTL5y9":["Show selection preview"],"eVPynQ":["Open <0><1>",["verificationUri"],"</1><2/></0> and enter this code:"],"emgiet":["Authoritative content; mirrored verbatim everywhere it's referenced."],"euc6Ns":["Duplicate"],"evs0iw":["Tags matching \\"",["tagListQuery"],"\\""],"f1XQyZ":["Move block"],"f65AOQ":["Start from"],"f8jU-L":[["0"],"/",["1"]," — ",["2"]],"fBHvBn":["There's no project folder for this window, so a terminal can't start here."],"fBaTkM":["Toggle the bottom terminal panel."],"fG0X0e":["Install ",["brand"]," →"],"fIgqfQ":["Reinstalling"],"fJgQHX":["Failed to create file"],"fNr-MX":["Disable semantic search"],"fVcm9t":[["0","plural",{"one":["#"," doc"],"other":["#"," docs"]}]],"fWi7pn":["Initialize starter pack"],"fYKgzG":["Failed to load recent projects."],"fYjgXu":["Unordered list of items."],"f_PkYv":["Restarting closes this project's server. Connected agents (Claude Code, Codex, Cursor) will see their OpenKnowledge MCP connection close unexpectedly — you may need to restart the agent, or toggle its OpenKnowledge MCP server off and on, to reconnect."],"fbdLmk":["Toggle bold formatting."],"fbsiBw":["Something went wrong starting the terminal."],"fcgvCA":["Claude"],"fiMNLl":["Sync settings not yet loaded — try again in a moment"],"fqSfXY":["Replace"],"fwhX-N":["Indent or outdent source"],"g3UF2V":["Accept"],"g4XBm0":["Small section heading."],"g58Kwy":["<",["descriptorLabel"],"> failed to render (likely a bad prop). Copy the source to see what went wrong, or delete the block."],"gBbxn_":["Checking sign-in status"],"gGVP4q":["Click <0>+</0> <1/> <2>Create skill</2> <3/> <4>Upload skill</4>."],"gITz7o":["Move the cursor or extend selection through CodeMirror's standard source-editor navigation keymap."],"gJR87V":["Could not create the project folder. Pick a different folder."],"gKi-a_":["New project"],"gQV-9w":["Branch switched but the ",["targetNoun"]," could not be opened — try navigating to it manually."],"gUlRQj":["Orphans"],"gYz2ep":["Expires in ",["timeLabel"]],"gbHcbI":["Failed to delete property"],"gcV0dI":["The folders and templates are in place; there's nothing left to scaffold."],"gfohmY":["Connect tools"],"ggm6JX":["This page doesn't exist yet. Open it to create the page in the editor and collapse the graph."],"ggs9f8":["Search files, folders, or commands"],"gijbne":["Failed to rename path"],"gljvbT":[["words","plural",{"one":["word"],"other":["words"]}]],"gmJ0An":["Failed to open folder."],"goO4Ll":["Editor status bar"],"gp3I7-":["Before syncing, set your identity for git commits:"],"gtEbeW":["Highlight"],"h06R3C":["No pages are missing outgoing graph links."],"h6EvY-":["This will replace the current document content with the version from <0>",["relative"]," (",["absoluteTime"],", ",["entrySha"],")</0> by <1>",["authorName"],"</1>. Your current content is already saved in the timeline — you can restore it anytime."],"h7FzJC":["Link-graph response did not match expected shape."],"hBMK4W":["Project templates"],"hDEaQu":["Connect OpenKnowledge to other tools you use."],"hDKtoF":[["diffHrs"],"h ago"],"hDoLrm":["Remove ",["projectName"]," from recent projects"],"hGmuTc":["Docs tagged #",["tagDocsName"]],"hHMv6l":["Delete block"],"hSBIG-":["A title, description, tags — anything that describes this folder."],"hSySVc":["Install handoff failed: ",["msg"]],"hXUWyd":["Value is required"],"hXbSxc":["Asset: ",["title"]],"hY8pka":["Select next occurrence"],"hYDc6B":["Name cannot be empty"],"hYgDIe":["Create"],"hZoBHK":["Empty starting content"],"haHgQj":["Copied relative path"],"he3ygx":["Copy"],"hjO0Mq":["Add tab"],"hnq8fP":["Remove ",["label"]," from context"],"hpDtUm":["External wiki link"],"hwFOFD":["Settings failed to load"],"hxBHxQ":["A line with a footnote<0><1>[1]</1></0> and a definition shown below."],"hxEUVJ":["Initialize ",["selectedPackName"]],"hyCxJY":["Open that worktree instead"],"hynz2K":["Download started"],"i1flq_":["Wiki link suggestions"],"i3f2kh":["No matching commands."],"i92eAT":["We'll create a repository and start syncing — no terminal needed."],"i9OyGp":["Undo or redo"],"i9toLO":["Agent configuration file"],"iDZtvM":["Failed to load templates: ",["message"]],"iEQQyu":["Agent"],"iEYxO4":["Show thumbnails"],"iGCs04":["No templates available"],"iH8pgl":["Back"],"iHAJDj":["Resolving default location"],"iKSP5j":["Word wrap"],"iKZkk1":["Property value"],"iMkWoF":["Turn on"],"iNFKkm":["No diff."],"iOHg1t":["Open embedded URL in new tab"],"iSQTsg":["Ordered list"],"iSnkwB":["Failed to open cloned project."],"iTlqm3":[["ahead","plural",{"one":["#"," commit ahead"],"other":["#"," commits ahead"]}]],"iTylMl":["Templates"],"iXTp5j":["Scope: "],"idD8Ev":["Saved"],"ig5vUe":["Failed to load file"],"iilQXA":["Folder duplicated"],"ijLc3m":["Bullet list"],"ipn17C":["The <0>type</0> every document created from this template gets (e.g. <1>research-note</1>). Keeps new docs Open Knowledge Format–conformant."],"iqIDv4":["Sync status unavailable"],"iqugog":["Initialize failed: ",["errorDetail"]],"irFGwu":["Template list"],"irrm_E":["Remove selection"],"isRobC":["New"],"iuTKci":["No edits yet."],"iycx_A":["Pushing"],"j9Vqvc":["inherited"],"jBVUXo":["Couldn't open the terminal — please try again."],"jEZ6Lf":["provisional"],"jEdF24":["Missing page: ",["linkTitle"],". Click to create."],"jGJy-9":["Downloads ",["shareOwner"],"/",["shareRepo"]," from GitHub."],"jKd3AP":["Could not enable the terminal: ",["0"]],"jPUPvG":["Couldn't resolve the conflict for ",["filePath"],"."],"jRHdCz":["Failed to load PDF"],"jSO1X5":["Inherited templates can't be renamed here — rename it in the folder that owns it."],"jSY41h":["\\"",["docName"],"\\" took too long. Check your connection."],"jTLWxh":["Embed an external page in an inline iframe (docs, demos, Figma, CodeSandbox)."],"jZ_E5M":["Fetch failed — check the server logs for details."],"j_Z6g7":["Shared default"],"jbSG8V":["Show Files (",["sidebarShortcutLabel"],")"],"jdGUeI":["Couldn't create template: ",["error"]],"jerqF0":["Loading branch state"],"jhtG3I":[" Your selection has been restored."],"jjtmV_":["First file name"],"jol95m":["Failed to open Project Navigator."],"jtg_8-":["Build a knowledge wiki about the different types of flightless birds. Start with an overview page, then add cross-linked pages for each major group (ratites like ostriches, emus, and kiwis; penguins; and flightless rails), the regions they live in, and a timeline of how flightlessness evolved."],"ju38ms":["This project has no git repository — sharing mode does not apply. Initialize a repo to enable the toggle."],"jwnpdM":["A template named <0>",["trimmedSlug"],"</0> already exists here. Saving creates a local copy that overrides it for this folder."],"kCNU4q":["Indexing your pages — ",["semanticIndexedCount"]," of ",["semanticTotalCount"]," ready. Results may be incomplete."],"kCqCyf":["Open CodeMirror's lint diagnostics panel."],"kFLlsI":["Insert a footnote reference + matching definition stub."],"kNqMMd":["Folder"],"kUn-CN":["Sync off"],"kV2YZv":["Don't see <0>Skills</0>? Enable <1>Settings <2/> Capabilities <3/> Code execution and file creation</1> first."],"kYL1lH":["Agent activity"],"k_pade":["Config sharing is now shared. Commit the OK files to share with your team."],"k_yIIc":["Will be created at: <0>",["targetPreview"],"</0>"],"kdzzOK":["Off — search ranks by keyword only. No content leaves this computer."],"keNFEd":["Set identity"],"kj9pAE":["Creating page"],"kknhfj":["No changes"],"kmKqZg":["Clusters"],"knjOzA":["Tag value"],"kolRU1":["Do you want to permanently delete instead?"],"ku0yLQ":["Pages are embedded the first time a search needs them."],"ky9Tuc":["Edit ",["0"]," source"],"l17ab4":["Could not write project files. Try a different location."],"l1aQKz":["Visual editor table"],"l1l8sj":[["0"],"d ago"],"l3mSlL":["Append-only timeline"],"l6OXqI":["No installed agents found"],"l8G3S9":["Auto-sync is off — you don't have permission to push to this repo"],"lAiyU_":["Only the current document uses <0>#",["tag"],"</0>."],"lGs_bQ":["Page <0>*</0>"],"lHwYMr":["Server error: ",["status"]," ",["statusText"]],"lIn9L9":["Disable sync"],"lPzyrU":["All hunks resolved"],"lVWEIL":["Indexed ",["embedded"]," of ",["total"]," pages."],"lWNpNB":["Add cursors or select matching occurrences through CodeMirror."],"lXKZGw":["Heading 1"],"lZAiSP":["Backlinks response did not match expected shape."],"l_FAT6":["Use letters, digits, <0>-</0> or <1>_</1> only."],"l_UFPv":["Properties"],"lb_UU4":["Sync now"],"lbkOif":["Undo or redo visual-editor changes through TipTap collaboration history."],"lhjq3G":["Reset ",["labelText"]," to default"],"lkYioO":["Show or hide document panel"],"ll2yNl":["Content directory"],"lond3p":["Shows above the code body. Round-trips as \`title=\\"...\\"\` in markdown."],"lrhetp":["+ ",["overflow"]," more"],"ls1N1w":["(missing)"],"lyWa43":["Project-level disconnected pages"],"lzmtKp":["Failed to load folder properties: ",["message"]],"lzwo7p":["Could not open GitHub sign-in. Please try again."],"m16xKo":["Add"],"m2T1Xj":["Tag #",["tagValue"],", ",["uses"]],"m4v3XT":["Undo last edit on ",["docName"]],"m6YGpY":["Active panel content for the selected tab shows here."],"mBltnd":["Path suggestions"],"mGaZwZ":["See the full install guide"],"mHVPm5":["Reconnect required"],"mNY1G6":["Undo all edits"],"mPy9lS":["Organize my existing specs into a linked index grouped by area, and flag any that have drifted out of sync with the current code."],"mSJ3Rn":["Computing scaffold plan"],"mU3j1b":["Remove item ",["0"]],"mWVJRX":["Collapsible section with a clickable summary."],"mYGY3B":["Date"],"mZ1r4i":["Create a document from ",["label"]],"maDWIB":["Mirror source <0>api-spec</0>"],"makN88":["No patterns yet. Type a folder or file name below to start hiding files."],"mdKFEy":["You cancelled loading \\"",["docName"],"\\"."],"mdzKSV":[["nodeCount","plural",{"one":["#"," node"],"other":["#"," nodes"]}]],"mf37rL":["Retrying"],"mg0YGL":["Source multi-cursor and multi-select"],"mk2poV":["e.g. server.ts"],"mmpzAq":["Wrap long lines in the markdown source editor."],"mo22UP":["Toggle inline code formatting."],"mqSwZH":["<0>Mirror anchor not found.</0> No <1>",["mirrorSourceTag"],"</1> exists in <2>",["src"],"</2>."],"msOK6I":["Repositories you've already cloned may keep syncing through git's own saved credentials, even after you disconnect."],"mwMF9u":["Open CodeMirror search in source editor mode."],"mxY24F":["Duplicate the focused file-tree item when focus is in the Files sidebar."],"n2lRue":["Commit or stash changes to switch:"],"n5n_vi":["Private repository"],"n6hXUm":["Auto-sync periodically fetches, pulls, and pushes commits to your remote git repository so your edits stay in sync across machines."],"n7aopT":["Editor mode"],"nCzR-G":["Copy code ",["userCode"]],"nDT8qt":["Initialized ",["0"]," but could not open it."],"nMSYz5":["This path is on an external volume (/Volumes/...). OpenKnowledge will lose track of files when the drive ejects."],"nNYV3Y":["and ",["remaining"]," more"],"nTwL53":["Open a doc to share its URL."],"nUNZL4":["Ask ",["0"]],"nWv1ja":["Manage hidden files in Settings → Ignore patterns."],"nYKerc":["(user-level only)"],"nYeBmY":[["hours"],"h ago"],"nbfdhU":["Integrations"],"ndeI89":["Use Cmd/Ctrl+C to copy the link below, or open OK in the desktop app."],"neRy3o":["Split list item"],"nft48x":["Stored at <0>.ok/templates/</0> in this project. Available in every folder (folder-scoped templates can override by filename)."],"nh3wwx":["Embeddings provider key"],"njBeMm":["Both"],"njU86j":["Property \\"",["trimmed"],"\\" already exists"],"noH1JX":["Couldn't reach collab server — ",["errorDetail"],". Try <0>ok status</0> or check <1>.ok/local/last-spawn-error.log</1>."],"nrGWJ7":["Git identity isn't set — commits use a default author. Set yours so teammates see your name."],"nskygk":["Choose agent"],"nxlOpL":["OpenKnowledge is using this GitHub account."],"ny6vNn":["OpenKnowledge is using a GitHub account provided by the gh CLI. There's no separate OpenKnowledge credential to disconnect."],"nzHlj8":["Close ",["0"]],"nzaV6Q":["Page thumbnails"],"o2yoFu":["Reveal in Finder, No workspace"],"o49mDZ":["Loading timeline history"],"o4dcAf":["Reveal in File Explorer, ",["hint"]],"o5gfs1":["This setting is per-machine and isn't shared with collaborators. It needs an API key set with <0>ok embeddings set-key</0>."],"o9CrsQ":["research-note"],"oAFVKX":["Failed to update the project sync default — ",["detail"]],"oBXkm2":["Delete code block"],"oCZkaG":["Copy path"],"oJl7eO":["Unknown component: ",["componentName"]," — source editable below"],"oKBnk5":["More requests were blocked."],"oQA-cA":["Full path"],"oS1YpJ":["Open the Project Navigator."],"oXKEsy":["Delete an adjacent wiki-link or tag chip."],"oYepHb":["The terminal is turned off for this project. Turn it back on to run commands here."],"of3tF-":["You picked ~/Documents. OpenKnowledge will index every markdown file under it. If you only want to manage a sub-folder, choose a smaller scope."],"ogAuyr":["Back to document view"],"oh55a-":["Cursor CLI"],"omXJcU":["Close others"],"optX0N":[["0"],"h ago"],"oqB2ez":["Previous match"],"ot5BRK":["Duplicate selected file or folder"],"otE4aj":["Show external URL nodes"],"ou1hFW":["Toggle an ordered list."],"outYNy":["Duplicate name \\"",["keyName"],"\\""],"ovIGrT":["Local collaboration data for \\"",["docName"],"\\" could not be cleared. Reload to retry."],"p0Iq25":["Insert link"],"p9sdCy":["New ignore pattern"],"pAgkuZ":["Reopening \\"",["docName"],"\\" with a fresh local collaboration cache."],"pEQFsW":["No matching projects."],"pFagOn":["Source editing"],"pHYP6v":["Open <0>Customize</0> in the sidebar <1/> <2>Skills</2>."],"pRc-Im":["Undone all edits on ",["docName"]],"pTPqMK":["Toggle a fenced code block."],"pWT04I":["Checking..."],"pWbsW6":["Loading docs"],"pZAs1T":["Failed to load outgoing links"],"pajIrl":["Could not turn off the terminal: ",["0"]],"pbwTg6":[["seconds"],"s ago"],"pckX1A":[["0","plural",{"one":["#"," use"],"other":["#"," uses"]}]],"pgq_xf":[["0"],"/",["1"]," ",["2"]],"phM8Kh":["Found the repo but could not open the project. Please try again."],"pha01Y":["Project-level pages with no incoming graph edges."],"pkAft1":["Search failed."],"pmKdif":["Failed: ",["loadError"]],"pmUArF":["Workspace"],"ppDgFi":["Restart with this app's version"],"pzutoc":["Italic"],"q2kXMG":["Inline Math"],"q4YJl_":["The terminal session ended (exit code ",["0"],")."],"q6-JVU":["Loading pages"],"qAQVSD":["Page headings response was not JSON"],"qAhFeg":[["userName"]," · ",["tabCount","plural",{"one":["#"," tab"],"other":["#"," tabs"]}]],"qEIFZu":["Key ending in ",["keyHint"]],"qEue6Q":[" or "],"qFWMl-":["View as text"],"qNOgUu":["Edits at the source land here — no copy-paste drift."],"qRZh7J":["Let Tab leave the source editor instead of indenting."],"qSKu2v":["Source navigation and selection"],"qSxaOz":["Accept their deletion"],"qUB_o_":["Auto-sync is off — your edits stay local until you commit and push manually."],"qXg5W9":["File saves to <0>~/Downloads/openknowledge.skill</0>."],"qXsafh":["Publish to GitHub"],"qZv5ZR":["Config sharing toggle failed"],"q_9EcE":["Enable git auto-sync?"],"q_z77Z":["Heading levels"],"qaHyRJ":[["linkCount","plural",{"one":["#"," link"],"other":["#"," links"]}]],"qbfj1f":["Receiving objects"],"qdBUHP":["Couldn't load ",["fileName"]],"qi1F96":["Reveal in File Explorer"],"qiRoLb":["Summarize everything I changed this week"],"qioCwA":["Jump to page ",["pageNumber"]],"qjHMHf":["Failed to disable sync — ",["detail"]],"qk8ZmO":["OpenCode CLI"],"qo4zCg":["Path cannot contain backslashes"],"qpQwGC":["Describe what you're working on and the agent sets it up for you."],"qvWGzP":["Collapse all"],"qyLmWw":["Source editor search panel"],"r2huLx":["Undo, redo, or undo selection changes through CodeMirror history."],"r4R7AZ":["Network error during cleanup"],"r51jLC":["File saved & Claude Desktop App opened"],"r871ed":["Your knowledge base is now on GitHub at <0>",["ownerLogin"],"/",["repoName"],"</0>."],"rBc32v":["Couldn't reach the embeddings provider — press ↵ to retry"],"rFw02Q":["Uploading ",["keyName"]],"rJVoVX":["Source find results"],"rNifQd":["Remove property"],"rQAQus":["Couldn't save template: ",["error"]],"rQRrkB":["yesterday"],"rSoi6g":[["displayName"]," (",["bin"],") isn't installed or on your PATH."],"rVgSRB":["Collapse ",["docName"]],"rVxu1k":["No pages link here yet."],"rXz97P":["Numbered list of items."],"rZ9HZq":["To do"],"rZVMkf":["Visual editor replace input focused"],"rageVb":["Custom HTML with a live preview pane (sandboxed iframe)."],"rdU729":["Layout"],"rfFpcF":["Remove ",["chip"]],"rgPqOw":["Convert the current block to a paragraph."],"riqekz":["Suggestion menu navigation"],"rlUzXK":["Could not validate folder. Please try again."],"roAe2K":["Link URL"],"roiUQQ":["This page doesn't link to anything yet."],"rppgXF":["Disconnecting"],"rssK8c":["Ignore patterns (raw text)"],"rtdR4v":["Show or hide Files"],"rwrPbS":["Component boundary navigation"],"s-MGs7":["Resources"],"s-XOaI":["File name"],"s061i4":["Relative path"],"s0IDhW":["This file could not be found."],"s0J_k9":[["0","plural",{"one":["#"," key"],"other":["#"," keys"]}]],"s1c0ja":["Bullet List"],"s3caR3":["Deleting"],"sE7R19":["Could not load templates: ",["templatesError"],". You can still create a blank note."],"sER-bs":["Files"],"sIGbBZ":["Convert selection to footnote"],"sIxSSP":["Resolve conflict in your terminal"],"sJK6pq":["Permission denied"],"sJWhgo":["Unknown component: ",["unregisteredComponentName"]],"sOxZaS":["Failed to load graph"],"sZ2IOu":["This ",["targetNoun"]," was shared from branch <0>",["shareBranch"],"</0>. It doesn't exist on your current branch (<1>",["currentLabel"],"</1>)."],"saIASg":["Second item"],"saYiIO":["Path cannot contain null bytes"],"seeS6l":["Setup OpenKnowledge in this folder?"],"shNd9t":["Slash command menu"],"skf5Ix":["Indent or outdent source editor lines."],"snrVQ7":["probe failed"],"ssuwjF":["Branch"],"stlgky":["On — your search queries and the text of matching pages are sent to your embeddings provider (OpenAI by default) to compute embeddings."],"sxTdZI":["Loading paths…"],"sxkWRg":["Advanced"],"t-JXbf":["Notion-style inline row for a downloadable file. Drag-drop also works."],"t18QYR":["Unpin ",["accessibleLabel"]],"t2TkQ3":["Sync paused — resolve conflicts to resume."],"tAPZEx":["Below"],"tP5DDk":["Apply link"],"tUvUfp":["Use a folder you already have."],"tW_yvQ":["Expand ",["docName"]],"t_YqKh":["Remove"],"tfDRzk":["Save"],"tfi40B":["Failed to create page"],"tgWuMB":["Modified"],"tiWX6q":["Source editor"],"tjXez2":["blog-post"],"tsiTqO":["Paste your API key"],"u-9fWA":["See <0>Architecture</0> for the system overview."],"u3BOHd":[["fileCount","plural",{"one":["#"," file"],"other":["#"," files"]}]],"u3YnKw":["Could not construct share URL."],"u3wRF-":["Published"],"u6Hp4N":["Markdown"],"u7H-Wn":["Show panel (",["panelShortcutLabel"],")"],"uCaIdy":["GitHub sign-in is missing or expired. Reconnect to resume syncing."],"uDlyqd":["Document the architecture of this repo: create an overview page that links to a page per major module describing its responsibilities and entry points."],"uF9ruK":["Saving"],"uH_S-u":[["loadErrorTitle"],": ",["message"]],"uKRYiW":["Sync status unavailable — server error."],"uL_Wx8":["The terminal stopped unexpectedly."],"uM6jnS":["Restore failed"],"uO9WLl":["Push"],"uQNW00":["Detached HEAD — checkout a branch to resume"],"uQewpR":["Couldn't restart the server — it's running under a different account. Restart your computer to clear it, then reopen this project."],"uWtdQR":["No templates yet. Add one in this folder's Templates section, or in Settings → Templates."],"uWx2ZP":["Last sync"],"u_lS4C":["Clone complete — opening project"],"ubMwcO":["The terminal session ended (signal ",["0"],")."],"ugoTXs":["folder"],"uhJEA2":[["count","plural",{"one":["#"," more participant"],"other":["#"," more participants"]}]],"uksqrP":["Repository not found. It may have been renamed, deleted, or moved."],"un8kBM":["Creating page: ",["linkTitle"],"."],"ur2XSb":["Visual editor"],"uuoHOU":["Command failed."],"uynXup":[["tokens","plural",{"one":["token"],"other":["tokens"]}]],"v-h2hx":["Delete ",["targetGitPath"]],"v2ZW0K":["Enable terminal"],"v41fCm":["File not found"],"v75Em9":[["uploadedCount","plural",{"one":["Uploaded one file"],"other":["Uploaded ",["uploadedCount"]," files"]}]],"v7lbnC":["Find next match"],"vDXqVv":["Insert a markdown hard break."],"vEJDlt":["The file is in your Trash; the file-watcher will reconcile."],"vGeNNQ":["Copy a prompt and paste it into your agent to set up your project."],"vIxrEk":["Fit width"],"vLyv1R":["Hide"],"vM7XUh":["Add OpenKnowledge to your AI tools"],"vPYaz3":["Scaffold directly under this project."],"vQIVHc":["Folder properties"],"vWc9a0":["Type to edit; <0>⌘ Enter</0> saves, <1>Esc</1> cancels."],"vZVeFG":["Upload failed — please try again"],"vbK_ZG":["Files sidebar"],"ve8vEM":["Code expired — please try again"],"vfRlCI":["Could not copy full path"],"vfWA_g":["You picked ~/Desktop. OpenKnowledge will index everything on your desktop."],"vhAnzJ":["Turn on semantic search?"],"viwC-K":["Failed to remove project."],"vv7kpg":["Cancelled"],"vvWZnu":["Diff unavailable"],"w3tVpc":["No links yet. Add wiki links or markdown links to build a graph."],"w3vFfL":["Hide Files"],"w4hMYl":["Could not read branch state for this project. Close this dialog and open the share link again."],"w7SsvI":["That folder isn't an OpenKnowledge project yet. Initialize it and open?"],"w7nm4K":["Indented blockquote for citations."],"wJijgU":["Location"],"wJo9oS":["Close find"],"wQp1V3":["Mirror of <0>",["src"],"</0>"],"wT4iQr":["Open visual-editor find with replace controls expanded."],"wTcjov":["No workspace"],"wXO4Tg":[["hrs"],"h ago"],"wbv9xO":["Create new project"],"wbwHYD":["Enable sync"],"weP6me":["Couldn't load docs — type @ again to retry"],"wlwXUk":["You picked ~/Downloads. Files there are usually transient — consider a stable folder instead."],"wndeIl":["Project-level pages with neither incoming nor outgoing graph edges."],"wtcxiD":["Share this setup with your team?"],"wvbc1r":["Couldn't open document"],"x2fr_j":["Graph"],"x3-2ta":[["packName"]," initialized (",["projectEntries","plural",{"one":["#"," entry"],"other":["#"," entries"]}],")"],"x57cJf":["Open link"],"xCJdfg":["Clear"],"xCdTnb":["Close new tab"],"xDBki3":["Heading suggestions"],"xFQRu4":["I already have it locally"],"xG4tb6":["Lost connection to \\"",["docName"],"\\"."],"xHGM4U":["Hide HTML preview"],"xK291b":["Two-page (odd)"],"xNyj3h":["Reinstall for Claude Chat & Cowork"],"xOTzt5":["just now"],"xSVO3J":["What gets created"],"xWEvuo":["Ask AI"],"xXo8FT":["Save failed: ",["error"]],"xYMPyY":["Paste was incomplete — ",["chunksCompleted"]," of ",["totalChunks"]," chunks landed.",["restoreSuffix"]],"xaDWAI":["Switch project"],"xbdtfY":["Markdown source"],"xc4g25":["Parse failed"],"xeXS4P":["Or use a starter pack"],"xeiujy":["Text"],"xhlFsx":["Inherited — set a value here to replace it."],"xiv-dW":["No files yet."],"xsZhu-":["Page number"],"xzktOa":["Edit wiki link"],"y1t8bQ":["Settings sections"],"y3aU20":["Save changes"],"y46m5r":["The desktop app isn't responding. Refresh and try again."],"y5FUYi":["Suggestion menu open"],"y8B54M":["Couldn't send your prompt — please try again."],"yCX4jp":[" Your selection could not be restored."],"yEJ-sl":["The preview blocks resources that don't meet its security rules (for example plain http:// URLs, or code that uses eval). The content above may render incompletely."],"yFyZMJ":["No pages matched \\"",["semanticQueryText"],"\\" by meaning."],"yH7T4q":[["failedCount","plural",{"one":["1 file failed to upload"],"other":[["failedCount"]," files failed to upload"]}]],"yHikCO":["Open CodeMirror's go-to-line prompt."],"yIPXut":["Preparing search"],"yKu_3Y":["Restore"],"yLq4w4":["Separator"],"yMgL_E":["Find field navigation"],"yQE2r9":["Loading"],"yQyglE":["No matching docs"],"yUxR-Q":["Expand ",["keyName"]],"yWWThY":["Asset reference"],"yYR6za":["Display text"],"yZmvQ4":["This project's server (v",["0"],") is newer than this app (v",["1"],")."],"y_5CE8":["Item ",["0"]],"yf5r22":[["keyName"]," type: ",["typeLabel"]," (inherited from folder properties; not editable here)"],"yjExfe":["Branch <0>",["shareBranch"],"</0> is checked out in:"],"ylXj1N":["Selected"],"ynIa4S":["Visual editor list item"],"ypw6My":["Showing top ",["0"]," headings — keep typing to narrow"],"ysxgu8":["project"],"yu8Pzy":["Not detected"],"yutJKi":["Checklist with checkboxes."],"yvG-l1":["Open source lint panel"],"yvHDYG":["Claude Desktop"],"yz7wBu":["Close"],"yzF66j":["Link"],"yzGPkm":["Expand graph"],"z0a2EA":["Diagram from Mermaid source — flowchart, sequence, class, state, ER, gantt, pie."],"z1uNN0":["No emoji found."],"z2JdQ-":["Config sharing unchanged — see details below."],"z5pqI8":["Cannot upload: no document is open"],"z60Lgn":["Saves the file to <0>~/Downloads/openknowledge.skill</0> and opens the Claude Desktop App. Requires Node.js or Bun on your PATH."],"zAsDLY":["Graph visualization of document links"],"zL0LPh":["Global outside text fields"],"zLGXna":["No starter packs available."],"zLak8b":["Activate new tab"],"zQBg2C":["Move the current block up or down one position."],"zUhPuR":["Open containing folder, ",["hint"]],"zXj1rA":["Search by meaning"],"zZ_I5K":["Open project menu"],"zaXlhf":["The properties block at the top of this doc has a formatting error. Switch to source mode to fix it."],"zbymaY":[["0"],"m ago"],"zgSFyG":["External link"],"zkz0Fg":["Set up syncing"],"zlErBl":["Page headings error response did not match RFC 9457"],"zo3Dl7":["Toggle thumbnails"],"zrP8HX":["Frontmatter every document created from this template starts with. Values are YAML — a list is <0>[a, b]</0>; <1>{",["date"],"}</1> fills in on create."],"ztKII6":["Failed to add item"],"zwBp5t":["Private"]}`)},Wp=`en`;Is.load(Wp,Up.messages),Is.activate(Wp);var Gp=Symbol.for(`ok.client.logForwarder`),Kp=2e3,qp=[`log`,`info`,`warn`,`error`],Jp={log:`info`,info:`info`,warn:`warn`,error:`error`};function Yp(e){if(typeof e==`string`)return e;if(e instanceof Error)return`${e.name}: ${e.message}`;try{return JSON.stringify(e)??String(e)}catch{return String(e)}}function Xp(e){let t=e.message.length+80;if(e.event&&(t+=e.event.length),e.fields)try{t+=JSON.stringify(e.fields).length}catch{}return t}function Zp(e={}){let t=e.windowObj??(typeof window<`u`?window:void 0);if(!t||t.okDesktop)return;let n=t;if(n[Gp])return;n[Gp]=!0;let r=e.consoleObj??console,i=e.documentObj===void 0?typeof document<`u`?document:null:e.documentObj,a=e.flushIntervalMs??Kp,o=e.fetchImpl??n.fetch.bind(n),s=e.now??Date.now,c=[],l=0,u=null,d=!1,f={log:r.log.bind(r),info:r.info.bind(r),warn:r.warn.bind(r),error:r.error.bind(r)};function p(){if(u!==null&&(clearTimeout(u),u=null),c.length===0)return;let e=c.splice(0,100);l=0,d=!0;try{o(`/api/client-logs`,{method:`POST`,headers:{"content-type":`application/json`},keepalive:!0,body:JSON.stringify({entries:e})}).catch(()=>{})}catch{}finally{d=!1}}function m(e){if(c.push(e),l+=Xp(e),c.length>100){let e=c.shift();e&&(l-=Xp(e))}if(c.length>=100||l>=32768){p();return}u===null&&(u=setTimeout(p,a))}function h(e,t){if(!d)try{let n=Xr(t.map(Yp).join(` `)),r=t[0],i=typeof r==`string`&&r.length<=32768?r:void 0,a=i?di(i):null,o=a?.fields;if(o)try{JSON.stringify(o).length>8192&&(o=void 0)}catch{o=void 0}m({level:e,message:n,ts:s(),...a?.event?{event:a.event}:{},...o?{fields:o}:{}})}catch{}}for(let e of qp)r[e]=(...t)=>{f[e](...t),h(Jp[e],t)};let g=e=>{if(d)return;let t=e;h(`error`,[`uncaught error: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`])},_=e=>{d||h(`error`,[`unhandledrejection: ${Yp(e.reason)}`])},v=()=>p(),y=()=>{i&&i.visibilityState===`hidden`&&p()};n.addEventListener(`error`,g),n.addEventListener(`unhandledrejection`,_),n.addEventListener(`pagehide`,v),i&&i.addEventListener(`visibilitychange`,y);function b(){for(let e of qp)r[e]=f[e];n.removeEventListener(`error`,g),n.removeEventListener(`unhandledrejection`,_),n.removeEventListener(`pagehide`,v),i&&i.removeEventListener(`visibilitychange`,y),u!==null&&(clearTimeout(u),u=null),c.length=0,delete n[Gp]}return{flushNow:p,uninstall:b}}function Qp(e,t){return e.branch===void 0||e.branch===null||e.branch===``||t===``||e.multiCandidate!==!0?null:{message:`Opened on branch ${e.branch}`,description:t}}function $p(e){let t=e.bridge;if(!t)return;let n=e.setHash??(e=>{window.location.hash=e}),r=e.emitToast??((e,t)=>{Ls(e,t)});return t.onDeepLink(e=>{let i=e.kind??`doc`;if(e.targetMissing===!0){r(`This ${i===`folder`?`folder`:`file`} isn't in your local checkout${e.branch===void 0||e.branch===null||e.branch===``?``:` on branch ${e.branch}`} yet`,{description:`Pull the latest changes, then open the share link again.`,duration:5e3});return}n(ps(i,e.doc,i===`doc`?e.branch:void 0));let a=Qp(e,t.config.projectPath);a!==null&&r(a.message,{description:a.description,duration:3e3})})}var em=4e3,tm=1440*60*1e3;function nm(e){let t=e.bridge;if(t&&t.onboarding)return t.onboarding.onToast(e=>{if(e.kind===`ancestor-promote`){Ls.success(`Opened existing OpenKnowledge project at ${e.ancestorPath}`,{duration:em});return}if(e.kind===`startup-reclaim`){let t=[];if(e.mcp.status===`repaired`){let n=e.mcp.editors.map(e=>lr[e]??e).join(`, `);t.push(`repaired ${n} MCP integration`)}else e.mcp.status===`failed`&&t.push(`MCP auto-repair failed`);e.path.status===`installed`&&t.push(e.path.summary),e.path.status===`failed`&&t.push(`PATH install failed: ${e.path.summary}`);let n=t.length>0?t.join(`; `):`OpenKnowledge integrations checked.`,r=e.mcp.status===`failed`||e.path.status===`failed`,i=e.path.status!==`none`;Ls[r?`error`:`success`](n,{duration:r||i?tm:em});return}if(e.kind===`sharing-refused-tracked`){Ls.error(`Config sharing unchanged: ${e.tracked.length} OK file(s) tracked upstream — see message below.`,{duration:tm,description:e.remediation});return}if(e.kind===`sharing-no-git`){Ls.warning(`Local-only requested but no git repository was created. Switch later via Settings → Config sharing once the project is in a git repo.`,{duration:em});return}let t=_c(e.gitRoot,e.pickedPath)??e.pickedPath;Ls.success(`Initialized OpenKnowledge at ${e.gitRoot} — opened parent of ${t} because it contains a .git folder`,{duration:em})})}function rm(e){let t=(0,$.c)(18),{body:n,warning:r,restartLabel:i,cancelLabel:a,onRestart:o,onDismiss:s}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(as,{className:`mt-0.5 size-4 shrink-0 text-amber-500`}),t[0]=c):c=t[0];let l;t[1]===n?l=t[2]:(l=(0,Z.jsx)(`p`,{className:`font-medium text-sm`,children:n}),t[1]=n,t[2]=l);let u;t[3]===r?u=t[4]:(u=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:r}),t[3]=r,t[4]=u);let d;t[5]!==o||t[6]!==i?(d=(0,Z.jsx)(Ai,{size:`sm`,onClick:o,children:i}),t[5]=o,t[6]=i,t[7]=d):d=t[7];let f;t[8]!==a||t[9]!==s?(f=(0,Z.jsx)(Ai,{size:`sm`,variant:`ghost`,onClick:s,children:a}),t[8]=a,t[9]=s,t[10]=f):f=t[10];let p;t[11]!==d||t[12]!==f?(p=(0,Z.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-2`,children:[d,f]}),t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;return t[14]!==l||t[15]!==u||t[16]!==p?(m=(0,Z.jsxs)(`div`,{className:`flex w-full gap-3 rounded-lg border bg-popover p-4 text-popover-foreground shadow-lg`,children:[c,(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[l,u,p]})]}),t[14]=l,t[15]=u,t[16]=p,t[17]=m):m=t[17],m}function im(){return Is._({id:`f_PkYv`})}function am(e){return e.serverRuntime===e.appRuntime?Is._({id:`FWQuPE`,values:{0:e.appRuntime}}):e.relation===`older`?Is._({id:`LhQlGR`,values:{0:e.serverRuntime,1:e.appRuntime}}):Is._({id:`yZmvQ4`,values:{0:e.serverRuntime,1:e.appRuntime}})}function om(e){return Is._({id:`2YOwme`,values:{appRuntime:e}})}function sm(e){return Is._({id:`5DFPDh`,values:{appRuntime:e}})}function cm(e){return e===`eperm`?Is._({id:`uQewpR`}):Is._({id:`PqYWiC`})}async function lm(e){let t=Ls.loading(Is._({id:`Kf7GG5`}),{duration:1/0}),n;try{n=await e.restartServer(e.config.projectPath)}catch{return}Ls.dismiss(t),n.ok===!1&&Ls.error(cm(n.reason),{duration:1/0})}function um(e){let t=e.bridge;if(!t)return;let n=t.onServerVersionDrift(e=>{Ls.custom(n=>(0,Q.createElement)(rm,{body:am(e),warning:im(),restartLabel:Is._({id:`ppDgFi`}),cancelLabel:Is._({id:`PBxg_E`}),onRestart:()=>{Ls.dismiss(n),lm(t)},onDismiss:()=>Ls.dismiss(n)}),{duration:1/0})}),r=t.onServerRestarted(e=>{Ls.success(om(e.appRuntime))}),i=t.onServerReclaimed(e=>{Ls.warning(sm(e.appRuntime),{duration:15e3})});return()=>{n(),r(),i()}}var dm=!1;function fm(e,t,n,r){let i=e[t];if(typeof i!=`function`){console.warn(`[cold-mount-instrumentation] target missing method "${t}"`);return}e[t]=function(...e){let t=performance.now(),a,o=!1;try{return a=i.apply(this,e),o=!0,a}finally{let e=performance.now()-t,i;if(o&&r)try{i=r(this,a,t,e)}catch(e){i={"instrumentation-error":e instanceof Error?e.message:String(e)}}try{lt(n,{durationMs:Math.round(e*1e3)/1e3,threw:!o,...i},{startTime:t,duration:e})}catch{}}}}function pm(e){return e?.doc?typeof e.doc.nodeSize==`number`?e.doc.nodeSize:e.doc.content&&typeof e.doc.content.size==`number`?e.doc.content.size:null:null}var mm=0,hm=0,gm=0,_m=0,vm=null,ym=[`linkResolutionDecoration$`],bm=new WeakSet,xm=new WeakSet;function Sm(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function Cm(){return!1}function wm(){return!Cm()}function Tm(e,t){if(wm())return t;let n=`ok/cold/nodeview-factory-${Sm(e)}`;return function(...r){let i=performance.now();try{return t(...r)}finally{let t=performance.now()-i;lt(n,{nodeType:e,durationMs:Math.round(t*1e3)/1e3},{startTime:i,duration:t})}}}function Em(e){if(wm())return;let t=e.state.plugins;for(let e of t){if(xm.has(e))continue;let t=e.spec?.key?.key;if(!t||!ym.some(e=>t.startsWith(e)))continue;let n=e.props,r=n.decorations;if(typeof r!=`function`){xm.add(e);continue}let i=`ok/cold/decoration-${Sm(t.replace(/\$\d*$/,``))}`;n.decorations=function(...e){let n=performance.now();try{return r.apply(this,e)}finally{let e=performance.now()-n;lt(i,{pluginKey:t,durationMs:Math.round(e*1e3)/1e3},{startTime:n,duration:e})}},xm.add(e)}}function Dm(e){if(wm())return;let t=e._props?.nodeViews;if(!(!t||typeof t!=`object`))for(let[e,n]of Object.entries(t)){if(typeof n!=`function`||n.__okWrapped===!0)continue;let r=Tm(e,n);r.__okWrapped=!0,t[e]=r}}function Om(e){return wm()?e:e.map(e=>{let t=e.name??`unknown`,n=Sm(t);return e.extend({onBeforeCreate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;lt(`ok/cold/ext-${n}-on-before-create`,{ext:t,hook:`onBeforeCreate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onCreate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;lt(`ok/cold/ext-${n}-on-create`,{ext:t,hook:`onCreate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onUpdate(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;lt(`ok/cold/ext-${n}-on-update`,{ext:t,hook:`onUpdate`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}},onDestroy(){let e=performance.now();try{this.parent?.()}finally{let r=performance.now()-e;lt(`ok/cold/ext-${n}-on-destroy`,{ext:t,hook:`onDestroy`,durationMs:Math.round(r*1e3)/1e3},{startTime:e,duration:r})}}})})}function km(){if(!dm){dm=!0,fm(Gr.prototype,`mount`,`ok/cold/editor-mount`,(e,t,n,r)=>{let i=e;return wm()||(vm=performance.now()),{elementDefault:i.options?.element?.nodeName??null,docSize:pm(i.editorState),durationMs:r}}),fm(Gr.prototype,`createView`,`ok/cold/editor-create-view`,e=>{let t=e;return!wm()&&!bm.has(e)&&t.view&&(Em(t.view),Dm(t.view),bm.add(e)),{docSize:pm(t.editorState)}}),fm(Gr.prototype,`createNodeViews`,`ok/cold/create-node-views`,(e,t,n,r)=>{_m+=1;let i=e;return!wm()&&i.view&&Dm(i.view),{docSize:pm(i.view),seq:_m,durationMs:r}}),fm(fr.prototype,`updateState`,`ok/cold/pm-update-state`,(e,t,n,r)=>(hm+=1,{seq:hm,docSize:pm(e.state),durationMs:r})),fm(fr.prototype,`setProps`,`ok/cold/pm-set-props`,(e,t,n,r)=>(gm+=1,{seq:gm,docSize:pm(e.state),durationMs:r})),fm(Lt.prototype,`_forceRerender`,`ok/cold/force-rerender`,(e,t,n,r)=>{mm+=1;let i=e,a=(()=>{try{return i.type?.toArray?i.type.toArray().length:null}catch{return null}})();return{seq:mm,topLevelYElements:a,durationMs:r}}),fm(me.prototype,`init`,`ok/cold/ec-init`,e=>({editorPresent:!!e.props?.editor}));try{typeof PerformanceObserver<`u`&&new PerformanceObserver(e=>{for(let t of e.getEntries()){let e=t.name;if((e===`first-paint`||e===`first-contentful-paint`)&&(lt(e===`first-paint`?`ok/cold/paint-fp`:`ok/cold/paint-fcp`,{entryType:t.entryType,startTime:Math.round(t.startTime*1e3)/1e3},{startTime:t.startTime,duration:0}),!wm()&&e===`first-paint`&&vm!==null)){let e=vm,n=Math.max(0,t.startTime-e);lt(`ok/cold/append-to-paint`,{paintEntryType:t.entryType,durationMs:Math.round(n*1e3)/1e3,paintAt:Math.round(t.startTime*1e3)/1e3},{startTime:e,duration:n}),vm=null}}}).observe({type:`paint`,buffered:!0})}catch{}globalThis.__okColdMountInstrumented=!0}}var Am=!1,jm=new Set,Mm=!1;function Nm(){for(let e of jm)e()}function Pm(e){Am!==e&&(Am=e,Nm())}function Fm(){return Am}function Im(e){return jm.add(e),()=>{jm.delete(e)}}function Lm(e){let t=[e.onUpdateRelaunching(()=>Pm(!0)),e.onUpdateRelaunchFailed(()=>Pm(!1))];return()=>{for(let e of t)e()}}function Rm(){if(Mm||typeof window>`u`)return;let e=window.okDesktop;e&&(Mm=!0,Lm(e))}function zm(){return(0,Q.useSyncExternalStore)(Im,Fm,Bm)}function Bm(){return!1}function Vm(e){let{initialDoc:t}=e;if(!t)return;let n=e.getHash();n!==``&&n!==`#`&&n!==`#/`||e.setHash(ls(t))}function Hm(){typeof window>`u`||!window.okDesktop||Vm({initialDoc:window.okDesktop.config.initialDoc,getHash:()=>window.location.hash,setHash:e=>{window.location.hash=e}})}var Um=`Relaunch`,Wm=`Release notes`,Gm=`Updates paused`,Km=`Download`,qm=`Reset to defaults`,Jm=`Relaunching to install the update…`,Ym=`Relaunch failed — please restart manually`;function Xm(e){return`Update to ${e} didn't install.`}var Zm=`Retry`,Qm=`Download manually`,$m=`Recovery action failed — please try again`;function eh(e,t){let n=t instanceof Error&&t.message?t.message:``;return n?`${e}: ${n}`:e}function th(e){return`Version ${e} ready to install`}function nh(e){return`Updated to Version ${e}`}function rh(e){return`Your settings and recent projects were saved by a newer build than this one (v${e}). Reset to defaults to continue.`}var ih=0,ah=0,oh=1,sh=2,ch=3,lh=6e4;function uh(e,t,n=()=>{},r=lh){let i=[],a=new Set,o=`update-downloaded`;return i.push(e.onUpdateDownloaded(({version:r})=>{let i=o,a=()=>{t({id:i,body:th(r),priority:sh,action:{label:Um,onClick:()=>{t({id:i,body:Jm,priority:sh,dismissible:!1}),e.update.relaunchNow().then(()=>{n(i)},e=>{a(),t({id:`relaunch-error-${r}`,body:eh(Ym,e),variant:`error`,priority:oh})})}}})};a()})),i.push(e.onUpdateRelaunching(()=>{t({id:o,body:Jm,priority:sh,dismissible:!1})})),i.push(e.onUpdateRelaunchFailed(({version:r,message:i,downloadUrl:a})=>{if(a){let i=`install-failed-${r}`,o=()=>{t({id:i,body:Xm(r),variant:`error`,priority:oh,action:{label:Zm,onClick:()=>{e.update.relaunchNow().then(()=>{n(i)},e=>{console.warn(`[update-notice] install-failed retry rejected`,e),o()})}},secondaryAction:{label:Qm,onClick:()=>{e.shell.openExternal(a)}}})};o();return}t({id:`relaunch-error-${r}`,body:i?`${Ym}: ${i}`:Ym,variant:`error`,priority:oh})})),i.push(e.onWhatsNew(({version:i,releaseUrl:o})=>{let s=`whats-new-${i}`;t({id:s,body:nh(i),variant:`success`,priority:ch,action:{label:Wm,onClick:()=>{e.shell.openExternal(o)}},onDismiss:()=>{e.update.dismissWhatsNew(i)}});let c=setTimeout(()=>{a.delete(c),n(s),e.update.dismissWhatsNew(i)},r);a.add(c)})),i.push(e.onWhatsNewDismissed(({version:e})=>{n(`whats-new-${e}`)})),i.push(e.onUpdateStuckHint(({downloadUrl:n})=>{t({id:`update-stuck-hint`,body:Gm,priority:ah,action:{label:Km,onClick:()=>{e.shell.openExternal(n)}}})})),()=>{for(let e of i)e();for(let e of a)clearTimeout(e);a.clear()}}function dh(e,t,n,r=()=>{}){let i=`schema-incompatibility-${t.persistedSchemaVersion}`,a=`schema-incompatibility-error-${t.persistedSchemaVersion}`,o=e=>{r(i),n({id:a,body:eh($m,e),variant:`error`,priority:ih})};n({id:i,body:rh(t.currentBuild),priority:ih,action:{label:qm,onClick:()=>{e.state.resetIncompatible().then(()=>{r(i)},o)}}})}var fh=[],ph=new Set,mh=!1;function hh(){for(let e of ph)e()}function gh(e){let t=fh.findIndex(t=>t.id===e.id);if(t===-1)fh=[...fh,e];else{let n=fh.slice();n[t]=e,fh=n}hh()}function _h(e){let t=fh.filter(t=>t.id!==e);t.length!==fh.length&&(fh=t,hh())}function vh(){return fh}function yh(e){return ph.add(e),()=>{ph.delete(e)}}function bh(){if(mh||typeof window>`u`)return;let e=window.okDesktop;e&&(mh=!0,uh(e,gh,_h),e.state.query().then(t=>{t.schemaIncompatibility&&dh(e,t.schemaIncompatibility,gh,_h)},e=>{console.warn(`[update-notices-store] bridge.state.query() failed`,e)}))}var xh=`ok-omnibar-recents-v1`,Sh=10;function Ch(e){return typeof e==`object`&&!!e&&(e.kind===`file`||e.kind===`folder`)&&typeof e.path==`string`&&typeof e.lastOpenedAt==`string`}function wh(e){if(e)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Th(e,t){return`${e}:${t}`}function Eh(e){let t=wh(e);if(!t)return[];try{let e=t.getItem(xh);if(!e)return[];let n=JSON.parse(e);return Array.isArray(n)?n.filter(Ch).slice(0,Sh):[]}catch{return[]}}function Dh(e,t){let n=wh(t);if(n)try{n.setItem(xh,JSON.stringify(e.slice(0,Sh)))}catch(e){console.warn(`[omnibar] Failed to save recent entries:`,e)}}function Oh(e,t){return[t,...e.filter(e=>e.kind!==t.kind||e.path!==t.path)].slice(0,Sh)}function kh(e,t){return e.filter(e=>t.has(Th(e.kind,e.path)))}function Ah(e){let t=e.lastIndexOf(`.`);if(t<=e.lastIndexOf(`/`)+1)return{};let n=e.slice(t+1).toLowerCase();return n===``?{}:{assetExt:n,mediaKind:nr(n)}}var jh=50,Mh=50,Nh=``,Ph=null;function Fh(e){return e.trim().toLowerCase()}function Ih(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Lh(e){let t=e.trim();return t?[...new Set(t.split(/\s+/).filter(Boolean))].sort((e,t)=>t.length-e.length):[]}function Rh(e,t,n=new Map,r=new Map,i=new Set){let a=[],o=new Set;for(let t of e){o.add(t);let e=r.get(t)?.modified,i=n.get(t);a.push({kind:`file`,path:t,name:hi(t),...i?{title:i}:{},...e?{modifiedTs:Date.parse(e)}:{}})}for(let e of i)o.has(e)||(o.add(e),a.push({kind:`file`,path:e,name:hi(e),bodyIndexed:!1,...Ah(e)}));for(let e of t)a.push({kind:`folder`,path:e,name:hi(e)});return a.sort((e,t)=>{let n=e.path.localeCompare(t.path);return n===0?e.kind===t.kind?0:e.kind===`folder`?-1:1:n}),a}function zh(e){return si({kind:e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`,path:e.path,title:e.title??e.name,modifiedTs:e.modifiedTs??0})}function Bh(e){return{entries:e,byId:new Map(e.map(e=>[`${e.kind===`folder`?`folder`:e.bodyIndexed===!1?`file`:`page`}:${e.path}`,e])),corpus:ti(e.map(zh))}}function Vh(e){return e.map(e=>`${e.kind}\u0000${e.path}\u0000${e.title??``}\u0000${e.modifiedTs??0} ${e.bodyIndexed===!1?`0`:`1`}`).join(``)}function Hh(e){let t=Vh(e);return Ph&&Nh===t?Ph:(Nh=t,Ph=Bh(e),Ph)}function Uh(e,t,n=jh){return Wh(Hh(e),t,n)}function Wh(e,t,n=jh){let r=Fh(t);return r?Jr(e.corpus,r,{intent:`omnibar`,limit:n,scopes:[`page`,`folder`,`file`]}).map(t=>e.byId.get(t.document.id)).filter(e=>e!==void 0):e.entries.slice(0,20)}function Gh(e,t){let n=Lh(t);if(n.length===0||e.length===0)return[{text:e,match:!1,start:0}];let r=RegExp(`(${n.map(Ih).join(`|`)})`,`gi`),i=[],a=0;for(let t of e.matchAll(r)){let n=t.index??0;n>a&&i.push({text:e.slice(a,n),match:!1,start:a}),i.push({text:t[0],match:!0,start:n}),a=n+t[0].length}return a<e.length&&i.push({text:e.slice(a),match:!1,start:a}),i.length>0?i:[{text:e,match:!1,start:0}]}function Kh(e){if(e.kind!==`page`&&e.kind!==`folder`&&e.kind!==`file`||typeof e.path!=`string`)return null;let t=hi(e.path),n=e.kind===`folder`?`folder`:`file`,r=e.kind===`file`?Ah(e.path):{};return{kind:n,path:e.path,name:t,...e.title&&{title:e.title},...e.snippet&&{snippet:e.snippet},...typeof e.score==`number`&&{score:e.score},...r}}async function qh(e,t={}){let n=e.trim();if(!n)return{entries:[],truncated:!1,ready:!0};let r=await fetch(`/api/search`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({query:n,intent:`full_text`,ranking:t.semantic?`relevance`:`navigation`,scopes:[`page`,`folder`,`content`,`file`],limit:t.limit??Mh,source:`omnibar`,...t.semantic?{semantic:!0}:{}}),signal:t.signal});if(!r.ok){let e=await r.json().catch(()=>null);throw Error(hs(e)??`Search failed with status ${r.status}`)}let i=await r.json();return{entries:(i.results??[]).map(Kh).filter(e=>!!e),truncated:i.truncated===!0,ready:i.ready!==!1}}function Jh(e,t,n=[]){let r=Fh(t);return r?Fh([e,...n].join(` `)).includes(r):!0}function Yh(e,t,n={}){if(e.trim()===``)return`idle`;if(t.length===0)return`empty`;if(n.truncated)return`truncated`;for(let e of t)if(`snippet`in e&&typeof e.snippet==`string`&&e.snippet.length>0)return`content`;return`name-only`}function Xh(e){let{query:t,firedQuery:n,status:r,resultCount:i}=e,a=i>0,o=t!==``&&t!==n,s=a&&(r===`loading`||t!==n),c=null;r===`error`&&t!==``?c={kind:`retry`,query:t}:o&&r!==`loading`&&(c={kind:`search`,query:t});let l=null;return r===`loading`?l=`searching`:t===``&&!a?l=`empty`:r===`success`&&!o&&!a&&(l=`no-results`),{submit:c,results:{show:a,dimmed:s,forQuery:a?n:null},notice:l}}var Zh=`tag:`;function Qh(e,t){if(!e.toLowerCase().startsWith(`tag:`))return{kind:`normal`,query:e};let n=e.slice(4).replace(/^\s+/,``).trim();return n&&t.has(n)?{kind:`tag-docs`,tagName:n}:{kind:`tag-list`,query:n}}function $h(e,t){return bt(e,t)}var eg=Vt;async function tg(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok)throw Error(`/api/tags/${e} responded with ${t.status}`);let n=await t.json();return Array.isArray(n.docs)?n.docs:[]}var ng=`open-knowledge:doc-panel-tab`,rg=null;function ig(){let e=rg;return rg=null,e}function ag(e,t=typeof window>`u`?new EventTarget:window){rg=e,t.dispatchEvent(new CustomEvent(ng,{detail:{tab:e}}))}function og(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail?.tab:void 0;n&&e(n)};return t.addEventListener(ng,n),()=>t.removeEventListener(ng,n)}var sg=[`.md`,`.mdx`];function cg(e){let t=e.toLowerCase();for(let e of sg)if(t.endsWith(e))return e;return null}var lg={local:0,inherited:1};function ug(e){return[...e].sort((e,t)=>{let n=lg[e.scope]-lg[t.scope];if(n!==0)return n;let r=(e.title??e.name).toLowerCase(),i=(t.title??t.name).toLowerCase();return r.localeCompare(i)})}var dg=`__blank__`;function fg(e){return e.trim()?e.includes(`..`)?`dotdot`:e.startsWith(`/`)?`leading-slash`:e.includes(`\\`)?`backslash`:e.includes(`\0`)?`null-byte`:null:`empty`}function pg(e){switch(e){case`empty`:return{id:`hYDc6B`};case`dotdot`:return{id:`Wyxs0x`};case`leading-slash`:return{id:`OYnx7O`};case`backslash`:return{id:`qo4zCg`};case`null-byte`:return{id:`saYiIO`}}}function mg(e){let t=e.fileName.trim(),n=cg(t)?t:`${t}${e.fileExtension??`.md`}`;if(e.kind===`folder`){let t=(e.folderName??``).trim();return`${e.initialDir?`${e.initialDir}/${t}`:t}/${n}`}return e.initialDir?`${e.initialDir}/${n}`:n}function hg(e,t){return xc(e.target)?!1:Cc(e,`new-item`,t)}function gg(e){let t=e.value.lastIndexOf(`.`);t>0?e.setSelectionRange(0,t):e.select()}function _g(e){let t=(0,$.c)(136),{open:n,onOpenChange:r,kind:a,initialDir:o,suggestedName:c,initialTemplate:l,defaultToTemplate:u,description:d,onCreated:f,folderConfig:p}=e,{_:m}=i(),{addPage:h}=Ts(),g=ao(p?null:o),_=p??g,[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(``),[S,C]=(0,Q.useState)(dg),[w,T]=(0,Q.useState)(!1),[E,D]=(0,Q.useState)(null),[O,k]=(0,Q.useState)(!1),[A,M]=(0,Q.useState)(null),N=(0,Q.useId)(),P=(0,Q.useId)(),F=(0,Q.useId)(),I=(0,Q.useId)(),L=(0,Q.useId)(),[R,z]=(0,Q.useState)(!1),B=(0,Q.useRef)(null),V=(0,Q.useRef)(null),H,U;t[0]!==l||t[1]!==a||t[2]!==n||t[3]!==c?(H=()=>{n&&(D(null),M(null),k(!1),x(``),C(a===`file`&&l?l:dg),T(!1),z(!1),y(a===`file`?c??`untitled`:`index`))},U=[n,a,c,l],t[0]=l,t[1]=a,t[2]=n,t[3]=c,t[4]=H,t[5]=U):(H=t[4],U=t[5]),(0,Q.useEffect)(H,U);let W;t[6]!==_.state.data||t[7]!==_.state.status?(W=_.state.status===`ready`?ug(_.state.data.folder.templates_available??[]):[],t[6]=_.state.data,t[7]=_.state.status,t[8]=W):W=t[8];let G=W,K;t[9]!==_.state.data||t[10]!==_.state.status||t[11]!==n||t[12]!==S?(K=()=>{n&&S!==dg&&_.state.status===`ready`&&((_.state.data.folder.templates_available??[]).some(e=>e.name===S)||C(dg))},t[9]=_.state.data,t[10]=_.state.status,t[11]=n,t[12]=S,t[13]=K):K=t[13];let q;t[14]!==_.state||t[15]!==n||t[16]!==S?(q=[n,S,_.state],t[14]=_.state,t[15]=n,t[16]=S,t[17]=q):q=t[17],(0,Q.useEffect)(K,q);let J;t[18]!==u||t[19]!==_.state.data||t[20]!==_.state.status||t[21]!==l||t[22]!==n||t[23]!==w?(J=()=>{if(!n||!u||l||w||_.state.status!==`ready`)return;let e=ug(_.state.data.folder.templates_available??[]);e.length>0&&C(e[0].name)},t[18]=u,t[19]=_.state.data,t[20]=_.state.status,t[21]=l,t[22]=n,t[23]=w,t[24]=J):J=t[24];let ee;t[25]!==u||t[26]!==_.state||t[27]!==l||t[28]!==n||t[29]!==w?(ee=[n,u,l,w,_.state],t[25]=u,t[26]=_.state,t[27]=l,t[28]=n,t[29]=w,t[30]=ee):ee=t[30],(0,Q.useEffect)(J,ee);let Y=a===`file`,te=_.state.status===`loading`||_.state.status===`idle`,X=_.state.status===`error`?_.state.message:null,ne;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(ne=function(e){y(e),D(null)},t[31]=ne):ne=t[31];let re=ne,ie;t[32]!==v||t[33]!==b||t[34]!==o||t[35]!==a?(ie=function(){return mg({kind:a,initialDir:o,fileName:v,folderName:b})},t[32]=v,t[33]=b,t[34]=o,t[35]=a,t[36]=ie):ie=t[36];let ae=ie,oe;t[37]!==m||t[38]!==v||t[39]!==b||t[40]!==a?(oe=function(){if(a===`folder`){let e=fg(b.trim());if(e)return{message:m({id:`ODGGlj`,values:{detail:m(pg(e))}}),field:`folder`}}let e=fg(v.trim());return e?{message:m(pg(e)),field:`file`}:null},t[37]=m,t[38]=v,t[39]=b,t[40]=a,t[41]=oe):oe=t[41];let se=oe,ce;t[42]!==O||t[43]!==v||t[44]!==b||t[45]!==a?(ce=O||!v.trim()||a===`folder`&&!b.trim(),t[42]=O,t[43]=v,t[44]=b,t[45]=a,t[46]=ce):ce=t[46];let le=ce,ue;t[47]!==m||t[48]!==h||t[49]!==ae||t[50]!==se||t[51]!==a||t[52]!==f||t[53]!==r||t[54]!==S?(ue=async function(){let e=se();if(e){D(e.message),M(e.field);return}k(!0),D(null),M(null);let t=ae(),n=a===`file`&&S!==dg?S:void 0,i={path:t};n!==void 0&&(i.template=n);try{let e=await fetch(`/api/create-page`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)}),t=e.status,n=await j(e,m({id:`d2uTPx`,values:{status:t}}));if(!n.ok){k(!1),D(n.title),M(`form`);return}let o=gi.safeParse(n.body);if(k(!1),!o.success){D(m(a===`folder`?{id:`K1ckLX`}:{id:`fJgQHX`})),M(`form`);return}let s=o.data.docName;r(!1),window.location.hash=`#/${s}`,h(s),ks([`files`,`backlinks`,`graph`]),f?.(s)}catch(e){console.warn(`[NewItemDialog] create failed:`,e),k(!1),D(m({id:`HIb0vl`})),M(`form`)}},t[47]=m,t[48]=h,t[49]=ae,t[50]=se,t[51]=a,t[52]=f,t[53]=r,t[54]=S,t[55]=ue):ue=t[55];let de=ue,fe;t[56]!==m||t[57]!==o?(fe=o||m({id:`L6Hhh6`}),t[56]=m,t[57]=o,t[58]=fe):fe=t[58];let pe=fe,me;t[59]===a?me=t[60]:(me=(0,Z.jsx)(Go,{children:a===`file`?(0,Z.jsx)(s,{id:`HdkSiO`}):(0,Z.jsx)(s,{id:`96G6Re`})}),t[59]=a,t[60]=me);let he;t[61]!==d||t[62]!==pe?(he=d??(0,Z.jsx)(s,{id:`NvOvTi`,values:{dirDisplay:pe},components:{0:(0,Z.jsx)(`span`,{className:`font-medium text-foreground`})}}),t[61]=d,t[62]=pe,t[63]=he):he=t[63];let ge;t[64]===he?ge=t[65]:(ge=(0,Z.jsx)(Wo,{children:he}),t[64]=he,t[65]=ge);let _e;t[66]!==me||t[67]!==ge?(_e=(0,Z.jsxs)(Yo,{children:[me,ge]}),t[66]=me,t[67]=ge,t[68]=_e):_e=t[68];let ve;t[69]!==S||t[70]!==Y||t[71]!==I||t[72]!==R||t[73]!==L||t[74]!==G||t[75]!==X||t[76]!==te?(ve=Y&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`span`,{id:I,className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`f65AOQ`})}),X?(0,Z.jsx)(`p`,{role:`alert`,className:`text-1sm text-destructive`,children:(0,Z.jsx)(s,{id:`sE7R19`,values:{templatesError:X}})}):null,(0,Z.jsx)(yg,{triggerId:L,labelledById:I,open:R,onOpenChange:z,value:S,onValueChange:e=>{C(e),T(!0)},templates:G,loading:te}),!te&&!X&&G.length===0?(0,Z.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`uWtdQR`})}):null]}),t[69]=S,t[70]=Y,t[71]=I,t[72]=R,t[73]=L,t[74]=G,t[75]=X,t[76]=te,t[77]=ve):ve=t[77];let ye;t[78]!==m||t[79]!==E||t[80]!==A||t[81]!==N||t[82]!==P||t[83]!==b||t[84]!==a?(ye=a===`folder`&&(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:P,children:(0,Z.jsx)(s,{id:`cqQyPB`})}),(0,Z.jsx)($o,{ref:V,id:P,value:b,onChange:e=>{x(e.target.value),D(null)},placeholder:`folder-name`,autoFocus:!0,"aria-describedby":E&&(A===`folder`||A===`form`)?N:void 0,"aria-invalid":E&&(A===`folder`||A===`form`)?!0:void 0,onKeyDown:e=>{if(e.key===`Enter`){e.preventDefault();let t=fg(b.trim());if(t){D(m({id:`ODGGlj`,values:{detail:m(pg(t))}})),M(`folder`);return}B.current?.focus()}}})]}),t[78]=m,t[79]=E,t[80]=A,t[81]=N,t[82]=P,t[83]=b,t[84]=a,t[85]=ye):ye=t[85];let be;t[86]===a?be=t[87]:(be=a===`folder`?(0,Z.jsx)(s,{id:`jjtmV_`}):(0,Z.jsx)(s,{id:`s-XOaI`}),t[86]=a,t[87]=be);let xe;t[88]!==F||t[89]!==be?(xe=(0,Z.jsx)(`label`,{className:`text-sm font-medium`,htmlFor:F,children:be}),t[88]=F,t[89]=be,t[90]=xe):xe=t[90];let Se;t[91]===Symbol.for(`react.memo_cache_sentinel`)?(Se=e=>re(e.target.value),t[91]=Se):Se=t[91];let Ce=a===`file`,we=E&&(A===`file`||A===`form`)?N:void 0,Te=E&&(A===`file`||A===`form`)?!0:void 0,Ee;t[92]!==de||t[93]!==le?(Ee=e=>{e.key===`Enter`&&!le&&de()},t[92]=de,t[93]=le,t[94]=Ee):Ee=t[94];let De;t[95]!==F||t[96]!==v||t[97]!==Ce||t[98]!==we||t[99]!==Te||t[100]!==Ee?(De=(0,Z.jsx)($o,{ref:B,id:F,value:v,onChange:Se,placeholder:`my-note`,autoFocus:Ce,"aria-describedby":we,"aria-invalid":Te,onFocus:vg,onKeyDown:Ee}),t[95]=F,t[96]=v,t[97]=Ce,t[98]=we,t[99]=Te,t[100]=Ee,t[101]=De):De=t[101];let Oe;t[102]!==E||t[103]!==N?(Oe=E&&(0,Z.jsx)(`p`,{id:N,role:`alert`,className:`text-1sm text-destructive`,children:E}),t[102]=E,t[103]=N,t[104]=Oe):Oe=t[104];let ke;t[105]!==xe||t[106]!==De||t[107]!==Oe?(ke=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[xe,De,Oe]}),t[105]=xe,t[106]=De,t[107]=Oe,t[108]=ke):ke=t[108];let Ae;t[109]!==ve||t[110]!==ye||t[111]!==ke?(Ae=(0,Z.jsxs)(qo,{className:`space-y-6 pb-1`,children:[ve,ye,ke]}),t[109]=ve,t[110]=ye,t[111]=ke,t[112]=Ae):Ae=t[112];let je;t[113]===r?je=t[114]:(je=()=>r(!1),t[113]=r,t[114]=je);let Me;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,Z.jsx)(s,{id:`dEgA5A`}),t[115]=Me):Me=t[115];let Ne;t[116]!==O||t[117]!==je?(Ne=(0,Z.jsx)(Ai,{variant:`outline`,className:`font-mono uppercase`,onClick:je,disabled:O,children:Me}),t[116]=O,t[117]=je,t[118]=Ne):Ne=t[118];let Pe;t[119]===O?Pe=t[120]:(Pe=O?(0,Z.jsx)(s,{id:`E9bKSA`}):(0,Z.jsx)(s,{id:`hYgDIe`}),t[119]=O,t[120]=Pe);let Fe;t[121]!==de||t[122]!==le||t[123]!==Pe?(Fe=(0,Z.jsx)(Ai,{onClick:de,disabled:le,children:Pe}),t[121]=de,t[122]=le,t[123]=Pe,t[124]=Fe):Fe=t[124];let Ie;t[125]!==Ne||t[126]!==Fe?(Ie=(0,Z.jsxs)(Jo,{children:[Ne,Fe]}),t[125]=Ne,t[126]=Fe,t[127]=Ie):Ie=t[127];let Le;t[128]!==_e||t[129]!==Ae||t[130]!==Ie?(Le=(0,Z.jsxs)(Ko,{className:`sm:max-w-md`,"data-ok-layer-spawned":``,children:[_e,Ae,Ie]}),t[128]=_e,t[129]=Ae,t[130]=Ie,t[131]=Le):Le=t[131];let Re;return t[132]!==r||t[133]!==n||t[134]!==Le?(Re=(0,Z.jsx)(Xo,{open:n,onOpenChange:r,children:Le}),t[132]=r,t[133]=n,t[134]=Le,t[135]=Re):Re=t[135],Re}function vg(e){return gg(e.currentTarget)}function yg(e){let t=(0,$.c)(66),{triggerId:n,labelledById:r,open:a,onOpenChange:o,value:c,onValueChange:l,templates:d,loading:f}=e,{_:p}=i(),m=(0,Q.useId)(),h;if(t[0]!==d||t[1]!==c){let e;t[3]===c?e=t[4]:(e=e=>e.name===c,t[3]=c,t[4]=e),h=d.find(e),t[0]=d,t[1]=c,t[2]=h}else h=t[2];let g=h,_=c===dg,v=a?m:void 0,y=`${r} ${n}`,b;t[5]!==_||t[6]!==f||t[7]!==g?.name||t[8]!==g?.title||t[9]!==c?(b=f?(0,Z.jsx)(s,{id:`Hl89Qd`}):_?(0,Z.jsx)(s,{id:`E7BhZn`}):g?.title??g?.name??c,t[5]=_,t[6]=f,t[7]=g?.name,t[8]=g?.title,t[9]=c,t[10]=b):b=t[10];let x;t[11]===b?x=t[12]:(x=(0,Z.jsx)(`span`,{className:`truncate`,children:b}),t[11]=b,t[12]=x);let S;t[13]!==_||t[14]!==f||t[15]!==g?(S=!f&&!_&&g?(0,Z.jsx)(Cg,{entry:g}):null,t[13]=_,t[14]=f,t[15]=g,t[16]=S):S=t[16];let C;t[17]!==x||t[18]!==S?(C=(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[x,S]}),t[17]=x,t[18]=S,t[19]=C):C=t[19];let w;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Z.jsx)(zl,{className:`ml-2 size-4 shrink-0 opacity-50`,"aria-hidden":`true`}),t[20]=w):w=t[20];let T;t[21]!==f||t[22]!==a||t[23]!==v||t[24]!==y||t[25]!==C||t[26]!==n?(T=(0,Z.jsx)(H,{asChild:!0,children:(0,Z.jsxs)(Ai,{id:n,type:`button`,variant:`outline`,role:`combobox`,"aria-expanded":a,"aria-haspopup":`listbox`,"aria-controls":v,"aria-labelledby":y,disabled:f,className:`w-full justify-between font-normal`,children:[C,w]})}),t[21]=f,t[22]=a,t[23]=v,t[24]=y,t[25]=C,t[26]=n,t[27]=T):T=t[27];let E;t[28]===p?E=t[29]:(E=p({id:`UQAp48`}),t[28]=p,t[29]=E);let D;t[30]===E?D=t[31]:(D=(0,Z.jsx)(Me,{placeholder:E}),t[30]=E,t[31]=D);let O;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`c8iK2Y`})}),t[32]=O):O=t[32];let k;if(t[33]!==o||t[34]!==l||t[35]!==d||t[36]!==c){let e;t[38]!==o||t[39]!==l||t[40]!==c?(e=e=>{let t=e.title??e.name,n=e.title&&e.title!==e.name?e.name:void 0,r=`${e.scope}:${e.source_folder}:${e.name}`;return(0,Z.jsxs)(se,{value:r,keywords:[t,e.name,e.description??``,e.scope,e.source_folder??``],onSelect:()=>{l(e.name),o(!1)},className:`items-start gap-3`,children:[(0,Z.jsx)(Zo,{className:Oi(`mt-1 size-4 shrink-0`,c===e.name?`opacity-100`:`opacity-0`),"aria-hidden":`true`}),(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{className:`truncate text-sm font-medium`,children:t}),n?(0,Z.jsx)(`code`,{className:`font-mono text-2xs text-muted-foreground shrink-0`,children:n}):null,(0,Z.jsx)(Cg,{entry:e,className:`ml-auto`})]}),e.description?(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:e.description}):null]})]},r)},t[38]=o,t[39]=l,t[40]=c,t[41]=e):e=t[41],k=d.map(e),t[33]=o,t[34]=l,t[35]=d,t[36]=c,t[37]=k}else k=t[37];let A;t[42]!==o||t[43]!==l?(A=()=>{l(dg),o(!1)},t[42]=o,t[43]=l,t[44]=A):A=t[44];let j=c===dg?`opacity-100`:`opacity-0`,M;t[45]===j?M=t[46]:(M=Oi(`mt-1 size-4 shrink-0`,j),t[45]=j,t[46]=M);let N;t[47]===M?N=t[48]:(N=(0,Z.jsx)(Zo,{className:M,"aria-hidden":`true`}),t[47]=M,t[48]=N);let P;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Z.jsx)(`span`,{className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`E7BhZn`})}),t[49]=P):P=t[49];let I;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[P,(0,Z.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`,children:(0,Z.jsx)(s,{id:`hZoBHK`})})]}),t[50]=I):I=t[50];let L;t[51]!==A||t[52]!==N?(L=(0,Z.jsxs)(se,{value:`Blank note empty`,onSelect:A,className:`items-start gap-3`,children:[N,I]}),t[51]=A,t[52]=N,t[53]=L):L=t[53];let R;t[54]!==m||t[55]!==k||t[56]!==L?(R=(0,Z.jsxs)(u,{id:m,className:`subtle-scrollbar`,children:[O,k,L]}),t[54]=m,t[55]=k,t[56]=L,t[57]=R):R=t[57];let z;t[58]!==D||t[59]!==R?(z=(0,Z.jsx)(F,{className:`w-[var(--radix-popover-trigger-width)] p-0`,align:`start`,onOpenAutoFocus:Sg,onWheel:xg,onTouchMove:bg,children:(0,Z.jsxs)(jt,{children:[D,R]})}),t[58]=D,t[59]=R,t[60]=z):z=t[60];let B;return t[61]!==o||t[62]!==a||t[63]!==z||t[64]!==T?(B=(0,Z.jsxs)(re,{open:a,onOpenChange:o,children:[T,z]}),t[61]=o,t[62]=a,t[63]=z,t[64]=T,t[65]=B):B=t[65],B}function bg(e){e.stopPropagation()}function xg(e){e.stopPropagation()}function Sg(e){e.preventDefault(),e.currentTarget.querySelector(`[cmdk-input]`)?.focus()}function Cg(e){let t=(0,$.c)(7),{entry:n,className:r}=e;if(n.scope===`inherited`){let e;t[0]===r?e=t[1]:(e=Oi(`shrink-0 text-2xs`,r),t[0]=r,t[1]=e);let i;t[2]===n.source_folder?i=t[3]:(i=n.source_folder||(0,Z.jsx)(s,{id:`ZNK2Tq`}),t[2]=n.source_folder,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,Z.jsx)(le,{variant:`gray`,className:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}return null}function wg(e){return e.split(`/`).pop()??e}function Tg(e,t){let n=new Map;for(let e of t?.folders??[])n.set(e.path,e.summary);let r=e.created.filter(e=>e.kind===`folder`).map(e=>({kind:`folder`,name:`${e.path}/`,description:n.get(wg(e.path))??``})),i=e.created.filter(e=>e.kind===`file`).map(e=>({kind:`file`,name:e.path,description:wg(e.path)===`log.md`?Is._({id:`l3mSlL`}):``}));return[...r,...i]}function Eg(e){let t=(0,$.c)(23),{plan:n,selectedPack:r}=e,{_:a}=i(),o,c,l,u,d,f;if(t[0]!==a||t[1]!==n||t[2]!==r){let e=[...Tg(n,r)].sort(kg),i=new Set(e.map(Og));d=`space-y-2`,t[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsxs)(`h3`,{className:`flex items-center gap-1.5 text-xs font-semibold uppercase font-mono tracking-wider text-primary`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`flex items-center justify-center`,children:`◇`}),(0,Z.jsx)(s,{id:`xSVO3J`})]}),t[9]=f):f=t[9],u=`overflow-hidden rounded-md border border-border/60 bg-muted/20`,t[10]===a?o=t[11]:(o=a({id:`INEQsp`}),t[10]=a,t[11]=o),c=`py-1.5`,l=e.map(e=>{let t=e.name.replace(/\/$/,``).split(`/`),n=0,r=0;for(let e=1;e<t.length;e++){let a=t.slice(0,e).join(`/`);i.has(a)&&(n++,r=e)}let a=t.slice(r).join(`/`)+(e.kind===`folder`?`/`:``),o=e.kind===`folder`;return(0,Z.jsxs)(`li`,{className:`relative flex min-w-0 items-center gap-1.5 py-1 pr-3`,style:{paddingLeft:`${12+n*16}px`},children:[Array.from({length:n},Dg),o?(0,Z.jsx)(eu,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`,strokeWidth:1.5}):(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),(0,Z.jsx)(`code`,{className:`font-mono text-1sm shrink-0 text-foreground/80`,children:a}),o&&e.description?(0,Z.jsxs)(ic,{children:[(0,Z.jsx)($s,{"aria-label":`Show description`,className:`flex shrink-0 cursor-help rounded outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,children:(0,Z.jsx)(Qo,{"aria-hidden":`true`,className:`size-3 text-muted-foreground/60`,strokeWidth:1.5})}),(0,Z.jsx)(tc,{children:e.description})]}):null]},e.name)}),t[0]=a,t[1]=n,t[2]=r,t[3]=o,t[4]=c,t[5]=l,t[6]=u,t[7]=d,t[8]=f}else o=t[3],c=t[4],l=t[5],u=t[6],d=t[7],f=t[8];let p;t[12]!==o||t[13]!==c||t[14]!==l?(p=(0,Z.jsx)(`ul`,{"aria-label":o,className:c,children:l}),t[12]=o,t[13]=c,t[14]=l,t[15]=p):p=t[15];let m;t[16]!==u||t[17]!==p?(m=(0,Z.jsx)(`div`,{className:u,children:p}),t[16]=u,t[17]=p,t[18]=m):m=t[18];let h;return t[19]!==d||t[20]!==f||t[21]!==m?(h=(0,Z.jsxs)(`section`,{className:d,children:[f,m]}),t[19]=d,t[20]=f,t[21]=m,t[22]=h):h=t[22],h}function Dg(e,t){return(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`absolute top-0 bottom-0 w-px bg-border/50`,style:{left:`${12+t*16+8}px`}},`guide:${t}`)}function Og(e){return e.name.replace(/\/$/,``)}function kg(e,t){return e.name.localeCompare(t.name)}async function Ag(e){let t=await e.json().catch(()=>null),n=Or.safeParse(t);if(!n.success)return{kind:`internal`,message:`HTTP ${e.status}`};let r=n.data.detail??n.data.title,i=n.data.type;return i===`urn:ok:error:seed-prerequisite-missing`?{kind:`prerequisite-missing`,message:r}:i===`urn:ok:error:seed-invalid-root`?{kind:`invalid-root`,message:r}:i===`urn:ok:error:no-project-dir`?{kind:`no-project`,message:r}:{kind:`internal`,message:r}}function jg(){let e=typeof window<`u`?window.okDesktop:void 0;return e?.seed?{plan:e.seed.plan,apply:e.seed.apply,listPacks:e.seed.listPacks}:{plan:async e=>{let t=new URLSearchParams;e?.rootDir&&t.set(`rootDir`,e.rootDir),e?.packId&&t.set(`packId`,e.packId);let n=t.toString(),r=await fetch(`/api/seed/plan${n?`?${n}`:``}`);if(!r.ok)return{ok:!1,error:await Ag(r)};let i=await r.json().catch(()=>null);return i?.plan?{ok:!0,plan:i.plan}:{ok:!1,error:{kind:`internal`,message:`Malformed plan response`}}},apply:async(e,t)=>{let n=await fetch(`/api/seed/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({plan:e,packId:t?.packId})});if(!n.ok)return{ok:!1,error:await Ag(n)};let r=await n.json().catch(()=>null);return r?.result?{ok:!0,result:r.result}:{ok:!1,error:{kind:`internal`,message:`Malformed apply response`}}},listPacks:async()=>{let e=await fetch(`/api/seed/packs`);if(!e.ok)return{ok:!1,error:{kind:`internal`,message:`HTTP ${e.status}`}};let t=await e.json().catch(()=>null);return!t||!Array.isArray(t.packs)?{ok:!1,error:{kind:`internal`,message:`Malformed listPacks response`}}:{ok:!0,packs:t.packs}}}}var Mg={"knowledge-base":ou,"software-lifecycle":He,"codebase-wiki":Nl,"plain-notes":Fu,worldbuilding:Ul,"writing-pipeline":yu,"entity-vault":pu,okf:ql};function Ng(e){return Mg[e]??ou}function Pg(e){let t=(0,$.c)(37),{onPackSelect:n,onCreateBlankFile:r,className:a,packs:o}=e,{_:c}=i(),[l,u]=(0,Q.useState)(null),[d,f]=(0,Q.useState)(null),p=o===void 0,m,h;t[0]===p?(m=t[1],h=t[2]):(m=()=>{if(!p)return;let e=!1;return(async()=>{try{let t=await jg().listPacks();if(e)return;t.ok?u(t.packs):f(t.error.message)}catch(t){let n=t;if(e)return;f(n instanceof Error?n.message:String(n))}})(),()=>{e=!0}},h=[p],t[0]=p,t[1]=m,t[2]=h),(0,Q.useEffect)(m,h);let g=p?l:o;if(d!==null){let e;t[3]===a?e=t[4]:(e=Oi(`rounded-md bg-destructive/10 p-4 text-sm text-destructive`,a),t[3]=a,t[4]=e);let n;t[5]===d?n=t[6]:(n=(0,Z.jsx)(s,{id:`56WWtu`,values:{error:d}}),t[5]=d,t[6]=n);let r;return t[7]!==e||t[8]!==n?(r=(0,Z.jsx)(`div`,{role:`alert`,className:e,children:n}),t[7]=e,t[8]=n,t[9]=r):r=t[9],r}if(g===null){let e;t[10]===a?e=t[11]:(e=Oi(`grid w-full max-w-5xl gap-4 sm:grid-cols-2 lg:grid-cols-3`,a),t[10]=a,t[11]=e);let n;t[12]===c?n=t[13]:(n=c({id:`BeWTQy`}),t[12]=c,t[13]=n);let r;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(r=Array.from({length:Object.keys(Mg).length},Ig).map(Fg),t[14]=r):r=t[14];let i;return t[15]!==e||t[16]!==n||t[17]!==r?(i=(0,Z.jsx)(`div`,{role:`status`,className:e,"aria-busy":`true`,"aria-label":n,children:r}),t[15]=e,t[16]=n,t[17]=r,t[18]=i):i=t[18],i}if(g.length===0){let e;t[19]===a?e=t[20]:(e=Oi(`flex w-full max-w-5xl items-center justify-center rounded-2xl border border-dashed border-border/60 bg-muted/20 p-8 text-sm text-muted-foreground`,a),t[19]=a,t[20]=e);let n;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsx)(s,{id:`zLGXna`}),t[21]=n):n=t[21];let r;return t[22]===e?r=t[23]:(r=(0,Z.jsx)(`div`,{role:`status`,className:e,children:n}),t[22]=e,t[23]=r),r}let _;t[24]===a?_=t[25]:(_=Oi(`grid w-full max-w-5xl gap-4 sm:grid-cols-2 lg:grid-cols-3`,a),t[24]=a,t[25]=_);let v;if(t[26]!==n||t[27]!==g){let e;t[29]===n?e=t[30]:(e=e=>(0,Z.jsx)(Rg,{pack:e,onSelect:()=>n(e.id)},e.id),t[29]=n,t[30]=e),v=g.map(e),t[26]=n,t[27]=g,t[28]=v}else v=t[28];let y;t[31]===r?y=t[32]:(y=r?(0,Z.jsx)(Lg,{onSelect:r}):null,t[31]=r,t[32]=y);let b;return t[33]!==_||t[34]!==v||t[35]!==y?(b=(0,Z.jsxs)(`div`,{className:_,children:[v,y]}),t[33]=_,t[34]=v,t[35]=y,t[36]=b):b=t[36],b}function Fg(e){return(0,Z.jsx)(zg,{},`skeleton-${e}`)}function Ig(e,t){return t}function Lg(e){let t=(0,$.c)(3),{onSelect:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Z.jsx)(`span`,{className:`flex items-center gap-1.5`,children:(0,Z.jsx)(s,{id:`L4Cdd9`,components:{0:(0,Z.jsx)(Xa,{"aria-hidden":`true`,className:`size-3.5`})}})}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,Z.jsx)(`button`,{type:`button`,onClick:n,className:`group flex h-full min-h-22 flex-col items-center justify-center gap-2 rounded-2xl border border-dashed border-border/60 bg-card p-5 text-center text-sm transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px text-muted-foreground`,children:r}),t[1]=n,t[2]=i),i}function Rg(e){let t=(0,$.c)(17),{pack:n,onSelect:r}=e,i;t[0]===n.id?i=t[1]:(i=Ng(n.id),t[0]=n.id,t[1]=i);let a=i,o;t[2]===a?o=t[3]:(o=(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:(0,Z.jsx)(a,{className:`size-3.5`})}),t[2]=a,t[3]=o);let s;t[4]===n.name?s=t[5]:(s=(0,Z.jsx)(`h3`,{className:`text-sm font-medium leading-tight`,children:n.name}),t[4]=n.name,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-2`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;t[9]===n.description?l=t[10]:(l=(0,Z.jsx)(`p`,{className:`text-1sm leading-relaxed text-muted-foreground`,children:n.description}),t[9]=n.description,t[10]=l);let u;t[11]!==c||t[12]!==l?(u=(0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[c,l]}),t[11]=c,t[12]=l,t[13]=u):u=t[13];let d;return t[14]!==r||t[15]!==u?(d=(0,Z.jsx)(`button`,{type:`button`,onClick:r,className:`group flex h-full flex-col items-start gap-4 rounded-2xl border border-border/60 bg-card p-5 text-left transition-[border-color,box-shadow,transform] hover:border-border hover:shadow-sm focus-visible:border-ring focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px`,children:u}),t[14]=r,t[15]=u,t[16]=d):d=t[16],d}function zg(){let e=(0,$.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Z.jsx)(`span`,{className:`size-10 animate-pulse rounded-lg bg-muted`,"aria-hidden":`true`,children:(0,Z.jsx)(Te,{className:`size-5 animate-spin text-muted-foreground opacity-0`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`flex h-full min-h-[200px] flex-col items-start gap-4 rounded-xl border border-border/60 bg-card p-6`,children:[t,(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,Z.jsx)(`div`,{className:`h-4 w-1/2 animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-full animate-pulse rounded bg-muted`}),(0,Z.jsx)(`div`,{className:`h-3 w-4/5 animate-pulse rounded bg-muted`})]}),(0,Z.jsx)(`div`,{className:`mt-auto h-3 w-20 animate-pulse rounded bg-muted`})]}),e[1]=n):n=e[1],n}var Bg=`knowledge-base`;function Vg(e){let t=(0,$.c)(68),{open:n,onOpenChange:r,onSeedApplied:a,initialPackId:o}=e,{_:c}=i(),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={kind:`loading`},t[0]=l):l=t[0];let[u,d]=(0,Q.useState)(l),[f,p]=(0,Q.useState)(null),[m,h]=(0,Q.useState)(o??Bg),[g,_]=(0,Q.useState)(`project-root`),[v,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(o===void 0?`pick`:`configure`),S=(0,Q.useRef)(!0),C=f?.find(e=>e.id===m),w,T;t[1]!==n||t[2]!==f?(w=()=>{if(!n||f!==null)return;let e=!1;return(async()=>{try{let t=await jg().listPacks();if(e)return;t.ok?p(t.packs):(p([]),d({kind:`error`,message:t.error.message}))}catch(t){let n=t;if(e)return;p([]),d({kind:`error`,message:n instanceof Error?n.message:String(n)})}})(),()=>{e=!0}},T=[n,f],t[1]=n,t[2]=f,t[3]=w,t[4]=T):(w=t[3],T=t[4]),(0,Q.useEffect)(w,T);let E,D;t[5]!==o||t[6]!==n?(E=()=>{n&&(h(o??Bg),_(`project-root`),y(``),x(o===void 0?`pick`:`configure`),d({kind:`loading`}),S.current=!0)},D=[n,o],t[5]=o,t[6]=n,t[7]=E,t[8]=D):(E=t[7],D=t[8]),(0,Q.useEffect)(E,D),(0,Q.useEffect)(()=>{C&&y(C.defaultSubfolder??``)},[C]);let O;t[9]===v?O=t[10]:(O=v.trim(),t[9]=v,t[10]=O);let k=O,A=g===`subfolder`&&k===``,j,M;t[11]!==c||t[12]!==n||t[13]!==f||t[14]!==g||t[15]!==m||t[16]!==b||t[17]!==A||t[18]!==k?(j=()=>{if(!n||b!==`configure`||f===null)return;if(A){d({kind:`error`,message:c({id:`Z8KDox`})});return}let e=g===`project-root`?void 0:k,t=S.current?0:200;S.current=!1;let r=!1,i=setTimeout(()=>{r||(d(Hg),jg().plan({rootDir:e,packId:m}).then(e=>{if(!r){if(!e.ok){d({kind:`error`,message:e.error.message});return}d(e.plan.created.length>0?{kind:`plan`,plan:e.plan}:{kind:`already-seeded`,plan:e.plan})}}).catch(e=>{r||d({kind:`error`,message:e instanceof Error?e.message:String(e)})}))},t);return()=>{r=!0,clearTimeout(i)}},M=[n,b,f,m,g,k,A,c],t[11]=c,t[12]=n,t[13]=f,t[14]=g,t[15]=m,t[16]=b,t[17]=A,t[18]=k,t[19]=j,t[20]=M):(j=t[19],M=t[20]),(0,Q.useEffect)(j,M);let N=async function(){if(u.kind!==`plan`)return;let e=u.plan;d({kind:`applying`,plan:e});let t;try{t=await jg().apply(e,{packId:m})}catch(t){let n=t,r=n instanceof Error?n.message:String(n);Ls.error(c({id:`iqugog`,values:{errorDetail:r}})),d({kind:`plan`,plan:e});return}if(t.ok){let e=C?.name??c({id:`W8vpBM`}),n=t.result.applied,i=c(n===0?{id:`K6jjWB`,values:{packName:e}}:{id:`x3-2ta`,values:{packName:e,projectEntries:n}});Ls.success(i),a?.(),r(!1)}else{let n=t.error.message;Ls.error(c({id:`iqugog`,values:{errorDetail:n}})),d({kind:`plan`,plan:e})}},P=o!==void 0,F=C?.name,I=c(b===`configure`&&C?{id:`hxEUVJ`,values:{selectedPackName:F}}:{id:`RGkNeJ`}),L;t[21]!==c||t[22]!==C||t[23]!==b?(L=b===`configure`&&C?C.description:c({id:`T-4cw2`}),t[21]=c,t[22]=C,t[23]=b,t[24]=L):L=t[24];let R=L,z;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(z=function(e){h(e),x(`configure`),S.current=!0},t[25]=z):z=t[25];let B=z,V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=function(){x(`pick`),d({kind:`loading`}),S.current=!0},t[26]=V):V=t[26];let H=V,U;t[27]===I?U=t[28]:(U=(0,Z.jsx)(Go,{children:I}),t[27]=I,t[28]=U);let W;t[29]===R?W=t[30]:(W=(0,Z.jsx)(Wo,{children:R}),t[29]=R,t[30]=W);let G;t[31]!==U||t[32]!==W?(G=(0,Z.jsxs)(Yo,{children:[U,W]}),t[31]=U,t[32]=W,t[33]=G):G=t[33];let K;t[34]!==f||t[35]!==u||t[36]!==g||t[37]!==C||t[38]!==b||t[39]!==v?(K=b===`pick`?(0,Z.jsx)(qo,{children:(0,Z.jsx)(Pg,{packs:f,onPackSelect:B})}):(0,Z.jsxs)(qo,{className:`space-y-6`,children:[(0,Z.jsx)(Ug,{choice:g,subfolder:v,placeholder:C?.defaultSubfolder??`subfolder`,onChoiceChange:_,onSubfolderChange:y}),(0,Z.jsx)(Wg,{phase:u,selectedPack:C})]}),t[34]=f,t[35]=u,t[36]=g,t[37]=C,t[38]=b,t[39]=v,t[40]=K):K=t[40];let q;t[41]!==P||t[42]!==b?(q=b===`configure`&&!P?(0,Z.jsxs)(Ai,{className:`mr-auto uppercase font-mono`,variant:`ghost`,onClick:H,children:[(0,Z.jsx)(Ri,{"aria-hidden":`true`,className:`h-4 w-4`}),(0,Z.jsx)(s,{id:`iH8pgl`})]}):null,t[41]=P,t[42]=b,t[43]=q):q=t[43];let J;t[44]===r?J=t[45]:(J=()=>r(!1),t[44]=r,t[45]=J);let ee;t[46]===u.kind?ee=t[47]:(ee=u.kind===`already-seeded`||u.kind===`error`?(0,Z.jsx)(s,{id:`yz7wBu`}):(0,Z.jsx)(s,{id:`dEgA5A`}),t[46]=u.kind,t[47]=ee);let Y;t[48]!==J||t[49]!==ee?(Y=(0,Z.jsx)(Ai,{className:`uppercase font-mono`,variant:`outline`,onClick:J,children:ee}),t[48]=J,t[49]=ee,t[50]=Y):Y=t[50];let te;t[51]!==N||t[52]!==u.kind||t[53]!==b||t[54]!==A?(te=b===`configure`&&u.kind===`plan`?(0,Z.jsx)(Ai,{onClick:N,disabled:A,children:(0,Z.jsx)(s,{id:`4TzU0n`})}):b===`configure`&&u.kind===`applying`?(0,Z.jsxs)(Ai,{disabled:!0,children:[(0,Z.jsx)(Te,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(s,{id:`XYlJJT`})]}):null,t[51]=N,t[52]=u.kind,t[53]=b,t[54]=A,t[55]=te):te=t[55];let X;t[56]!==q||t[57]!==Y||t[58]!==te?(X=(0,Z.jsxs)(Jo,{children:[q,Y,te]}),t[56]=q,t[57]=Y,t[58]=te,t[59]=X):X=t[59];let ne;t[60]!==G||t[61]!==K||t[62]!==X?(ne=(0,Z.jsxs)(Ko,{className:`sm:max-w-4xl`,"data-ok-layer-spawned":``,children:[G,K,X]}),t[60]=G,t[61]=K,t[62]=X,t[63]=ne):ne=t[63];let re;return t[64]!==r||t[65]!==n||t[66]!==ne?(re=(0,Z.jsx)(Xo,{open:n,onOpenChange:r,children:ne}),t[64]=r,t[65]=n,t[66]=ne,t[67]=re):re=t[67],re}function Hg(e){return e.kind===`plan`||e.kind===`already-seeded`?e:{kind:`loading`}}function Ug(e){let t=(0,$.c)(21),{choice:n,subfolder:r,placeholder:i,onChoiceChange:a,onSubfolderChange:o}=e,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Z.jsx)(`p`,{className:`text-sm font-medium`,children:(0,Z.jsx)(s,{id:`3wiBAs`})}),t[0]=c):c=t[0];let l;t[1]===a?l=t[2]:(l=e=>a(e),t[1]=a,t[2]=l);let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Ca,{children:(0,Z.jsx)(s,{id:`RSqaSd`})}),t[3]=u):u=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(ta,{htmlFor:`seed-root-project-root`,children:(0,Z.jsxs)(Mo,{orientation:`horizontal`,children:[(0,Z.jsxs)(Na,{children:[u,(0,Z.jsx)(ra,{className:`text-1sm`,children:(0,Z.jsx)(s,{id:`vPYaz3`})})]}),(0,Z.jsx)(mc,{value:`project-root`,id:`seed-root-project-root`})]})}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsx)(Ca,{children:(0,Z.jsx)(s,{id:`ZWgr0b`})}),t[5]=f):f=t[5];let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(ra,{className:`nth-last-2:mt-0 text-1sm`,children:(0,Z.jsx)(s,{id:`GUpclA`})}),t[6]=p):p=t[6];let m;t[7]!==n||t[8]!==o||t[9]!==i||t[10]!==r?(m=n===`subfolder`&&(0,Z.jsx)($o,{value:r,onChange:e=>o(e.target.value),placeholder:i,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,className:`mt-1.5 font-mono text-xs bg-background`}),t[7]=n,t[8]=o,t[9]=i,t[10]=r,t[11]=m):m=t[11];let h;t[12]===m?h=t[13]:(h=(0,Z.jsxs)(Na,{children:[f,p,m]}),t[12]=m,t[13]=h);let g;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,Z.jsx)(mc,{value:`subfolder`,id:`seed-root-subfolder`}),t[14]=g):g=t[14];let _;t[15]===h?_=t[16]:(_=(0,Z.jsx)(ta,{htmlFor:`seed-root-subfolder`,children:(0,Z.jsxs)(Mo,{orientation:`horizontal`,children:[h,g]})}),t[15]=h,t[16]=_);let v;return t[17]!==n||t[18]!==_||t[19]!==l?(v=(0,Z.jsxs)(`div`,{className:`space-y-2 py-1`,children:[c,(0,Z.jsxs)(pc,{className:`sm:flex`,value:n,onValueChange:l,children:[d,_]})]}),t[17]=n,t[18]=_,t[19]=l,t[20]=v):v=t[20],v}function Wg(e){let t=(0,$.c)(13),{phase:n,selectedPack:r}=e;if(n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 py-4 text-sm text-muted-foreground`,children:[(0,Z.jsx)(Te,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),(0,Z.jsx)(s,{id:`mSJ3Rn`})]}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`div`,{className:`rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.kind===`already-seeded`){let e;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`font-medium`,children:(0,Z.jsx)(s,{id:`YwPUUP`})}),t[3]=e):e=t[3];let n;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Z.jsxs)(`div`,{className:`py-2 text-sm`,children:[e,(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:(0,Z.jsx)(s,{id:`gcV0dI`})})]}),t[4]=n):n=t[4],n}let i;t[5]!==n.plan||t[6]!==r?(i=(0,Z.jsx)(Eg,{plan:n.plan,selectedPack:r}),t[5]=n.plan,t[6]=r,t[7]=i):i=t[7];let a;t[8]===n.plan.warnings?a=t[9]:(a=n.plan.warnings.length>0?(0,Z.jsx)(`div`,{className:`rounded-md bg-warning/10 p-3 text-xs text-warning-foreground`,children:n.plan.warnings.map(Gg)}):null,t[8]=n.plan.warnings,t[9]=a);let o;return t[10]!==i||t[11]!==a?(o=(0,Z.jsxs)(`div`,{className:`space-y-6 py-1 text-sm`,children:[i,a]}),t[10]=i,t[11]=a,t[12]=o):o=t[12],o}function Gg(e){return(0,Z.jsx)(`p`,{children:e},e)}function Kg(){let[e]=(0,Q.useState)(qg);return e}function qg(){return qr()!=null}var Jg=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`},{id:`opencode`,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`}],Yg=Jg.filter(e=>e.id!==`claude-cowork`&&e.id!==`opencode`),Xg=(0,Q.createContext)(!1);function Zg(e){let t=(0,$.c)(5),{children:n}=e,[r,i]=(0,Q.useState)($g),a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{if(window.okDesktop)return;let e=new AbortController;return N(e.signal).then(t=>{e.signal.aborted||t.status!==`ok`||i(t.config.singleFile)}).catch(Qg),()=>e.abort()},o=[],t[0]=a,t[1]=o):(a=t[0],o=t[1]),(0,Q.useEffect)(a,o);let s;return t[2]!==n||t[3]!==r?(s=(0,Z.jsx)(Xg,{value:r,children:n}),t[2]=n,t[3]=r,t[4]=s):s=t[4],s}function Qg(){}function $g(){return typeof window<`u`?window.okDesktop?.config.singleFile??!1:!1}function e_(){return(0,Q.use)(Xg)}var t_=`#settings`;function n_(e){return xc(e.target)?!1:Cc(e,`settings`)}function r_(e){return e.replace(/^#/,``)===`settings`}function i_(){return typeof window>`u`?``:window.location.hash}function a_(){let e=(0,$.c)(4),[t,n]=(0,Q.useState)(s_),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=()=>{(0,Q.startTransition)(()=>{n(r_(i_()))})};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,Q.useEffect)(r,i);let a=o_,o;return e[2]===t?o=e[3]:(o={open:t,close:a},e[2]=t,e[3]=o),o}function o_(){typeof window>`u`||r_(i_())&&window.history.back()}function s_(){return r_(i_())}function c_(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function l_(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=hs(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function u_(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?c_(e):l_()}var d_=`ok:skill:cowork:installed`,f_=`1`,p_=250,m_=`/api/skill/install-state`;function h_(e){return`${d_}:v${e}`}var g_=new Map;async function __(e={},t={}){let n=t.force?`__force__`:`__default__`,r=g_.get(n);if(r)return r;let i=v_(e,t);return g_.set(n,i),i.finally(()=>{g_.get(n)===i&&g_.delete(n)}),i}async function v_(e,t){let n=e.installer===void 0?u_():e.installer,r=y_(e.storage),i=e.fetchSnapshot??x_,a=e.serverTimeoutMs??p_,o=null;if(!t.force){try{o=await S_(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=h_(o?.currentVersion??e.fallbackSkillVersion??b_());if(!t.force&&r?.getItem(s)===f_)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,f_)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function y_(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function b_(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function x_(){let e;try{e=await fetch(m_,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function S_(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function C_(e){return __({},e)}function w_(){return __({},{force:!0})}async function T_(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function E_(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return T_({target:`claude-cowork`,url:Qn({mode:`cowork`},e)},n);case`claude-code`:return T_({target:`claude-code`,url:Qn({mode:`code`},e)},n);case`codex`:return T_({target:`codex`,url:ar(e)},n);case`cursor`:return T_({target:`cursor`,url:hr(e),workspacePath:e.projectDir},n);case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function D_(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:O_(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:O_(e)}}}function O_(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}async function k_(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}function A_(e,t,n){let r=n===`\\`?t.replaceAll(`/`,`\\`):t;return`${e.endsWith(n)?e.slice(0,-1):e}${n}${r}`}function j_(e){return`${e}.md`}function M_(e){if(!e.docName||!e.workspace)return null;let t=j_(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:A_(n,t,r)}}function N_(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function P_(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function F_(e){return D_(e.installUrl).then(()=>void 0)}function I_(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function L_(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:n}=e.workspace;if(e.docName){let r=j_(e.docName),i={scope:`doc`,docRelativePath:r,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?i:{...i,selection:e.selection},projectDir:t,docPath:A_(t,r,n)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function R_(e){return`Opened in ${e}.`}function z_(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function B_(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function V_(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function H_(e,t,n){if(e.scope===`doc`){let r={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n};return e.selection===void 0?r:{...r,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n}}function U_(e,t,n){return e.compose?Hn(H_(e.compose,t,n)):e.selection?ui({...e.selection,target:t}):e.ask?xr(e.ask.relativePath,e.ask.instruction,n,t):Er(e.docContext===null?e.folderRelativePath?Rr(e.folderRelativePath,n,e.instruction):e.createDescription===void 0?pr(n,e.instruction):wr(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[]):zn(e.docContext.relativePath,n,e.instruction))}function W_(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?U_(e,Ci[t].handoffTarget,!1):ei(e.docContext?.relativePath??null)}async function G_(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`OpenKnowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:U_(t,e,n.autoOpen)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=V_(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(R_(u));else{let i=B_(r),a=z_(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{G_(e,t,n,r+1)}}})}return a}function K_(e){return Jg.find(t=>t.id===e)?.displayName??e}function q_(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function J_(){return{dispatchHandoff:E_,recordHandoff:k_,toast:{success:e=>{Ls.success(e)},error:(e,t)=>{Ls.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>q_(),getDisplayName:K_,ensureCoworkSkillInstalled:C_,autoOpen:!0}}function Y_(){let e=(0,$.c)(2),{merged:t}=ge(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>G_(e,t,{...J_(),autoOpen:n}),reinstallCoworkSkill:w_},e[0]=n,e[1]=r),r}var X_=[...new Set(Jg.flatMap(e=>e.schemes))];function Z_(e,t){let n=t.now?.()??Date.now(),r={};for(let t of Jg){let i=t.schemes[0],a=i===void 0?void 0:e[i];if(!a){r[t.id]={installed:null};continue}r[t.id]={installed:a.installed,...a.displayName===void 0?{}:{displayName:a.displayName},lastChecked:n}}return r}function Q_(e){return Z_({},e)}async function $_(e){let t=e.schemes??X_,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var ev=Object.fromEntries(X_.map(e=>[e,{installed:!1}]));async function tv(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return ev}if(!t.ok)return ev;let n;try{n=await t.json()}catch{return ev}if(typeof n!=`object`||!n||Array.isArray(n))return ev;let r=n,i={};for(let e of X_)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function nv(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function rv(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=Q_({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=Z_(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!nv(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function iv(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function av(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>$_({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>tv({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function ov(){let e=(0,$.c)(5),[t,n]=(0,Q.useState)(sv),r=(0,Q.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=rv(av());r.current=e;let t=e.subscribe(n);e.probe();let i=()=>{e.probe()};return window.addEventListener(`focus`,i),()=>{window.removeEventListener(`focus`,i),t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,Q.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function sv(){return Q_({isElectronHost:iv(),now:Date.now})}var cv=3e3,lv=600,uv=20,dv=(e,t,n)=>Xu(e,t,n,`CommandPalette`);function fv(e){window.location.assign(ls(e))}function pv(e,t){return e?.kind===`folder`||e?.kind===`folder-index`?e.folderPath:Fs(t)}function mv(e){let t=(0,$.c)(26),{entry:n,query:r,onSelect:i,disabled:a}=e,o=r===void 0?``:r,s=a===void 0?!1:a,c;t[0]===n?c=t[1]:(c=W(n),t[0]=n,t[1]=c);let l=c,u;t[2]===n?u=t[3]:(u=`title`in n&&n.title?n.title:n.path.split(`/`).pop()??n.path,t[2]=n,t[3]=u);let d=u,f=`snippet`in n?n.snippet:void 0,p=`${n.kind} ${n.path}`,m=`command-palette-nav-${n.kind}-${n.path}`,h;t[4]===l?h=t[5]:(h=(0,Z.jsx)(l,{className:`mt-0.5`}),t[4]=l,t[5]=h);let g;t[6]!==o||t[7]!==d?(g=(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:(0,Z.jsx)(gv,{query:o,text:d})}),t[6]=o,t[7]=d,t[8]=g):g=t[8];let _;t[9]!==n.path||t[10]!==o?(_=(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:(0,Z.jsx)(gv,{query:o,text:n.path})}),t[9]=n.path,t[10]=o,t[11]=_):_=t[11];let v;t[12]!==o||t[13]!==f?(v=f?(0,Z.jsx)(`span`,{className:`max-h-10 overflow-hidden text-muted-foreground text-xs leading-relaxed`,children:(0,Z.jsx)(gv,{query:o,text:f})}):null,t[12]=o,t[13]=f,t[14]=v):v=t[14];let y;t[15]!==v||t[16]!==g||t[17]!==_?(y=(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[g,_,v]}),t[15]=v,t[16]=g,t[17]=_,t[18]=y):y=t[18];let b;return t[19]!==s||t[20]!==i||t[21]!==y||t[22]!==p||t[23]!==m||t[24]!==h?(b=(0,Z.jsxs)(se,{value:p,onSelect:i,disabled:s,"data-testid":m,className:`items-start`,children:[h,y]}),t[19]=s,t[20]=i,t[21]=y,t[22]=p,t[23]=m,t[24]=h,t[25]=b):b=t[25],b}function hv(e){let t=(0,$.c)(5),{mode:n,inExclusiveMode:r,paletteModeKind:i}=e;if(r||i!==`normal`||n===`idle`||n===`content`)return null;let a=`command-palette-search-hint-${n}`,o;t[0]===n?o=t[1]:(o=n===`name-only`?(0,Z.jsx)(s,{id:`-wePNM`}):n===`truncated`?(0,Z.jsx)(s,{id:`-q4abP`}):(0,Z.jsx)(s,{id:`DbILZA`}),t[0]=n,t[1]=o);let c;return t[2]!==a||t[3]!==o?(c=(0,Z.jsx)(`div`,{"aria-live":`polite`,"data-testid":a,className:`border-t px-3 py-2 text-muted-foreground text-xs`,children:o}),t[2]=a,t[3]=o,t[4]=c):c=t[4],c}function gv(e){let t=(0,$.c)(5),{text:n,query:r}=e,i;t[0]!==r||t[1]!==n?(i=Gh(n,r).map(_v),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,Z.jsx)(Z.Fragment,{children:i}),t[3]=i,t[4]=a),a}function _v(e){let t=`${e.start}:${e.match?`match`:`plain`}`;return e.match?(0,Z.jsx)(`mark`,{className:`rounded-sm bg-primary/10 px-0.5 font-semibold text-primary`,children:e.text},t):(0,Z.jsx)(`span`,{children:e.text},t)}function vv({searchResults:e,fallbackSearchResults:t,searchStatus:n}){return e.length>0?e:n===`success`?[]:t}function yv(e){let t=(0,$.c)(181),{bridge:n,open:r,onOpenChange:a}=e,o=n===void 0?null:n,{_:c}=i(),l=e_(),[d,f]=(0,Q.useState)(``),p=(0,Q.useDeferredValue)(d),m=p.trim(),h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=[],t[0]=h):h=t[0];let[g,_]=(0,Q.useState)(h),[v,y]=(0,Q.useState)(`idle`),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(!1),[w,T]=(0,Q.useState)(!1),E;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[1]=E):E=t[1];let[D,O]=(0,Q.useState)(E),[k,A]=(0,Q.useState)(null),[j,M]=(0,Q.useState)(`idle`),N;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(N=[],t[2]=N):N=t[2];let[P,F]=(0,Q.useState)(N),I;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(I=[],t[3]=I):I=t[3];let[L,z]=(0,Q.useState)(I),[B,V]=(0,Q.useState)(null),[H,U]=(0,Q.useState)(!1),[W,G]=(0,Q.useState)(!1),K;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(K=[],t[4]=K):K=t[4];let[q,J]=(0,Q.useState)(K),[ee,Y]=(0,Q.useState)(`idle`),te;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(te=[],t[5]=te):te=t[5];let[X,ne]=(0,Q.useState)(te),[re,ie]=(0,Q.useState)(`idle`),ae=(0,Q.useRef)(!1),oe=(0,Q.useRef)(null),ce=(0,Q.useRef)(null),le=(0,Q.useRef)(null),ue=(0,Q.useRef)(null),{activeDocName:de,activeTarget:fe}=yt(),{pages:pe,pageTitles:me,pageMeta:ge,folderPaths:_e,filePaths:ve,loading:ye}=Ts(),be=ja(),{states:xe,refresh:Se}=ov(),{dispatch:Ce}=Y_(),we;t[6]===r?we=t[7]:(we={enabled:r},t[6]=r,t[7]=we);let{status:De,refresh:Oe}=$i(we),Ae=(De?.enabled??!1)&&(De?.keyPresent??!1),je=De?.embedded??0,Ne=De?.total??0,Pe=Ae&&Ne>0&&je<Ne,Fe;t[8]!==w||t[9]!==r||t[10]!==Oe||t[11]!==Pe?(Fe=()=>{if(!r||!w||!Pe)return;let e=window.setInterval(()=>Oe(),2500);return()=>window.clearInterval(e)},t[8]=w,t[9]=r,t[10]=Oe,t[11]=Pe,t[12]=Fe):Fe=t[12];let Ie;t[13]!==w||t[14]!==r||t[15]!==Pe?(Ie=[r,w,Pe],t[13]=w,t[14]=r,t[15]=Pe,t[16]=Ie):Ie=t[16],(0,Q.useEffect)(Fe,Ie);let Le=M_({docName:de,workspace:be}),Re=Rh(pe,_e,me,ge,ve),ze=kh(L,new Set(Re.map(Sv))),Be=o?.config.projectPath??null,Ve=o?P.filter(e=>e.path!==Be):[],He;t[17]!==de||t[18]!==fe?(He=pv(fe,de),t[17]=de,t[18]=fe,t[19]=He):He=t[19];let Ue=He,We=m===``?[]:Uh(Re,m,8),Ge,Ke;t[20]!==a||t[21]!==r?(Ge=()=>{let e=function(e){Cc(e,`command-palette`)&&(e.preventDefault(),a(!r))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},Ke=[a,r],t[20]=a,t[21]=r,t[22]=Ge,t[23]=Ke):(Ge=t[22],Ke=t[23]),(0,Q.useEffect)(Ge,Ke);let Je,Ye;t[24]!==c||t[25]!==o||t[26]!==r||t[27]!==Se?(Je=()=>{if(r){if(z(Eh()),Se(),o){let e=!1;return dv(async()=>{let t=await o.project.listRecent();e||F(t)},c({id:`fYKgzG`})),()=>{e=!0}}return}f(``),J([]),Y(`idle`),ae.current=!1,ne([]),ie(`idle`),T(!1),le.current?.abort(),le.current=null,ue.current!==null&&(window.clearTimeout(ue.current),ue.current=null),O([]),A(null),M(`idle`)},Ye=[r,o,Se,c],t[24]=c,t[25]=o,t[26]=r,t[27]=Se,t[28]=Je,t[29]=Ye):(Je=t[28],Ye=t[29]),(0,Q.useEffect)(Je,Ye);let Xe;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=()=>{oe.current&&(oe.current.scrollTop=0)},t[30]=Xe):Xe=t[30];let Ze;t[31]===d?Ze=t[32]:(Ze=[d],t[31]=d,t[32]=Ze),(0,Q.useEffect)(Xe,Ze);let $e=new Set(q.map(xv)),et=w?{kind:`normal`,query:p}:Qh(p,$e),tt=et.kind!==`normal`,nt=tt||w,rt=et.kind===`tag-list`?et.query:``,it=et.kind===`tag-docs`?et.tagName:``,at=d.trim(),ot=w?Xh({query:at,firedQuery:k,status:j,resultCount:D.length}):null,st=ot?.submit?.query??``,ct=ot?.results.forQuery??``,lt,ut;t[33]!==tt||t[34]!==r?(lt=()=>{if(!r||!tt||ae.current)return;ae.current=!0,Y(`loading`);let e=!1;return eg().then(t=>{e||(J(t),Y(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tags failed`,t),J([]),Y(`error`))}),()=>{e=!0}},ut=[r,tt],t[33]=tt,t[34]=r,t[35]=lt,t[36]=ut):(lt=t[35],ut=t[36]),(0,Q.useEffect)(lt,ut);let dt=et.kind===`tag-docs`?et.tagName:null;(0,Q.useEffect)(()=>{if(!r||dt===null){ne([]),ie(`idle`);return}ie(`loading`),ne([]);let e=!1;return tg(dt).then(t=>{e||(ne(t),ie(`success`))}).catch(t=>{e||(console.error(`[command-palette-tag] fetch tag docs failed`,t),ne([]),ie(`error`))}),()=>{e=!0}},[r,dt]),(0,Q.useEffect)(()=>{if(!r||!m||nt||ye){_([]),y(`idle`),x(!1),C(!1);return}let e=!1,t=!1,n=0,i=null,a,o;y(`loading`);let s=()=>e||n>=uv?!1:(n+=1,o=window.setTimeout(l,lv),!0),c=()=>{e||t&&s()||(_([]),y(`error`),x(!1),C(!1))};function l(){let n=new AbortController;i=n,a=window.setTimeout(()=>{n.abort(),c()},cv),qh(m,{signal:n.signal}).then(n=>{let{entries:r,truncated:i,ready:o}=n;if(window.clearTimeout(a),!e){if(!o){t||(t=!0,_([]),x(!1),C(!0),y(`success`)),s()||C(!1);return}_(r),x(i),C(!1),y(`success`)}}).catch(t=>{window.clearTimeout(a),!e&&(t instanceof Error&&t.name===`AbortError`||c())})}return l(),()=>{e=!0,window.clearTimeout(a),window.clearTimeout(o),i?.abort()}},[r,m,nt,ye]);let ft;t[37]!==c||t[38]!==a?(ft=(e,t)=>{let n=t===void 0?c({id:`uuoHOU`}):t;a(!1),dv(async()=>{await e()},n)},t[37]=c,t[38]=a,t[39]=ft):ft=t[39];let pt=ft,mt;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(mt=function(e){let t={kind:e.kind,path:e.path,lastOpenedAt:new Date().toISOString()},n=Oh(Eh(),t);Dh(n),z(n)},t[40]=mt):mt=t[40];let gt=mt,_t;t[41]===a?_t=t[42]:(_t=function(e){a(!1),gt(e),fv(e.path)},t[41]=a,t[42]=_t);let vt=_t,bt=!nt&&m===``&&ze.length>0,St=vv({searchResults:g,fallbackSearchResults:We,searchStatus:v}),Ct=!nt&&St.length>0,wt=!nt&&m!==``&&(ye||S)&&!Ct,Tt=!nt&&m!==``&&v===`loading`&&!Ct&&!wt,Et;t[43]!==c||t[44]!==p||t[45]!==nt?(Et=!nt&&Jh(c({id:`HdkSiO`}),p,[`create file`]),t[43]=c,t[44]=p,t[45]=nt,t[46]=Et):Et=t[46];let Dt=Et,kt;t[47]!==c||t[48]!==p||t[49]!==nt?(kt=!nt&&Jh(c({id:`96G6Re`}),p,[`create folder`]),t[47]=c,t[48]=p,t[49]=nt,t[50]=kt):kt=t[50];let jt=kt,Mt;t[51]!==c||t[52]!==de||t[53]!==p||t[54]!==nt?(Mt=!nt&&de!==null&&Jh(c({id:`3Fcb0I`}),p,[`graph panel network`]),t[51]=c,t[52]=de,t[53]=p,t[54]=nt,t[55]=Mt):Mt=t[55];let Nt=Mt,Pt;t[56]!==c||t[57]!==p||t[58]!==nt?(Pt=!nt&&Jh(c({id:`fWi7pn`}),p,[`scaffold`,`seed`,`pack`,`starter`]),t[56]=c,t[57]=p,t[58]=nt,t[59]=Pt):Pt=t[59];let Ft=Pt,It;t[60]!==c||t[61]!==o||t[62]!==p||t[63]!==nt?(It=!nt&&o!==null&&Jh(c({id:`gKi-a_`}),p,[`create new project scaffold`]),t[60]=c,t[61]=o,t[62]=p,t[63]=nt,t[64]=It):It=t[64];let Lt=It,zt;t[65]!==c||t[66]!==o||t[67]!==p||t[68]!==nt?(zt=!nt&&o!==null&&Jh(c({id:`WPwDin`}),p,[`project`]),t[65]=c,t[66]=o,t[67]=p,t[68]=nt,t[69]=zt):zt=t[69];let Bt=zt,Vt;t[70]!==c||t[71]!==o||t[72]!==p||t[73]!==nt||t[74]!==l?(Vt=!nt&&!l&&o!==null&&Jh(c({id:`xaDWAI`}),p,[`switch project navigator projects`]),t[70]=c,t[71]=o,t[72]=p,t[73]=nt,t[74]=l,t[75]=Vt):Vt=t[75];let Ht=Vt,Ut;t[76]!==c||t[77]!==p||t[78]!==nt||t[79]!==l?(Ut=!nt&&!l&&Jh(c({id:`Tz0i8g`}),p,[`preferences config`]),t[76]=c,t[77]=p,t[78]=nt,t[79]=l,t[80]=Ut):Ut=t[80];let Wt=Ut,Gt;t[81]!==c||t[82]!==p||t[83]!==nt?(Gt=!1,t[81]=c,t[82]=p,t[83]=nt,t[84]=Gt):Gt=t[84];let Kt=Gt,qt=!nt&&o!==null&&Ve.length>0&&(m===``||Ve.some(e=>Jh(`${e.name} ${e.path}`,p,[`open recent project`]))),Jt=Kg(),Yt=!nt&&!Jt&&Le!==null&&(m===``||Yg.some(e=>{let t=e.displayName;return Jh(c({id:`WqLq6M`,values:{displayName:t}}),p,[e.id,`agent handoff`,`open in`])})),Xt=et.kind===`tag-list`?$h(q,et.query):[],Zt=et.kind===`tag-list`&&ee!==`loading`&&Xt.length===0,Qt=et.kind===`tag-docs`&&re===`success`&&X.length===0,$t=nt||bt||Ct||Tt||wt||Dt||jt||Nt||Ft||Lt||Bt||Ht||Wt||Kt||qt||Yt,en;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(en=function(e){f(`${Zh}${e}`)},t[85]=en):en=t[85];let tn=en,nn;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(nn=function(){le.current?.abort(),le.current=null,ue.current!==null&&(window.clearTimeout(ue.current),ue.current=null),O([]),A(null),M(`idle`)},t[86]=nn):nn=t[86];let rn=nn,an;t[87]===d?an=t[88]:(an=function(){T(!0),d.startsWith(`tag:`)&&f(d.slice(Zh.length)),rn(),ce.current?.focus()},t[87]=d,t[88]=an);let on=an,sn;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(sn=function(){T(!1),f(``),rn(),ce.current?.focus()},t[89]=sn):sn=t[89];let cn=sn,ln=function(e){let t=e.trim();if(!t||ye)return;le.current?.abort(),ue.current!==null&&window.clearTimeout(ue.current);let n=new AbortController;le.current=n,M(`loading`);let r=!1,i=window.setTimeout(()=>{r=!0,n.abort(),M(`error`)},cv);ue.current=i,qh(t,{signal:n.signal,semantic:!0,limit:30}).then(e=>{let{entries:r}=e;un(i,n),O(r),A(t),M(`success`)}).catch(e=>{un(i,n),!(e instanceof Error&&e.name===`AbortError`&&!r)&&(console.debug(`[semantic-search] fire failed`,{timedOut:r,error:e}),M(`error`))})};function un(e,t){window.clearTimeout(e),ue.current===e&&(ue.current=null),le.current===t&&(le.current=null)}let dn=function(e){!w||e.key!==`Enter`||(ot?.submit?(e.preventDefault(),e.stopPropagation(),ln(ot.submit.query)):j===`loading`&&(e.preventDefault(),e.stopPropagation()))},fn;t[90]===w?fn=t[91]:(fn=function(e){w&&(e.preventDefault(),cn())},t[90]=w,t[91]=fn);let pn=fn,mn;t[92]===c?mn=t[93]:(mn=c({id:`1bDVu5`}),t[92]=c,t[93]=mn);let hn;t[94]===c?hn=t[95]:(hn=c({id:`5GRxoA`}),t[94]=c,t[95]=hn);let gn;t[96]===Symbol.for(`react.memo_cache_sentinel`)?(gn={shouldFilter:!1,className:`[&_[cmdk-input-wrapper]_svg]:h-4 [&_[cmdk-input-wrapper]_svg]:w-4 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4`},t[96]=gn):gn=t[96];let _n;t[97]!==c||t[98]!==w?(_n=c(w?{id:`zXj1rA`}:{id:`ggs9f8`}),t[97]=c,t[98]=w,t[99]=_n):_n=t[99];let vn;t[100]!==w||t[101]!==tt?(vn=()=>{w&&(T(!1),rn()),f(tt?``:Zh),ce.current?.focus()},t[100]=w,t[101]=tt,t[102]=vn):vn=t[102];let yn=tt?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`,bn;t[103]===yn?bn=t[104]:(bn=Oi(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,yn),t[103]=yn,t[104]=bn);let xn,Sn;t[105]===Symbol.for(`react.memo_cache_sentinel`)?(xn=(0,Z.jsx)(Rt,{className:`size-3.5`}),Sn=(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`0rwwOn`})}),t[105]=xn,t[106]=Sn):(xn=t[105],Sn=t[106]);let Cn;t[107]!==tt||t[108]!==vn||t[109]!==bn?(Cn=(0,Z.jsxs)(`button`,{type:`button`,onClick:vn,"data-testid":`command-palette-filter-tag`,"data-active":tt,"aria-pressed":tt,className:bn,children:[xn,Sn]}),t[107]=tt,t[108]=vn,t[109]=bn,t[110]=Cn):Cn=t[110];let wn;t[111]!==on||t[112]!==w||t[113]!==Ae?(wn=Ae?(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>w?cn():on(),"data-testid":`command-palette-filter-semantic`,"data-active":w,"aria-pressed":w,className:Oi(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium transition-colors`,w?`border-primary/30 bg-primary/10 text-primary`:`border-border bg-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground`),children:[(0,Z.jsx)(Vi,{className:`size-3.5`}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`9tJX8r`})})]}):null,t[111]=on,t[112]=w,t[113]=Ae,t[114]=wn):wn=t[114];let Tn;t[115]!==Cn||t[116]!==wn?(Tn=(0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-1.5 border-b px-3 py-2`,children:[Cn,wn]}),t[115]=Cn,t[116]=wn,t[117]=Tn):Tn=t[117];let En=w&&ot?(0,Z.jsxs)(Z.Fragment,{children:[Pe?(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-muted-foreground text-xs`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-indexing`,children:[(0,Z.jsx)(Te,{className:`size-3.5 animate-spin`}),(0,Z.jsx)(s,{id:`kCNU4q`,values:{semanticIndexedCount:je,semanticTotalCount:Ne}})]}):null,ot.submit?(0,Z.jsx)(Ee,{children:(0,Z.jsx)(se,{value:`semantic-submit`,onSelect:()=>ln(st),"data-testid":`command-palette-semantic-submit`,children:ot.submit.kind===`retry`?(0,Z.jsxs)(`span`,{className:`flex items-center gap-2 text-amber-700 dark:text-amber-400`,children:[(0,Z.jsx)(Vi,{}),(0,Z.jsx)(s,{id:`rBc32v`})]}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(Vi,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:(0,Z.jsx)(s,{id:`FNTx6u`,values:{semanticSubmitQuery:st}})}),(0,Z.jsx)(qe,{children:`↵`})]})})}):null,ot.notice===`empty`?(0,Z.jsx)(ke,{"data-testid":`command-palette-semantic-empty`,children:(0,Z.jsx)(s,{id:`Xw_maT`})}):null,ot.notice===`searching`?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-semantic-searching`,children:[(0,Z.jsx)(Te,{className:`size-4 animate-spin`}),(0,Z.jsx)(s,{id:`PBwmDJ`})]}):null,ot.notice===`no-results`?(0,Z.jsx)(ke,{"data-testid":`command-palette-semantic-no-results`,children:(0,Z.jsx)(s,{id:`yFyZMJ`,values:{semanticQueryText:at}})}):null,ot.results.show?(0,Z.jsx)(Ee,{heading:ot.results.dimmed?c({id:`QlxHAH`,values:{semanticResultsLabel:ct}}):c({id:`9tJX8r`}),children:(0,Z.jsx)(`div`,{"data-testid":`command-palette-semantic-results`,"data-dimmed":ot.results.dimmed,children:D.map(e=>(0,Z.jsx)(mv,{entry:e,disabled:ot.results.dimmed,onSelect:()=>vt(e)},Th(e.kind,e.path)))})}):null]}):null,Dn;t[118]===wt?Dn=t[119]:(Dn=wt?(0,Z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 py-6 text-muted-foreground text-sm`,role:`status`,"aria-live":`polite`,"data-testid":`command-palette-search-preparing`,children:[(0,Z.jsx)(Te,{className:`size-4 animate-spin`}),(0,Z.jsx)(s,{id:`yIPXut`})]}):null,t[118]=wt,t[119]=Dn);let On;t[120]!==Ct||t[121]!==Tt?(On=Tt&&!Ct?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`WRNXKp`})}):null,t[120]=Ct,t[121]=Tt,t[122]=On):On=t[122];let kn=$t?null:(0,Z.jsx)(ke,{children:v===`error`?(0,Z.jsx)(s,{id:`pkAft1`}):(0,Z.jsx)(s,{id:`i3f2kh`})}),An=et.kind===`tag-list`?(0,Z.jsxs)(Ee,{heading:et.query?c({id:`evs0iw`,values:{tagListQuery:rt}}):c({id:`2QM24L`}),children:[ee===`loading`?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`a_u4ck`})}):null,ee===`error`?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`MZoxVx`})}):null,Zt?(0,Z.jsx)(ke,{children:et.query?c({id:`X0ttSN`,values:{tagListQuery:rt}}):c({id:`JLUTgi`})}):null,Xt.map(e=>(0,Z.jsxs)(se,{value:`tag ${e.name}`,onSelect:()=>tn(e.name),"data-testid":`command-palette-tag-${e.name}`,children:[(0,Z.jsx)(Rt,{}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.name}),(0,Z.jsx)(`span`,{className:`ml-auto shrink-0 text-[11px] text-muted-foreground tabular-nums`,children:(0,Z.jsx)(s,{id:`fVcm9t`,values:{0:e.count}})})]},`tag:${e.name}`))]}):null,jn=et.kind===`tag-docs`?(0,Z.jsxs)(Ee,{heading:c({id:`hGmuTc`,values:{tagDocsName:it}}),children:[re===`loading`?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`pWbsW6`})}):null,re===`error`?(0,Z.jsx)(ke,{children:(0,Z.jsx)(s,{id:`48uGTI`})}):null,Qt?(0,Z.jsx)(ke,{children:c({id:`NIWAux`,values:{tagDocsName:it}})}):null,X.map(e=>{let t=e.title||e.docName.split(`/`).pop()||e.docName,n=e.matchingTags.filter(e=>e!==et.tagName).map(bv).join(`, `);return(0,Z.jsxs)(se,{value:`tag-doc ${e.docName}`,onSelect:()=>{a(!1),fv(e.docName)},"data-testid":`command-palette-tag-doc-${e.docName}`,className:`items-start`,children:[(0,Z.jsx)(Qe,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:t}),(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-xs`,children:e.docName}),e.matchingTags.length>0&&e.matchingTags.some(e=>e!==et.tagName)?(0,Z.jsx)(`span`,{className:`truncate text-muted-foreground text-[11px]`,children:(0,Z.jsx)(s,{id:`CvsD6Y`,values:{viaTags:n}})}):null]})]},`tag-doc:${e.docName}`)})]}):null,Mn=bt?(0,Z.jsx)(Ee,{heading:c({id:`MmDDWK`}),children:ze.map(e=>(0,Z.jsx)(mv,{entry:e,onSelect:()=>vt(e)},Th(e.kind,e.path)))}):null,Nn;t[123]!==c||t[124]!==de||t[125]!==a||t[126]!==V||t[127]!==U||t[128]!==Dt||t[129]!==jt||t[130]!==Nt||t[131]!==Ft?(Nn=Dt||jt||Nt||Ft?(0,Z.jsxs)(Ee,{heading:c({id:`45MZFs`}),children:[Dt?(0,Z.jsxs)(se,{value:`new file create file`,onSelect:()=>{a(!1),V(`file`)},"data-testid":`command-palette-new-file`,children:[(0,Z.jsx)(Ot,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`HdkSiO`})})]}):null,jt?(0,Z.jsxs)(se,{value:`new folder create folder`,onSelect:()=>{a(!1),V(`folder`)},"data-testid":`command-palette-new-folder`,children:[(0,Z.jsx)($l,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`96G6Re`})})]}):null,Nt?(0,Z.jsxs)(se,{value:`open graph graph panel network`,onSelect:()=>{de&&(a(!1),ag(`graph`))},"data-testid":`command-palette-open-graph`,children:[(0,Z.jsx)(pu,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`3Fcb0I`})})]}):null,Ft?(0,Z.jsxs)(se,{value:`initialize starter pack scaffold seed`,onSelect:()=>{a(!1),U(!0)},"data-testid":`command-palette-initialize-starter-pack`,children:[(0,Z.jsx)(hu,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`fWi7pn`})})]}):null]}):null,t[123]=c,t[124]=de,t[125]=a,t[126]=V,t[127]=U,t[128]=Dt,t[129]=jt,t[130]=Nt,t[131]=Ft,t[132]=Nn):Nn=t[132];let Pn=Yt?(0,Z.jsx)(Ee,{heading:c({id:`O7_W_a`}),children:Yg.filter(e=>{let t=e.displayName;return Jh(c({id:`WqLq6M`,values:{displayName:t}}),p,[e.id,`agent handoff`,`open in`])}).map(e=>{let t=xe[e.id],n=t.installed===!0&&Le!==null,r=e.displayName,i=t.installed===null?c({id:`IA6JW2`}):t.installed===!1?c({id:`5SwVv1`}):null,o=c(i?{id:`1ZpfyB`,values:{displayName:r,hint:i}}:{id:`WqLq6M`,values:{displayName:r}});return(0,Z.jsxs)(se,{value:`send to ai ${e.displayName} ${e.id} agent open in`,disabled:!n,onSelect:()=>{!n||!Le||(a(!1),Ce(e.id,Le))},"data-testid":`command-palette-open-in-${e.id}`,"aria-label":o,children:[(0,Z.jsx)(`span`,{className:`flex-1`,children:(0,Z.jsx)(s,{id:`WqLq6M`,values:{displayName:r}})}),i?(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`ml-auto text-muted-foreground text-xs`,children:i}):null]},e.id)})}):null,Fn;t[133]!==c||t[134]!==o||t[135]!==a||t[136]!==pt||t[137]!==G||t[138]!==Lt||t[139]!==Kt||t[140]!==Bt||t[141]!==Ht||t[142]!==Wt?(Fn=Lt||Bt||Ht||Wt||Kt?(0,Z.jsxs)(Ee,{heading:c({id:`e0NrBM`}),children:[Lt&&o?(0,Z.jsxs)(se,{value:`new project create scaffold`,onSelect:()=>{a(!1),G(!0)},"data-testid":`command-palette-new-project`,children:[(0,Z.jsx)(At,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`gKi-a_`})})]}):null,Bt&&o?(0,Z.jsxs)(se,{value:`open folder on disk project`,onSelect:()=>pt(async()=>{let e=await o.dialog.openFolder();e&&await o.project.open({path:e,target:`new-window`,entryPoint:`pick-existing`})}),"data-testid":`command-palette-open-folder`,children:[(0,Z.jsx)(ht,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`WPwDin`})}),(0,Z.jsx)(qe,{children:Sc(`open-folder`)})]}):null,Ht&&o?(0,Z.jsxs)(se,{value:`switch-project navigator projects`,onSelect:()=>pt(()=>o.navigator.open(),c({id:`jol95m`})),"data-testid":`command-palette-switch-project`,children:[(0,Z.jsx)(xt,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`xaDWAI`})}),(0,Z.jsx)(qe,{children:Sc(`switch-project`)})]}):null,Wt?(0,Z.jsxs)(se,{value:`settings preferences config`,onSelect:()=>{a(!1),window.location.hash!==`#settings`&&(window.location.hash=t_)},"data-testid":`command-palette-settings`,children:[(0,Z.jsx)(Du,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`Tz0i8g`})}),(0,Z.jsx)(qe,{children:Sc(`settings`)})]}):null,Kt?(0,Z.jsxs)(se,{value:`install claude desktop cowork app`,onSelect:()=>{a(!1),window.location.hash=`#install-claude-desktop`},"data-testid":`command-palette-install-claude-desktop`,children:[(0,Z.jsx)(Co,{}),(0,Z.jsx)(`span`,{children:(0,Z.jsx)(s,{id:`62Pc08`})})]}):null]}):null,t[133]=c,t[134]=o,t[135]=a,t[136]=pt,t[137]=G,t[138]=Lt,t[139]=Kt,t[140]=Bt,t[141]=Ht,t[142]=Wt,t[143]=Fn):Fn=t[143];let In=qt&&o?(0,Z.jsx)(Ee,{heading:c({id:`3iyGWF`}),children:Ve.filter(e=>Jh(`${e.name} ${e.path}`,p,[`open recent project`])).slice(0,10).map(e=>(0,Z.jsxs)(se,{value:`${e.name} ${e.path} recent project`,disabled:e.missing,onSelect:()=>pt(()=>o.project.open({path:e.path,target:`new-window`,entryPoint:`recents`}),c({id:`SUOoXn`})),"data-testid":`command-palette-recent-${e.path}`,className:`items-start`,children:[(0,Z.jsx)(he,{className:`mt-0.5`}),(0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Z.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),(0,Z.jsxs)(`span`,{className:`truncate text-muted-foreground text-xs`,children:[e.path,e.missing?(0,Z.jsxs)(Z.Fragment,{children:[` `,(0,Z.jsx)(s,{id:`ls1N1w`})]}):null]})]})]},e.path))}):null,Ln=Ct?(0,Z.jsx)(Ee,{heading:c({id:`A1taO8`}),children:St.map(e=>(0,Z.jsx)(mv,{entry:e,query:m,onSelect:()=>vt(e)},Th(e.kind,e.path)))}):null,Rn;t[144]!==En||t[145]!==Dn||t[146]!==On||t[147]!==kn||t[148]!==An||t[149]!==jn||t[150]!==Mn||t[151]!==Nn||t[152]!==Pn||t[153]!==Fn||t[154]!==In||t[155]!==Ln?(Rn=(0,Z.jsxs)(u,{ref:oe,className:`subtle-scrollbar`,children:[En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln]}),t[144]=En,t[145]=Dn,t[146]=On,t[147]=kn,t[148]=An,t[149]=jn,t[150]=Mn,t[151]=Nn,t[152]=Pn,t[153]=Fn,t[154]=In,t[155]=Ln,t[156]=Rn):Rn=t[156];let zn=hv,Bn=Yh(m,St,{truncated:b}),Vn;t[157]!==zn||t[158]!==nt||t[159]!==et.kind||t[160]!==Bn?(Vn=(0,Z.jsx)(zn,{mode:Bn,inExclusiveMode:nt,paletteModeKind:et.kind}),t[157]=zn,t[158]=nt,t[159]=et.kind,t[160]=Bn,t[161]=Vn):Vn=t[161];let Hn=B===`file`,Un;t[162]===V?Un=t[163]:(Un=e=>{e||V(null)},t[162]=V,t[163]=Un);let Wn;t[164]!==Ue||t[165]!==Hn||t[166]!==Un?(Wn=(0,Z.jsx)(_g,{open:Hn,onOpenChange:Un,kind:`file`,initialDir:Ue}),t[164]=Ue,t[165]=Hn,t[166]=Un,t[167]=Wn):Wn=t[167];let Gn=B===`folder`,Kn;t[168]===V?Kn=t[169]:(Kn=e=>{e||V(null)},t[168]=V,t[169]=Kn);let qn;t[170]!==Ue||t[171]!==Gn||t[172]!==Kn?(qn=(0,Z.jsx)(_g,{open:Gn,onOpenChange:Kn,kind:`folder`,initialDir:Ue}),t[170]=Ue,t[171]=Gn,t[172]=Kn,t[173]=qn):qn=t[173];let Jn;t[174]!==H||t[175]!==U?(Jn=(0,Z.jsx)(Vg,{open:H,onOpenChange:U}),t[174]=H,t[175]=U,t[176]=Jn):Jn=t[176];let Yn;return t[177]!==o||t[178]!==W||t[179]!==G?(Yn=o?(0,Z.jsx)(Kf,{open:W,onOpenChange:G,bridge:o}):null,t[177]=o,t[178]=W,t[179]=G,t[180]=Yn):Yn=t[180],(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(R,{open:r,onOpenChange:a,title:mn,description:hn,className:`sm:max-w-2xl`,commandProps:gn,onEscapeKeyDown:pn,children:[(0,Z.jsx)(Me,{ref:ce,value:d,onValueChange:f,onKeyDown:dn,placeholder:_n}),Tn,Rn,Vn]}),Wn,qn,Jn,Yn]})}function bv(e){return`#${e}`}function xv(e){return e.name}function Sv(e){return Th(e.kind,e.path)}var Cv=500;function wv(e,t,n){return t?`terminal`:e===null&&n?`retrying`:`hidden`}function Tv(e){return e?.kind===`null-collab`}function Ev(e){if(e===null)return Is._({id:`Ua78MH`});if(e.kind===`null-collab`)return Is._({id:`TJnkyf`});if(e.code===`network`)return Is._({id:`aoa6xA`});if(e.code===`invalid-body`)return Is._({id:`FRYB1Q`});let t=e.code;return Is._({id:`4nj6n8`,values:{code:t}})}function Dv(){let e=(0,$.c)(18),{collabUrl:t,collabTerminal:n,collabLastError:r,retryCollab:i}=yt(),[a,o]=(0,Q.useState)(!1),c,l;e[0]!==n||e[1]!==t?(c=()=>{if(t!==null||n){o(!1);return}let e=setTimeout(()=>o(!0),Cv);return()=>clearTimeout(e)},l=[t,n],e[0]=n,e[1]=t,e[2]=c,e[3]=l):(c=e[2],l=e[3]),(0,Q.useEffect)(c,l);let u=wv(t,n,a);if(u===`hidden`)return null;if(u===`terminal`){let t;e[4]===r?t=e[5]:(t=Tv(r),e[4]=r,e[5]=t);let n=t,a;e[6]===r?a=e[7]:(a=Ev(r),e[6]=r,e[7]=a);let o=a,c;e[8]!==o||e[9]!==n?(c=(0,Z.jsx)(`span`,{children:n?(0,Z.jsx)(s,{id:`AAlr5Y`,components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}}):(0,Z.jsx)(s,{id:`noH1JX`,values:{errorDetail:o},components:{0:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`}),1:(0,Z.jsx)(`code`,{className:`bg-red-100/60 px-1 rounded`})}})}),e[8]=o,e[9]=n,e[10]=c):c=e[10];let l;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Z.jsx)(s,{id:`6gRgw8`}),e[11]=l):l=e[11];let u;e[12]===i?u=e[13]:(u=(0,Z.jsx)(`button`,{type:`button`,onClick:i,className:`bg-red-950 text-red-50 px-2 py-0.5 rounded text-xs font-medium hover:bg-red-900`,children:l}),e[12]=i,e[13]=u);let d;return e[14]!==c||e[15]!==u?(d=(0,Z.jsxs)(`div`,{role:`alert`,"aria-live":`assertive`,className:`fixed top-0 inset-x-0 z-50 bg-red-500/95 text-red-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md flex items-center justify-center gap-3 flex-wrap`,children:[c,u]}),e[14]=c,e[15]=u,e[16]=d):d=e[16],d}let d;return e[17]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`fixed top-0 inset-x-0 z-50 bg-amber-500/95 text-amber-950 text-sm text-center py-2 px-4 pl-[var(--ok-titlebar-reserve-left,1rem)] shadow-md`,children:(0,Z.jsx)(s,{id:`UYcGIW`})}),e[17]=d):d=e[17],d}function Ov(e){let t=(0,$.c)(6),{bridge:n}=e,[r,i]=(0,Q.useState)(!1),a,o;t[0]===n?(a=t[1],o=t[2]):(a=()=>n.onMenuAction(e=>{e===`new-project`&&i(!0)}),o=[n],t[0]=n,t[1]=a,t[2]=o),(0,Q.useEffect)(a,o);let s;return t[3]!==n||t[4]!==r?(s=(0,Z.jsx)(Kf,{open:r,onOpenChange:i,bridge:n}),t[3]=n,t[4]=r,t[5]=s):s=t[5],s}async function kv(e){let t=await fetch(`/api/tags/${encodeURIComponent(e)}`);if(!t.ok){let e=await t.json().catch(()=>null),n=t.status,r=t.statusText;throw Error(hs(e)??Is._({id:`lHwYMr`,values:{status:n,statusText:r}}))}return(await t.json()).docs??[]}function Av(){let e=(0,$.c)(18),[t,n]=(0,Q.useState)(!1),[r,i]=(0,Q.useState)(null),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={kind:`idle`},e[0]=a):a=e[0];let[o,c]=(0,Q.useState)(a),l=(0,Q.useRef)(0),u,d;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{let e=function(e){let t=e.detail;if(!t||typeof t.value!=`string`)return;let r=l.current+=1;i(t.value),n(!0),c({kind:`loading`}),kv(t.value).then(e=>{l.current===r&&c({kind:`ready`,docs:e})}).catch(e=>{l.current===r&&c({kind:`error`,message:e instanceof Error?e.message:String(e)})})};return document.addEventListener(et,e),()=>document.removeEventListener(et,e)},d=[],e[1]=u,e[2]=d):(u=e[1],d=e[2]),(0,Q.useEffect)(u,d);let f;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(f=function(e){n(!1),window.location.assign(ls(e))},e[3]=f):f=e[3];let p=f,m=r??``,h;e[4]===m?h=e[5]:(h={tagName:m},e[4]=m,e[5]=h);let g;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(g={0:(0,Z.jsx)(`span`,{className:`font-mono`})},e[6]=g):g=e[6];let _;e[7]===h?_=e[8]:(_=(0,Z.jsx)(Yo,{children:(0,Z.jsx)(Go,{children:(0,Z.jsx)(s,{id:`7H4UHD`,values:h,components:g})})}),e[7]=h,e[8]=_);let v=r??``,y;e[9]!==o||e[10]!==v?(y=(0,Z.jsx)(qo,{children:(0,Z.jsx)(jv,{fetchState:o,tag:v,onSelectDoc:p})}),e[9]=o,e[10]=v,e[11]=y):y=e[11];let b;e[12]!==_||e[13]!==y?(b=(0,Z.jsxs)(Ko,{children:[_,y]}),e[12]=_,e[13]=y,e[14]=b):b=e[14];let x;return e[15]!==t||e[16]!==b?(x=(0,Z.jsx)(Xo,{open:t,onOpenChange:n,children:b}),e[15]=t,e[16]=b,e[17]=x):x=e[17],x}function jv(e){let t=(0,$.c)(15),{fetchState:n,tag:r,onSelectDoc:i}=e;if(n.kind===`idle`||n.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-loading`,children:(0,Z.jsx)(s,{id:`yQE2r9`})}),t[0]=e):e=t[0],e}if(n.kind===`error`){let e;return t[1]===n.message?e=t[2]:(e=(0,Z.jsx)(`p`,{className:`text-destructive text-sm`,"data-testid":`tag-dialog-error`,children:n.message}),t[1]=n.message,t[2]=e),e}if(n.docs.length===0){let e;t[3]===r?e=t[4]:(e={tag:r},t[3]=r,t[4]=e);let n;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n={0:(0,Z.jsx)(`span`,{className:`font-mono`})},t[5]=n):n=t[5];let i;return t[6]===e?i=t[7]:(i=(0,Z.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`tag-dialog-empty`,children:(0,Z.jsx)(s,{id:`lAiyU_`,values:e,components:n})}),t[6]=e,t[7]=i),i}let a;if(t[8]!==n.docs||t[9]!==i){let e;t[11]===i?e=t[12]:(e=e=>{let t=e.matchingTags??[];return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(`button`,{type:`button`,className:`w-full rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring`,onClick:()=>i(e.docName),"data-testid":`tag-dialog-row`,children:[(0,Z.jsx)(`span`,{className:`block truncate font-medium`,children:e.title}),e.docName===e.title?null:(0,Z.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:e.docName}),t.length>0?(0,Z.jsx)(`span`,{className:`mt-1 flex flex-wrap items-center gap-1`,"data-testid":`tag-dialog-row-matches`,children:t.map(Mv)}):null]})},e.docName)},t[11]=i,t[12]=e),a=n.docs.map(e),t[8]=n.docs,t[9]=i,t[10]=a}else a=t[10];let o;return t[13]===a?o=t[14]:(o=(0,Z.jsx)(`ul`,{className:`flex flex-col gap-1`,"data-testid":`tag-dialog-list`,children:a}),t[13]=a,t[14]=o),o}function Mv(e){return(0,Z.jsxs)(`span`,{"data-testid":`tag-dialog-row-match`,"data-tag":e,className:`tag pointer-events-none text-xs`,children:[`#`,e]},e)}var Nv=`raw-mdx-nav`,Pv=`ok-editor-mode-v1`,Fv=[`wysiwyg`,`source`],Iv=`wysiwyg`;function Lv(e){return Fv.includes(e)}function Rv(e=localStorage){try{let t=e.getItem(Pv);if(t===null)return Iv;if(Lv(t))return t;console.warn(`[editor-mode] invalid persisted value, falling back to default`,{raw:t})}catch{}return Iv}function zv(e=window,t=localStorage){let n=e.__OK_EDITOR_MODE__;return Lv(n)?n:Rv(t)}function Bv(e,t=localStorage){try{return t.setItem(Pv,e),!0}catch(e){return console.warn(`[editor-mode] persist failed`,e),!1}}function Vv(){let e=(0,$.c)(3),[t,n]=(0,Q.useState)(zv),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=function(e){n(e),Bv(e)},e[0]=r):r=e[0];let i=r,a;return e[1]===t?a=e[2]:(a=[t,i],e[1]=t,e[2]=a),a}function Hv(e){let t=(0,$.c)(4),{_:n}=i(),r=(0,Q.useRef)(!1),a,o;t[0]!==n||t[1]!==e?(a=()=>{e===`no-push-permission`&&!r.current&&(r.current=!0,Ls.info(n({id:`JkCD2u`})))},o=[e,n],t[0]=n,t[1]=e,t[2]=a,t[3]=o):(a=t[2],o=t[3]),(0,Q.useEffect)(a,o)}function Uv(e){let t=(0,$.c)(25),{open:n,onResolved:r}=e,{_:a}=i(),o=no(),c;t[0]!==a||t[1]!==r||t[2]!==o?(c=function(e){if(o===null){Ls.error(a({id:`fiMNLl`}));return}let t=o(e);if(!t.ok){let n=t.error;Ls.error(a(e?{id:`FUMerq`,values:{detail:n}}:{id:`0t0bbC`,values:{detail:n}}));return}r()},t[0]=a,t[1]=r,t[2]=o,t[3]=c):c=t[3];let l=c,u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(Yo,{children:(0,Z.jsx)(Ka,{})}),t[4]=u):u=t[4];let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Z.jsx)(Ao,{}),t[5]=d):d=t[5];let f;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Z.jsxs)(qo,{children:[d,(0,Z.jsx)(`p`,{className:`mt-3 text-1sm text-muted-foreground`,children:(0,Z.jsx)(s,{id:`ZLQol-`,components:{0:(0,Z.jsx)(`span`,{className:`font-medium`})}})})]}),t[6]=f):f=t[6];let p;t[7]===l?p=t[8]:(p=()=>l(!1),t[7]=l,t[8]=p);let m=o===null,h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(s,{id:`IKoTAC`}),t[9]=h):h=t[9];let g;t[10]!==p||t[11]!==m?(g=(0,Z.jsx)(Ai,{variant:`outline`,className:`uppercase font-mono`,onClick:p,disabled:m,children:h}),t[10]=p,t[11]=m,t[12]=g):g=t[12];let _;t[13]===l?_=t[14]:(_=()=>l(!0),t[13]=l,t[14]=_);let v=o===null,y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(s,{id:`XU0OXn`}),t[15]=y):y=t[15];let b;t[16]!==v||t[17]!==_?(b=(0,Z.jsx)(Ai,{onClick:_,disabled:v,children:y}),t[16]=v,t[17]=_,t[18]=b):b=t[18];let x;t[19]!==b||t[20]!==g?(x=(0,Z.jsxs)(Ko,{className:`sm:max-w-lg`,showCloseButton:!1,children:[u,f,(0,Z.jsxs)(Jo,{children:[g,b]})]}),t[19]=b,t[20]=g,t[21]=x):x=t[21];let S;return t[22]!==n||t[23]!==x?(S=(0,Z.jsx)(Xo,{open:n,onOpenChange:Wv,children:x}),t[22]=n,t[23]=x,t[24]=S):S=t[24],S}function Wv(){}function Gv(e){return!e.autoSyncOnboardingDismissed&&e.hasRemote===!0&&e.projectLocalSynced===!0&&e.projectSynced===!0&&e.projectLocalConfig!==null&&e.projectLocalConfig.autoSync?.enabled===null&&(e.projectConfig?.autoSync?.default??null)===null&&(e.pushPermissionCheckStatus===`allowed`||e.pushPermissionCheckStatus===`unknown`)}var Kv=5;async function qv(e){let t=await fetch(`/api/backlinks?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=Or.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new qt(Is._({id:`XopE_I`,values:{status:r}}),{status:r})}let r=Nr.safeParse(n);if(!r.success)throw new qt(Is._({id:`lZAiSP`}),{status:t.status});return r.data.backlinks}async function Jv(e){let t=await fetch(`/api/forward-links?docName=${encodeURIComponent(e)}`),n=await t.json().catch(()=>null);if(!t.ok){let e=Or.safeParse(n),r=t.status;throw e.success?Error(e.data.title):new qt(Is._({id:`GemPfn`,values:{status:r}}),{status:r})}let r=wi.safeParse(n);if(!r.success)throw new qt(Is._({id:`2YZwPB`}),{status:t.status});return r.data.forwardLinks}function Yv(e){let t=e.split(`/`);return t.length<=2?e:`…/${t.slice(-2).join(`/`)}`}function Xv(e){window.location.hash=ls(e)}function Zv(e){let t=(0,$.c)(9),{title:n,count:r,isLoading:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,Z.jsx)($t,{className:`size-3.5 text-muted-foreground transition-transform group-data-[state=closed]:-rotate-90`}),t[0]=a):a=t[0];let o;t[1]===n?o=t[2]:(o=(0,Z.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[a,(0,Z.jsx)(Mn,{children:n})]}),t[1]=n,t[2]=o);let s;t[3]!==r||t[4]!==i?(s=!i&&(0,Z.jsx)(jn,{children:r}),t[3]=r,t[4]=i,t[5]=s):s=t[5];let c;return t[6]!==o||t[7]!==s?(c=(0,Z.jsxs)(ns,{className:`group flex w-full cursor-pointer items-center justify-between px-5 py-3 text-left transition-colors hover:bg-muted/40`,children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8],c}function Qv(e){let t=(0,$.c)(10),{total:n,expanded:r,onToggle:i}=e;if(n<=Kv)return null;let a=n-Kv,o;t[0]===r?o=t[1]:(o=r?(0,Z.jsx)($t,{className:`size-3`}):(0,Z.jsx)(ts,{className:`size-3`}),t[0]=r,t[1]=o);let c;t[2]!==r||t[3]!==a?(c=r?(0,Z.jsx)(s,{id:`6fGjTz`}):(0,Z.jsx)(s,{id:`ZptNUh`,values:{hidden:a}}),t[2]=r,t[3]=a,t[4]=c):c=t[4];let l;return t[5]!==r||t[6]!==i||t[7]!==o||t[8]!==c?(l=(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":r,className:`mt-2 inline-flex cursor-pointer items-center gap-1 px-3 text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:i,children:[o,c]}),t[5]=r,t[6]=i,t[7]=o,t[8]=c,t[9]=l):l=t[9],l}function $v(e){let t=(0,$.c)(35),{icon:n,iconColorClass:r,rowTooltip:i,title:a,path:o,anchor:c,snippet:l,titleHover:u,ariaLabel:d,href:f,external:p,disabled:m,onClick:h}=e,g=o!==void 0&&o!==a,_=r??`text-muted-foreground`,v;t[0]===_?v=t[1]:(v=Oi(`mt-0.5 shrink-0`,_),t[0]=_,t[1]=v);let y;t[2]!==n||t[3]!==v?(y=(0,Z.jsx)(`span`,{className:v,children:n}),t[2]=n,t[3]=v,t[4]=y):y=t[4];let b=y,x;t[5]!==d||t[6]!==m||t[7]!==p||t[8]!==f||t[9]!==h||t[10]!==a||t[11]!==u?(x=f?(0,Z.jsxs)(`a`,{href:f,target:p?`_blank`:void 0,rel:p?`noopener noreferrer`:void 0,"aria-label":d,title:u,onClick:h,className:`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,children:[a,p?(0,Z.jsxs)(`span`,{className:`sr-only`,children:[` `,(0,Z.jsx)(s,{id:`dbtjJh`})]}):null]}):(0,Z.jsx)(`button`,{type:`button`,"aria-label":d,title:u,disabled:m,onClick:h,className:Oi(`block w-full truncate text-left font-medium text-foreground no-underline outline-none after:absolute after:inset-0 after:rounded-md focus-visible:after:ring-2 focus-visible:after:ring-ring`,`cursor-pointer bg-transparent p-0 disabled:cursor-not-allowed disabled:opacity-60`),children:a}),t[5]=d,t[6]=m,t[7]=p,t[8]=f,t[9]=h,t[10]=a,t[11]=u,t[12]=x):x=t[12];let S=x,C;t[13]===b?C=t[14]:(C=(0,Z.jsx)(`div`,{className:`mt-px flex items-center`,children:b}),t[13]=b,t[14]=C);let w;t[15]!==c||t[16]!==o||t[17]!==g?(w=g?(0,Z.jsxs)(`div`,{className:`truncate font-mono text-xs text-muted-foreground`,children:[o,c?(0,Z.jsxs)(`span`,{className:`ml-1`,children:[`· #`,c]}):null]}):null,t[15]=c,t[16]=o,t[17]=g,t[18]=w):w=t[18];let T;t[19]===l?T=t[20]:(T=l?(0,Z.jsx)(`p`,{className:`line-clamp-2 text-muted-foreground`,children:l}):null,t[19]=l,t[20]=T);let E;t[21]!==S||t[22]!==w||t[23]!==T?(E=(0,Z.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5 text-1sm`,children:[S,w,T]}),t[21]=S,t[22]=w,t[23]=T,t[24]=E):E=t[24];let D;t[25]!==C||t[26]!==E?(D=(0,Z.jsxs)(`div`,{className:`group relative flex items-start gap-2.5 rounded-md px-3 py-2.5 transition-colors hover:bg-muted/80`,children:[C,E]}),t[25]=C,t[26]=E,t[27]=D):D=t[27];let O=D;if(i){let e;t[28]===O?e=t[29]:(e=(0,Z.jsx)($s,{asChild:!0,children:O}),t[28]=O,t[29]=e);let n;t[30]===i?n=t[31]:(n=(0,Z.jsx)(tc,{side:`top`,children:i}),t[30]=i,t[31]=n);let r;return t[32]!==e||t[33]!==n?(r=(0,Z.jsxs)(ic,{children:[e,n]}),t[32]=e,t[33]=n,t[34]=r):r=t[34],r}return O}function ey(e){let t=(0,$.c)(39),{docName:n}=e,{_:r}=i(),{folderPaths:a,pages:o,pagesBySlug:c,pagesByBasename:l,loading:u}=Ts(),d,f;t[0]===n?(d=t[1],f=t[2]):(d=[`backlinks`,n],f=()=>qv(n),t[0]=n,t[1]=d,t[2]=f);let p;t[3]!==n||t[4]!==u||t[5]!==o?(p=!u&&o.has(n),t[3]=n,t[4]=u,t[5]=o,t[6]=p):p=t[6];let m;t[7]!==d||t[8]!==f||t[9]!==p?(m={queryKey:d,queryFn:f,enabled:p},t[7]=d,t[8]=f,t[9]=p,t[10]=m):m=t[10];let{data:h,isLoading:g,error:_}=yn(m),v;t[11]===h?v=t[12]:(v=h===void 0?[]:h,t[11]=h,t[12]=v);let y=v,[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(n);S!==n&&(C(n),x(!1));let w;t[13]!==y||t[14]!==b?(w=b?y:y.slice(0,Kv),t[13]=y,t[14]=b,t[15]=w):w=t[15];let T=w,E;t[16]===r?E=t[17]:(E=r({id:`9NJWgv`}),t[16]=r,t[17]=E);let D;t[18]!==y.length||t[19]!==g||t[20]!==E?(D=(0,Z.jsx)(Zv,{title:E,count:y.length,isLoading:g}),t[18]=y.length,t[19]=g,t[20]=E,t[21]=D):D=t[21];let O;t[22]!==r||t[23]!==y.length||t[24]!==_||t[25]!==b||t[26]!==a||t[27]!==g||t[28]!==o||t[29]!==l||t[30]!==c||t[31]!==T?(O=_?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(_n,{children:_ instanceof Error?_.message:r({id:`Xet9MX`})})}):y.length===0&&!g?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(wn,{children:(0,Z.jsx)(s,{id:`rVxu1k`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:T.map((e,t)=>{let n=fl(e.source,{pages:o,folderPaths:a,pagesBySlug:c,pagesByBasename:l});return(0,Z.jsx)($v,{icon:(0,Z.jsx)(Ge,{className:`size-3.5`}),title:e.title,path:Yv(e.source),titleHover:e.source,anchor:e.anchor,snippet:e.snippet,href:ls(n.hashDocName,e.anchor)},`${e.source}-${t}`)})}),(0,Z.jsx)(Qv,{total:y.length,expanded:b,onToggle:()=>x(ty)})]}),t[22]=r,t[23]=y.length,t[24]=_,t[25]=b,t[26]=a,t[27]=g,t[28]=o,t[29]=l,t[30]=c,t[31]=T,t[32]=O):O=t[32];let k;t[33]!==g||t[34]!==O?(k=(0,Z.jsx)(es,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":g,children:O})}),t[33]=g,t[34]=O,t[35]=k):k=t[35];let A;return t[36]!==k||t[37]!==D?(A=(0,Z.jsxs)(rs,{defaultOpen:!0,children:[D,k]}),t[36]=k,t[37]=D,t[38]=A):A=t[38],A}function ty(e){return!e}function ny(e){let t=(0,$.c)(49),{docName:n}=e,{_:r}=i(),{addPage:a,folderPaths:o,pages:c,pagesBySlug:l,pagesByBasename:u,loading:d}=Ts(),f,p;t[0]===n?(f=t[1],p=t[2]):(f=[`forward-links`,n],p=()=>Jv(n),t[0]=n,t[1]=f,t[2]=p);let m;t[3]!==n||t[4]!==c||t[5]!==d?(m=!d&&c.has(n),t[3]=n,t[4]=c,t[5]=d,t[6]=m):m=t[6];let h;t[7]!==f||t[8]!==p||t[9]!==m?(h={queryKey:f,queryFn:p,enabled:m},t[7]=f,t[8]=p,t[9]=m,t[10]=h):h=t[10];let{data:g,isLoading:_,error:v}=yn(h),y;t[11]===g?y=t[12]:(y=g===void 0?[]:g,t[11]=g,t[12]=y);let b=y,[x,S]=(0,Q.useState)(null),[C,w]=(0,Q.useState)(!1),[T,E]=(0,Q.useState)(n);T!==n&&(E(n),w(!1),S(null));let D;t[13]!==C||t[14]!==b?(D=C?b:b.slice(0,Kv),t[13]=C,t[14]=b,t[15]=D):D=t[15];let O=D,k;t[16]!==r||t[17]!==a||t[18]!==x?(k=async function(e,t){if(!x){S(t);try{await pe(e,{addPage:a,onCreated:Xv}),S(null)}catch(e){let t=e;Ls.error(t instanceof Error?t.message:r({id:`tfi40B`})),S(null)}}},t[16]=r,t[17]=a,t[18]=x,t[19]=k):k=t[19];let A=k,j;t[20]!==r||t[21]!==x||t[22]!==o||t[23]!==A||t[24]!==c||t[25]!==u||t[26]!==l||t[27]!==d?(j=function(e){let{title:t}=e;if(e.kind===`external`){let t=e.title===e.url;return(0,Z.jsx)($v,{icon:(0,Z.jsx)(Vo,{className:`size-3.5`}),rowTooltip:r({id:`XDzAnp`}),title:e.title,path:t?void 0:e.url,titleHover:e.url,snippet:e.snippet,href:e.url,external:!0},`ext:${e.url}`)}let n=V(e.docName,{pages:c,folderPaths:o,pagesBySlug:l,pagesByBasename:u}),i=!d&&n.kind===`create`,a=!d&&n.kind===`navigate`&&n.displayState===`folder`,s=Yv(e.docName),f=e.title===e.docName?s:e.title,p=`doc:${e.docName}:${e.anchor??``}`,m=ls(n.kind===`navigate`?n.hashDocName:e.docName,e.anchor);if(i&&n.kind===`create`){let i={initialDir:n.initialDir,suggestedName:n.suggestedName};return(0,Z.jsx)($v,{icon:(0,Z.jsx)(as,{className:`size-3.5`}),iconColorClass:`text-amber-600 dark:text-amber-400`,rowTooltip:r(x===p?{id:`kj9pAE`}:{id:`IQPyrD`}),ariaLabel:r(x===p?{id:`un8kBM`,values:{linkTitle:t}}:{id:`jEdF24`,values:{linkTitle:t}}),title:f,path:s,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,disabled:x!==null,onClick:()=>void A(i,p)},p)}return a&&n.kind===`navigate`?(0,Z.jsx)($v,{icon:(0,Z.jsx)(eu,{className:`size-3.5`}),iconColorClass:`text-sky-600 dark:text-sky-400`,ariaLabel:r({id:`P6lAT3`,values:{linkTitle:t}}),title:f,path:s,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:m},p):(0,Z.jsx)($v,{icon:(0,Z.jsx)(Ge,{className:`size-3.5`}),title:f,path:s,titleHover:e.docName,anchor:e.anchor,snippet:e.snippet,href:m},p)},t[20]=r,t[21]=x,t[22]=o,t[23]=A,t[24]=c,t[25]=u,t[26]=l,t[27]=d,t[28]=j):j=t[28];let M=j,N;t[29]===r?N=t[30]:(N=r({id:`O0Z2Xr`}),t[29]=r,t[30]=N);let P;t[31]!==_||t[32]!==b.length||t[33]!==N?(P=(0,Z.jsx)(Zv,{title:N,count:b.length,isLoading:_}),t[31]=_,t[32]=b.length,t[33]=N,t[34]=P):P=t[34];let F;t[35]!==r||t[36]!==v||t[37]!==C||t[38]!==_||t[39]!==b.length||t[40]!==M||t[41]!==O?(F=v?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(_n,{children:v instanceof Error?v.message:r({id:`pZAs1T`})})}):b.length===0&&!_?(0,Z.jsx)(`div`,{className:`px-3`,children:(0,Z.jsx)(wn,{children:(0,Z.jsx)(s,{id:`roiUQQ`})})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{className:`flex flex-col gap-1`,children:O.map(M)}),(0,Z.jsx)(Qv,{total:b.length,expanded:C,onToggle:()=>w(ry)})]}),t[35]=r,t[36]=v,t[37]=C,t[38]=_,t[39]=b.length,t[40]=M,t[41]=O,t[42]=F):F=t[42];let I;t[43]!==_||t[44]!==F?(I=(0,Z.jsx)(es,{children:(0,Z.jsx)(`div`,{className:`px-2 pb-3`,"aria-busy":_,children:F})}),t[43]=_,t[44]=F,t[45]=I):I=t[45];let L;return t[46]!==P||t[47]!==I?(L=(0,Z.jsxs)(rs,{defaultOpen:!0,children:[P,I]}),t[46]=P,t[47]=I,t[48]=L):L=t[48],L}function ry(e){return!e}function iy(e){let t=(0,$.c)(11),{docName:n,className:r}=e,i=r===void 0?``:r,a;t[0]===n?a=t[1]:(a=(0,Z.jsx)(ny,{docName:n}),t[0]=n,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Z.jsx)(so,{}),t[2]=o):o=t[2];let s;t[3]===n?s=t[4]:(s=(0,Z.jsx)(ey,{docName:n}),t[3]=n,t[4]=s);let c;t[5]!==a||t[6]!==s?(c=(0,Z.jsxs)(On,{className:`px-0 py-0`,children:[a,o,s]}),t[5]=a,t[6]=s,t[7]=c):c=t[7];let l;return t[8]!==i||t[9]!==c?(l=(0,Z.jsx)(Nn,{className:i,children:c}),t[8]=i,t[9]=c,t[10]=l):l=t[10],l}function ay(e){let t=e.setTimer??((e,t)=>setTimeout(e,t)),n=e.clearTimer??(e=>clearTimeout(e)),r=!1,i=!1,a=null,o=null,s=e.baseMs,c=!1,l=n=>{if(!r){if(e.isPaused()){c=!0;return}a=t(u,n)}};async function u(){if(a=null,c=!1,r)return;if(e.isPaused()){c=!0;return}o=new AbortController;let t=o.signal;try{let n=await e.poll(t);if(r)return;n===`ok`?(s=e.baseMs,l(e.baseMs)):(s=Math.min(s*2,e.maxBackoffMs),l(s))}catch{if(r||t.aborted)return;s=Math.min(s*2,e.maxBackoffMs),l(s)}}return{start(){r||i||(i=!0,u())},resume(){r||!e.isPaused()&&c&&a===null&&(c=!1,u())},stop(){r=!0,a!==null&&(n(a),a=null),o?.abort()}}}var oy=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends oy{};function sy(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function cy(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function ly(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function uy(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function dy(e,t){return ly(e,t,``)}function fy(e,t){return uy(e,t,``)}function py(e,t){return t.slice(0,my(e,t))}function my(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function hy(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function gy(e,t){if(t)return vy(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function _y(e,t){if(t)return vy(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function vy(e,t){if(!t)return[_y(e),gy(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=hy(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var yy=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,by=RegExp(`[${yy}]+|\\s+|[^${yy}]`,`ug`);new class extends oy{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=hy(e,r)}else n=e.match(by)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&xy(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&xy(n,i,r,null,t.intlSegmenter),e}};function xy(e,t,n,r,i){if(t&&n){let[a,o]=vy(t.value,i),[s,c]=vy(n.value,i);if(e){let r=sy(a,s);e.value=uy(e.value,s,r),t.value=dy(t.value,r),n.value=dy(n.value,r)}if(r){let e=cy(o,c);r.value=ly(r.value,c,e),t.value=fy(t.value,e),n.value=fy(n.value,e)}}else if(n){if(e){let e=_y(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=_y(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=_y(r.value,i),[a,o]=vy(t.value,i),s=sy(n,a);t.value=dy(t.value,s);let c=cy(dy(n,s),o);t.value=fy(t.value,c),r.value=ly(r.value,n,c),e.value=uy(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=_y(r.value,i),n=py(gy(t.value,i),e);t.value=fy(t.value,n)}else if(e){let n=py(gy(e.value,i),_y(t.value,i));t.value=dy(t.value,n)}}new class extends oy{tokenize(e){let t=RegExp(`(\\r?\\n)|[${yy}]+|[^\\S\\n\\r]+|[^${yy}]`,`ug`);return e.match(t)||[]}};var Sy=new class extends oy{constructor(){super(...arguments),this.tokenize=wy}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
13
13
  `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
14
14
  `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
15
15
  `)&&(e=e.slice(0,-1)),t.endsWith(`