@i14ks/ccv 0.4.1 → 0.6.0

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.
Files changed (27) hide show
  1. package/bundle/ccv.mjs +412 -32
  2. package/package.json +1 -1
  3. package/web/assets/{codemirror-ixGO-cbX.js → codemirror-DILVW5V7.js} +1 -1
  4. package/web/assets/index-5NnNKmcv.js +129 -0
  5. package/web/assets/{index-D1EGRMsF.js → index-BTNk6BN3.js} +1 -1
  6. package/web/assets/{index-_Y-EJULt.js → index-BjUFOQlC.js} +1 -1
  7. package/web/assets/index-Brn_uUCW.css +1 -0
  8. package/web/assets/{index-BuniMO1x.js → index-C2x9TM0V.js} +1 -1
  9. package/web/assets/{index-DqcI6biV.js → index-C41Hz81g.js} +1 -1
  10. package/web/assets/{index-Byl4r_xt.js → index-CC6apbYr.js} +1 -1
  11. package/web/assets/{index-EaPgYsZb.js → index-CP6Bv1lU.js} +1 -1
  12. package/web/assets/{index-D3avVSzn.js → index-CSzD2Fvc.js} +1 -1
  13. package/web/assets/{index-EHaCUl16.js → index-CVhjeQrh.js} +1 -1
  14. package/web/assets/{index-u0GQ-BLb.js → index-Cp4y8ln8.js} +1 -1
  15. package/web/assets/{index-GQ3tJswl.js → index-Cptzajqg.js} +1 -1
  16. package/web/assets/{index-CXiddYxZ.js → index-D18_1PH5.js} +1 -1
  17. package/web/assets/{index-CzWhd9WN.js → index-D2sBuEGv.js} +1 -1
  18. package/web/assets/{index-D2QcAee0.js → index-DJ1r3yCI.js} +1 -1
  19. package/web/assets/{index-DcGZZXlE.js → index-DJhubbAh.js} +1 -1
  20. package/web/assets/{index-CELwK_ze.js → index-Dr-2FTDh.js} +1 -1
  21. package/web/assets/{index-DAN-BZ4M.js → index-DuJE332D.js} +1 -1
  22. package/web/assets/{index-CtUwaQ4R.js → index-fBBR-7pG.js} +1 -1
  23. package/web/assets/{index-CbrZsnLR.js → index-qQ4Nk5pP.js} +1 -1
  24. package/web/assets/{index-jausLDAl.js → index-zZliJVYN.js} +1 -1
  25. package/web/index.html +2 -2
  26. package/web/assets/index-CQJq2xwX.css +0 -1
  27. package/web/assets/index-VtR2fk7J.js +0 -128
@@ -1 +1 @@
1
- import{P as L,b as $,a as E,D as j,N as y,c as S,I as G}from"./index-VtR2fk7J.js";var N={};class v{constructor(t,e,s,i,h,r,n,o,a,u=0,f){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new v(t,[],e,s,s,0,[],0,i?new R(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){i<h.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from;i<h.minRepeatTerm&&a==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let u=this.reducePos-a;u>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let f=o?this.stack[o-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,d+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this.buffer.length;if(r>0&&this.buffer[r-4]==0&&this.buffer[r-1]>-1){if(e==s)return;if(this.buffer[r-2]>=e){this.buffer[r-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;this.pos=i;let n=r.stateFlag(h,1);!n&&(i>s||e<=r.maxNode)&&(this.reducePos=i),this.pushState(h,n?s:Math.min(s,this.reducePos)),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(e&&t.buffer[e-4]==0&&(e-=4);e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new v(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new U(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,h)=>{if(!e.includes(i))return e.push(i),t.allActions(i,r=>{if(!(r&393216))if(r&65536){let n=(r>>19)-h;if(n>1){let o=r&65535,a=this.stack.length-n*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return n<<19|65536|o}}else{let n=s(r,h+1);if(n!=null)return n}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new R(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class R{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class U{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,s=t>>19;s==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(s-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class A{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new A(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new A(this.stack,this.pos,this.index)}}function x(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let s=0,i=0;s<l.length;){let h=0;for(;;){let r=l.charCodeAt(s++),n=!1;if(r==126){h=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),h+=o,n)break;h*=46}e?e[i++]=h:e=new t(h)}return e}class P{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const z=new P;class H{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=z,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,h=this.pos+t;for(;h<s.from;){if(!i)return null;let r=this.ranges[--i];h-=s.from-r.to,s=r}for(;e<0?h>s.to:h>=s.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];h+=r.from-s.to,s=r}return h}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,s,i;if(e>=0&&e<this.chunk.length)s=this.pos+t,i=this.chunk.charCodeAt(e);else{let h=this.resolveOffset(t,1);if(h==null)return-1;if(s=h,s>=this.chunk2Pos&&s<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(s-this.chunk2Pos);else{let r=this.rangeIndex,n=this.range;for(;n.to<=s;)n=this.ranges[++r];this.chunk2=this.input.chunk(this.chunk2Pos=s),s+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-s)),i=this.chunk2.charCodeAt(0)}}return s>=this.token.lookAhead&&(this.token.lookAhead=s+1),i}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(s==null||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=z,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class m{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;O(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}m.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class W{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data=typeof t=="string"?x(t):t}token(t,e){let s=t.pos,i=0;for(;;){let h=t.next<0,r=t.resolveOffset(1,1);if(O(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(h||i++,r==null)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}W.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class Z{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function O(l,t,e,s,i,h){let r=0,n=1<<s,{dialect:o}=e.p.parser;t:for(;(n&l[r])!=0;){let a=l[r+1];for(let c=r+3;c<a;c+=2)if((l[c+1]&n)>0){let p=l[c];if(o.allows(p)&&(t.token.value==-1||t.token.value==p||q(p,t.token.value,i,h))){t.acceptToken(p);break}}let u=t.next,f=0,d=l[r+2];if(t.next<0&&d>f&&l[a+d*3-3]==65535){r=l[a+d*3-1];continue t}for(;f<d;){let c=f+d>>1,p=a+c+(c<<1),b=l[p],M=l[p+1]||65536;if(u<b)d=c;else if(u>=M)f=c+1;else{r=l[p+2],t.advance();continue t}}break}}function I(l,t,e){for(let s=t,i;(i=l[s])!=65535;s++)if(i==e)return s-t;return-1}function q(l,t,e,s){let i=I(e,s,t);return i<0||I(e,s,l)<i}const g=typeof process<"u"&&N&&/\bparse\b/.test(N.LOG);let T=null;function D(l,t,e){let s=l.cursor(G.IncludeAnonymous);for(s.moveTo(t);;)if(!(e<0?s.childBefore(t):s.childAfter(t)))for(;;){if((e<0?s.to<t:s.from>t)&&!s.type.isError)return e<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(l.length,Math.max(s.from+1,t+25));if(e<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return e<0?0:l.length}}class J{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?D(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?D(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let h=s.children[i],r=this.start[e]+s.positions[i];if(r>t)return this.nextStart=r,null;if(h instanceof S){if(r==t){if(r<this.safeFrom)return null;let n=r+h.length;if(n<=this.safeTo){let o=h.prop(y.lookAhead);if(!o||n+o<this.fragment.to)return h}}this.index[e]++,r+h.length>=Math.max(this.safeFrom,t)&&(this.trees.push(h),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+h.length}}}class K{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(s=>new P)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:h}=i,r=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<h.length;a++){if((1<<a&r)==0)continue;let u=h[a],f=this.tokens[a];if(!(s&&!u.fallback)&&((u.contextual||f.start!=t.pos||f.mask!=r||f.context!=n)&&(this.updateCachedToken(f,u,t),f.mask=r,f.context=n),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let d=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!u.extend&&(s=f,e>d))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!s&&t.pos==this.stream.end&&(s=new P,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new P,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:h}=s.p;for(let r=0;r<h.specialized.length;r++)if(h.specialized[r]==t.value){let n=h.specializers[r](this.stream.read(t.start,t.end),s);if(n>=0&&s.p.parser.dialect.allows(n>>1)){(n&1)==0?t.value=n>>1:t.extended=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let h=0;h<i;h+=3)if(this.actions[h]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:h}=t,{parser:r}=t.p,{data:n}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(h,o?2:1);;a+=3){if(n[a]==65535)if(n[a+1]==1)a=k(n,a+2);else{i==0&&n[a+1]==2&&(i=this.putAction(k(n,a+2),e,s,i));break}n[a]==e&&(i=this.putAction(k(n,a+1),e,s,i))}return i}}class Q{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new H(e,i),this.tokens=new K(t,this.stream),this.topTerm=t.top[1];let{from:h}=i[0];this.stacks=[v.start(this,t.top[0],h)],this.fragments=s.length&&this.stream.end-h>t.bufferLength*4?new J(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,s=this.stacks=[],i,h;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let n=t[r];for(;;){if(this.tokens.mainToken=null,n.pos>e)s.push(n);else{if(this.advanceStack(n,s,t))continue;{i||(i=[],h=[]),i.push(n);let o=this.tokens.getMainToken(n);h.push(o.value,o.end)}}break}}if(!s.length){let r=i&&X(i);if(r)return g&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,h,s);if(r)return g&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(s.length>r)for(s.sort((n,o)=>o.score-n.score);s.length>r;)s.pop();s.some(n=>n.reducePos>e)&&this.recovering--}else if(s.length>1){t:for(let r=0;r<s.length-1;r++){let n=s[r];for(let o=r+1;o<s.length;o++){let a=s[o];if(n.sameState(a)||n.buffer.length>500&&a.buffer.length>500)if((n.score-a.score||n.buffer.length-a.buffer.length)>0)s.splice(o--,1);else{s.splice(r--,1);continue t}}}s.length>12&&(s.sort((r,n)=>n.score-r.score),s.splice(12,s.length-12))}this.minStackPos=s[0].pos;for(let r=1;r<s.length;r++)s[r].pos<this.minStackPos&&(this.minStackPos=s[r].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:h}=this,r=g?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,u=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?h.getGoto(t.state,f.type.id):-1;if(d>-1&&f.length&&(!a||(f.prop(y.contextHash)||0)==u))return t.useNode(f,d),g&&console.log(r+this.stackID(t)+` (via reuse of ${h.getName(f.type.id)})`),!0;if(!(f instanceof S)||f.children.length==0||f.positions[0]>0)break;let c=f.children[0];if(c instanceof S&&f.positions[0]==0)f=c;else break}}let n=h.stateSlot(t.state,4);if(n>0)return t.reduce(n),g&&console.log(r+this.stackID(t)+` (via always-reduce ${h.getName(n&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let u=o[a++],f=o[a++],d=o[a++],c=a==o.length||!s,p=c?t:t.split(),b=this.tokens.mainToken;if(p.apply(u,f,b?b.start:p.pos,d),g&&console.log(r+this.stackID(p)+` (via ${(u&65536)==0?"shift":`reduce of ${h.getName(u&65535)}`} for ${h.getName(f)} @ ${i}${p==t?"":", split"})`),c)return!0;p.pos>i?e.push(p):s.push(p)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return B(t,e),!0}}runRecovery(t,e,s){let i=null,h=!1;for(let r=0;r<t.length;r++){let n=t[r],o=e[r<<1],a=e[(r<<1)+1],u=g?this.stackID(n)+" -> ":"";if(n.deadEnd&&(h||(h=!0,n.restart(),g&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))))continue;let f=n.split(),d=u;for(let c=0;c<10&&f.forceReduce()&&(g&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,s));c++)g&&(d=this.stackID(f)+" -> ");for(let c of n.recoverByInsert(o))g&&console.log(u+this.stackID(c)+" (via recover-insert)"),this.advanceFully(c,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),g&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),B(n,s)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(t){return t.close(),S.build({buffer:A.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(T||(T=new WeakMap)).get(t);return e||T.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function B(l,t){for(let e=0;e<t.length;e++){let s=t[e];if(s.pos==l.pos&&s.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}class V{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||this.disabled[t]==0}}const C=l=>l;class _{constructor(t){this.start=t.start,this.shift=t.shift||C,this.reduce=t.reduce||C,this.reuse=t.reuse||C,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class w extends L{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;n<t.repeatNodeCount;n++)e.push("");let s=Object.keys(t.topRules).map(n=>t.topRules[n][1]),i=[];for(let n=0;n<e.length;n++)i.push([]);function h(n,o,a){i[n].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let n of t.nodeProps){let o=n[0];typeof o=="string"&&(o=y[o]);for(let a=1;a<n.length;){let u=n[a++];if(u>=0)h(u,o,n[a++]);else{let f=n[a+-u];for(let d=-u;d>0;d--)h(n[a++],o,f);a++}}}this.nodeSet=new $(e.map((n,o)=>E.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:s.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=j;let r=x(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;n<this.specializerSpecs.length;n++)this.specialized[n]=this.specializerSpecs[n].term;this.specializers=this.specializerSpecs.map(F),this.states=x(t.states,Uint32Array),this.data=x(t.stateData),this.goto=x(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(n=>typeof n=="number"?new m(r,n):n),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new Q(this,t,e,s);for(let h of this.wrappers)i=h(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let h=i[e+1];;){let r=i[h++],n=r&1,o=i[h++];if(n&&s)return o;for(let a=h+(r>>1);h<a;h++)if(i[h]==t)return o;if(n)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let h=this.stateSlot(t,i?2:1),r;;h+=3){if((r=s[h])==65535)if(s[h+1]==1)r=s[h=k(s,h+2)];else{if(s[h+1]==2)return k(s,h+2);break}if(r==e||r==0)return k(s,h+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,s=>s==e?!0:null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let h=this.stateSlot(t,1);i==null;h+=3){if(this.data[h]==65535)if(this.data[h+1]==1)h=k(this.data,h+2);else break;i=e(k(this.data,h+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;if((this.data[s+2]&1)==0){let i=this.data[s+1];e.some((h,r)=>r&1&&h==i)||e.push(this.data[s],i)}}return e}configure(t){let e=Object.assign(Object.create(w.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(s=>{let i=t.tokenizers.find(h=>h.from==s);return i?i.to:s})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let h=t.specializers.find(n=>n.from==s.external);if(!h)return s;let r=Object.assign(Object.assign({},s),{external:h.to});return e.specializers[i]=F(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let h of t.split(" ")){let r=e.indexOf(h);r>=0&&(s[r]=!0)}let i=null;for(let h=0;h<e.length;h++)if(!s[h])for(let r=this.dialects[e[h]],n;(n=this.data[r++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[n]=1;return new V(t,s,i)}static deserialize(t){return new w(t)}}function k(l,t){return l[t]|l[t+1]<<16}function X(l){let t=null;for(let e of l){let s=e.p.stoppedAt;(e.pos==e.p.stream.end||s!=null&&e.pos>s)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function F(l){if(l.external){let t=l.extend?1:0;return(e,s)=>l.external(e,s)<<1|t}return l.get}export{_ as C,Z as E,w as L,W as a};
1
+ import{P as L,b as $,a as E,D as j,N as y,c as S,I as G}from"./index-5NnNKmcv.js";var N={};class v{constructor(t,e,s,i,h,r,n,o,a,u=0,f){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=u,this.parent=f}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new v(t,[],e,s,s,0,[],0,i?new R(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){i<h.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from;i<h.minRepeatTerm&&a==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let u=this.reducePos-a;u>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=u));let f=o?this.stack[o-1]:0,d=this.bufferBase+this.buffer.length-f;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,d+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this.buffer.length;if(r>0&&this.buffer[r-4]==0&&this.buffer[r-1]>-1){if(e==s)return;if(this.buffer[r-2]>=e){this.buffer[r-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;this.pos=i;let n=r.stateFlag(h,1);!n&&(i>s||e<=r.maxNode)&&(this.reducePos=i),this.pushState(h,n?s:Math.min(s,this.reducePos)),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(e&&t.buffer[e-4]==0&&(e-=4);e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new v(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new U(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],s=(i,h)=>{if(!e.includes(i))return e.push(i),t.allActions(i,r=>{if(!(r&393216))if(r&65536){let n=(r>>19)-h;if(n>1){let o=r&65535,a=this.stack.length-n*3;if(a>=0&&t.getGoto(this.stack[a],o,!1)>=0)return n<<19|65536|o}}else{let n=s(r,h+1);if(n!=null)return n}})};return s(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:t}=this.p;return t.data[t.stateSlot(this.state,1)]==65535&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||this.buffer[t]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new R(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){return t<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=t,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class R{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class U{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=t&65535,s=t>>19;s==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(s-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class A{constructor(t,e,s){this.stack=t,this.pos=e,this.index=s,this.buffer=t.buffer,this.index==0&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new A(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;t!=null&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new A(this.stack,this.pos,this.index)}}function x(l,t=Uint16Array){if(typeof l!="string")return l;let e=null;for(let s=0,i=0;s<l.length;){let h=0;for(;;){let r=l.charCodeAt(s++),n=!1;if(r==126){h=65535;break}r>=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,n=!0),h+=o,n)break;h*=46}e?e[i++]=h:e=new t(h)}return e}class P{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const z=new P;class H{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=z,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let s=this.range,i=this.rangeIndex,h=this.pos+t;for(;h<s.from;){if(!i)return null;let r=this.ranges[--i];h-=s.from-r.to,s=r}for(;e<0?h>s.to:h>=s.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];h+=r.from-s.to,s=r}return h}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e=this.chunkOff+t,s,i;if(e>=0&&e<this.chunk.length)s=this.pos+t,i=this.chunk.charCodeAt(e);else{let h=this.resolveOffset(t,1);if(h==null)return-1;if(s=h,s>=this.chunk2Pos&&s<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(s-this.chunk2Pos);else{let r=this.rangeIndex,n=this.range;for(;n.to<=s;)n=this.ranges[++r];this.chunk2=this.input.chunk(this.chunk2Pos=s),s+this.chunk2.length>n.to&&(this.chunk2=this.chunk2.slice(0,n.to-s)),i=this.chunk2.charCodeAt(0)}}return s>=this.token.lookAhead&&(this.token.lookAhead=s+1),i}acceptToken(t,e=0){let s=e?this.resolveOffset(e,-1):this.pos;if(s==null||s<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=s}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=z,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let s="";for(let i of this.ranges){if(i.from>=e)break;i.to>t&&(s+=this.input.read(Math.max(i.from,t),Math.min(i.to,e)))}return s}}class m{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:s}=e.p;O(this.data,t,e,this.id,s.data,s.tokenPrecTable)}}m.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class W{constructor(t,e,s){this.precTable=e,this.elseToken=s,this.data=typeof t=="string"?x(t):t}token(t,e){let s=t.pos,i=0;for(;;){let h=t.next<0,r=t.resolveOffset(1,1);if(O(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(this.elseToken==null)return;if(h||i++,r==null)break;t.reset(r,t.token)}i&&(t.reset(s,t.token),t.acceptToken(this.elseToken,i))}}W.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class Z{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function O(l,t,e,s,i,h){let r=0,n=1<<s,{dialect:o}=e.p.parser;t:for(;(n&l[r])!=0;){let a=l[r+1];for(let c=r+3;c<a;c+=2)if((l[c+1]&n)>0){let p=l[c];if(o.allows(p)&&(t.token.value==-1||t.token.value==p||q(p,t.token.value,i,h))){t.acceptToken(p);break}}let u=t.next,f=0,d=l[r+2];if(t.next<0&&d>f&&l[a+d*3-3]==65535){r=l[a+d*3-1];continue t}for(;f<d;){let c=f+d>>1,p=a+c+(c<<1),b=l[p],M=l[p+1]||65536;if(u<b)d=c;else if(u>=M)f=c+1;else{r=l[p+2],t.advance();continue t}}break}}function I(l,t,e){for(let s=t,i;(i=l[s])!=65535;s++)if(i==e)return s-t;return-1}function q(l,t,e,s){let i=I(e,s,t);return i<0||I(e,s,l)<i}const g=typeof process<"u"&&N&&/\bparse\b/.test(N.LOG);let T=null;function D(l,t,e){let s=l.cursor(G.IncludeAnonymous);for(s.moveTo(t);;)if(!(e<0?s.childBefore(t):s.childAfter(t)))for(;;){if((e<0?s.to<t:s.from>t)&&!s.type.isError)return e<0?Math.max(0,Math.min(s.to-1,t-25)):Math.min(l.length,Math.max(s.from+1,t+25));if(e<0?s.prevSibling():s.nextSibling())break;if(!s.parent())return e<0?0:l.length}}class J{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?D(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?D(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let s=this.trees[e],i=this.index[e];if(i==s.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let h=s.children[i],r=this.start[e]+s.positions[i];if(r>t)return this.nextStart=r,null;if(h instanceof S){if(r==t){if(r<this.safeFrom)return null;let n=r+h.length;if(n<=this.safeTo){let o=h.prop(y.lookAhead);if(!o||n+o<this.fragment.to)return h}}this.index[e]++,r+h.length>=Math.max(this.safeFrom,t)&&(this.trees.push(h),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+h.length}}}class K{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map(s=>new P)}getActions(t){let e=0,s=null,{parser:i}=t.p,{tokenizers:h}=i,r=i.stateSlot(t.state,3),n=t.curContext?t.curContext.hash:0,o=0;for(let a=0;a<h.length;a++){if((1<<a&r)==0)continue;let u=h[a],f=this.tokens[a];if(!(s&&!u.fallback)&&((u.contextual||f.start!=t.pos||f.mask!=r||f.context!=n)&&(this.updateCachedToken(f,u,t),f.mask=r,f.context=n),f.lookAhead>f.end+25&&(o=Math.max(f.lookAhead,o)),f.value!=0)){let d=e;if(f.extended>-1&&(e=this.addActions(t,f.extended,f.end,e)),e=this.addActions(t,f.value,f.end,e),!u.extend&&(s=f,e>d))break}}for(;this.actions.length>e;)this.actions.pop();return o&&t.setLookAhead(o),!s&&t.pos==this.stream.end&&(s=new P,s.value=t.p.parser.eofTerm,s.start=s.end=t.pos,e=this.addActions(t,s.value,s.end,e)),this.mainToken=s,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new P,{pos:s,p:i}=t;return e.start=s,e.end=Math.min(s+1,i.stream.end),e.value=s==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(t,e,s){let i=this.stream.clipPos(s.pos);if(e.token(this.stream.reset(i,t),s),t.value>-1){let{parser:h}=s.p;for(let r=0;r<h.specialized.length;r++)if(h.specialized[r]==t.value){let n=h.specializers[r](this.stream.read(t.start,t.end),s);if(n>=0&&s.p.parser.dialect.allows(n>>1)){(n&1)==0?t.value=n>>1:t.extended=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(i+1)}putAction(t,e,s,i){for(let h=0;h<i;h+=3)if(this.actions[h]==t)return i;return this.actions[i++]=t,this.actions[i++]=e,this.actions[i++]=s,i}addActions(t,e,s,i){let{state:h}=t,{parser:r}=t.p,{data:n}=r;for(let o=0;o<2;o++)for(let a=r.stateSlot(h,o?2:1);;a+=3){if(n[a]==65535)if(n[a+1]==1)a=k(n,a+2);else{i==0&&n[a+1]==2&&(i=this.putAction(k(n,a+2),e,s,i));break}n[a]==e&&(i=this.putAction(k(n,a+1),e,s,i))}return i}}class Q{constructor(t,e,s,i){this.parser=t,this.input=e,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new H(e,i),this.tokens=new K(t,this.stream),this.topTerm=t.top[1];let{from:h}=i[0];this.stacks=[v.start(this,t.top[0],h)],this.fragments=s.length&&this.stream.end-h>t.bufferLength*4?new J(s,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t=this.stacks,e=this.minStackPos,s=this.stacks=[],i,h;if(this.bigReductionCount>300&&t.length==1){let[r]=t;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<t.length;r++){let n=t[r];for(;;){if(this.tokens.mainToken=null,n.pos>e)s.push(n);else{if(this.advanceStack(n,s,t))continue;{i||(i=[],h=[]),i.push(n);let o=this.tokens.getMainToken(n);h.push(o.value,o.end)}}break}}if(!s.length){let r=i&&X(i);if(r)return g&&console.log("Finish with "+this.stackID(r)),this.stackToTree(r);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,h,s);if(r)return g&&console.log("Force-finish "+this.stackID(r)),this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(s.length>r)for(s.sort((n,o)=>o.score-n.score);s.length>r;)s.pop();s.some(n=>n.reducePos>e)&&this.recovering--}else if(s.length>1){t:for(let r=0;r<s.length-1;r++){let n=s[r];for(let o=r+1;o<s.length;o++){let a=s[o];if(n.sameState(a)||n.buffer.length>500&&a.buffer.length>500)if((n.score-a.score||n.buffer.length-a.buffer.length)>0)s.splice(o--,1);else{s.splice(r--,1);continue t}}}s.length>12&&(s.sort((r,n)=>n.score-r.score),s.splice(12,s.length-12))}this.minStackPos=s[0].pos;for(let r=1;r<s.length;r++)s[r].pos<this.minStackPos&&(this.minStackPos=s[r].pos);return null}stopAt(t){if(this.stoppedAt!=null&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,s){let i=t.pos,{parser:h}=this,r=g?this.stackID(t)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let a=t.curContext&&t.curContext.tracker.strict,u=a?t.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let d=this.parser.nodeSet.types[f.type.id]==f.type?h.getGoto(t.state,f.type.id):-1;if(d>-1&&f.length&&(!a||(f.prop(y.contextHash)||0)==u))return t.useNode(f,d),g&&console.log(r+this.stackID(t)+` (via reuse of ${h.getName(f.type.id)})`),!0;if(!(f instanceof S)||f.children.length==0||f.positions[0]>0)break;let c=f.children[0];if(c instanceof S&&f.positions[0]==0)f=c;else break}}let n=h.stateSlot(t.state,4);if(n>0)return t.reduce(n),g&&console.log(r+this.stackID(t)+` (via always-reduce ${h.getName(n&65535)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let o=this.tokens.getActions(t);for(let a=0;a<o.length;){let u=o[a++],f=o[a++],d=o[a++],c=a==o.length||!s,p=c?t:t.split(),b=this.tokens.mainToken;if(p.apply(u,f,b?b.start:p.pos,d),g&&console.log(r+this.stackID(p)+` (via ${(u&65536)==0?"shift":`reduce of ${h.getName(u&65535)}`} for ${h.getName(f)} @ ${i}${p==t?"":", split"})`),c)return!0;p.pos>i?e.push(p):s.push(p)}return!1}advanceFully(t,e){let s=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>s)return B(t,e),!0}}runRecovery(t,e,s){let i=null,h=!1;for(let r=0;r<t.length;r++){let n=t[r],o=e[r<<1],a=e[(r<<1)+1],u=g?this.stackID(n)+" -> ":"";if(n.deadEnd&&(h||(h=!0,n.restart(),g&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,s))))continue;let f=n.split(),d=u;for(let c=0;c<10&&f.forceReduce()&&(g&&console.log(d+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,s));c++)g&&(d=this.stackID(f)+" -> ");for(let c of n.recoverByInsert(o))g&&console.log(u+this.stackID(c)+" (via recover-insert)"),this.advanceFully(c,s);this.stream.end>n.pos?(a==n.pos&&(a++,o=0),n.recoverByDelete(o,a),g&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(o)})`),B(n,s)):(!i||i.score<f.score)&&(i=f)}return i}stackToTree(t){return t.close(),S.build({buffer:A.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(T||(T=new WeakMap)).get(t);return e||T.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function B(l,t){for(let e=0;e<t.length;e++){let s=t[e];if(s.pos==l.pos&&s.sameState(l)){t[e].score<l.score&&(t[e]=l);return}}t.push(l)}class V{constructor(t,e,s){this.source=t,this.flags=e,this.disabled=s}allows(t){return!this.disabled||this.disabled[t]==0}}const C=l=>l;class _{constructor(t){this.start=t.start,this.shift=t.shift||C,this.reduce=t.reduce||C,this.reuse=t.reuse||C,this.hash=t.hash||(()=>0),this.strict=t.strict!==!1}}class w extends L{constructor(t){if(super(),this.wrappers=[],t.version!=14)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;n<t.repeatNodeCount;n++)e.push("");let s=Object.keys(t.topRules).map(n=>t.topRules[n][1]),i=[];for(let n=0;n<e.length;n++)i.push([]);function h(n,o,a){i[n].push([o,o.deserialize(String(a))])}if(t.nodeProps)for(let n of t.nodeProps){let o=n[0];typeof o=="string"&&(o=y[o]);for(let a=1;a<n.length;){let u=n[a++];if(u>=0)h(u,o,n[a++]);else{let f=n[a+-u];for(let d=-u;d>0;d--)h(n[a++],o,f);a++}}}this.nodeSet=new $(e.map((n,o)=>E.define({name:o>=this.minRepeatTerm?void 0:n,id:o,props:i[o],top:s.indexOf(o)>-1,error:o==0,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1}))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=j;let r=x(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;n<this.specializerSpecs.length;n++)this.specialized[n]=this.specializerSpecs[n].term;this.specializers=this.specializerSpecs.map(F),this.states=x(t.states,Uint32Array),this.data=x(t.stateData),this.goto=x(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map(n=>typeof n=="number"?new m(r,n):n),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,s){let i=new Q(this,t,e,s);for(let h of this.wrappers)i=h(i,t,e,s);return i}getGoto(t,e,s=!1){let i=this.goto;if(e>=i[0])return-1;for(let h=i[e+1];;){let r=i[h++],n=r&1,o=i[h++];if(n&&s)return o;for(let a=h+(r>>1);h<a;h++)if(i[h]==t)return o;if(n)return-1}}hasAction(t,e){let s=this.data;for(let i=0;i<2;i++)for(let h=this.stateSlot(t,i?2:1),r;;h+=3){if((r=s[h])==65535)if(s[h+1]==1)r=s[h=k(s,h+2)];else{if(s[h+1]==2)return k(s,h+2);break}if(r==e||r==0)return k(s,h+1)}return 0}stateSlot(t,e){return this.states[t*6+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,s=>s==e?!0:null)}allActions(t,e){let s=this.stateSlot(t,4),i=s?e(s):void 0;for(let h=this.stateSlot(t,1);i==null;h+=3){if(this.data[h]==65535)if(this.data[h+1]==1)h=k(this.data,h+2);else break;i=e(k(this.data,h+1))}return i}nextStates(t){let e=[];for(let s=this.stateSlot(t,1);;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;if((this.data[s+2]&1)==0){let i=this.data[s+1];e.some((h,r)=>r&1&&h==i)||e.push(this.data[s],i)}}return e}configure(t){let e=Object.assign(Object.create(w.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let s=this.topRules[t.top];if(!s)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=s}return t.tokenizers&&(e.tokenizers=this.tokenizers.map(s=>{let i=t.tokenizers.find(h=>h.from==s);return i?i.to:s})),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((s,i)=>{let h=t.specializers.find(n=>n.from==s.external);if(!h)return s;let r=Object.assign(Object.assign({},s),{external:h.to});return e.specializers[i]=F(r),r})),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),t.bufferLength!=null&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return e==null?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),s=e.map(()=>!1);if(t)for(let h of t.split(" ")){let r=e.indexOf(h);r>=0&&(s[r]=!0)}let i=null;for(let h=0;h<e.length;h++)if(!s[h])for(let r=this.dialects[e[h]],n;(n=this.data[r++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[n]=1;return new V(t,s,i)}static deserialize(t){return new w(t)}}function k(l,t){return l[t]|l[t+1]<<16}function X(l){let t=null;for(let e of l){let s=e.p.stoppedAt;(e.pos==e.p.stream.end||s!=null&&e.pos>s)&&e.p.parser.stateFlag(e.state,2)&&(!t||t.score<e.score)&&(t=e)}return t}function F(l){if(l.external){let t=l.extend?1:0;return(e,s)=>l.external(e,s)<<1|t}return l.get}export{_ as C,Z as E,w as L,W as a};
package/web/index.html CHANGED
@@ -31,8 +31,8 @@
31
31
  }
32
32
  })();
33
33
  </script>
34
- <script type="module" crossorigin src="./assets/index-VtR2fk7J.js"></script>
35
- <link rel="stylesheet" crossorigin href="./assets/index-CQJq2xwX.css">
34
+ <script type="module" crossorigin src="./assets/index-5NnNKmcv.js"></script>
35
+ <link rel="stylesheet" crossorigin href="./assets/index-Brn_uUCW.css">
36
36
  </head>
37
37
  <body>
38
38
  <div id="root"></div>
@@ -1 +0,0 @@
1
- :root{color-scheme:light;--bg: #faf9f5;--surface: #ffffff;--surface-2: #f2f0e8;--surface-3: #e9e6db;--sidebar: #f0eee6;--border: #e2dfd3;--border-soft: #edebe1;--text: #1f1e1d;--text-2: #3d3d3a;--muted: #7c7a73;--accent: #c96442;--accent-hover: #b1553a;--accent-fg: #fffdf9;--accent-soft: rgba(201, 100, 66, .1);--accent-line: rgba(201, 100, 66, .36);--select: rgba(201, 100, 66, .28);--warn: #b0762c;--warn-soft: rgba(176, 118, 44, .12);--warn-line: rgba(176, 118, 44, .42);--danger: #bf4d43;--danger-soft: rgba(191, 77, 67, .1);--ok: #5b7f45;--add-bg: rgba(91, 127, 69, .13);--add-fg: #35512b;--del-bg: rgba(191, 77, 67, .1);--del-fg: #7d2f2a;--code-fg: #3d3d3a;--scroll: rgba(31, 30, 29, .2);--scroll-hover: rgba(31, 30, 29, .36);--shadow-sm: 0 1px 2px rgba(31, 30, 29, .07);--shadow-md: 0 6px 18px rgba(31, 30, 29, .1);--shadow-lg: 0 18px 44px rgba(31, 30, 29, .18);--ring: 0 0 0 3px rgba(201, 100, 66, .18);--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;--sans: ui-sans-serif, system-ui, "Segoe UI", Inter, Roboto, sans-serif;--serif: ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;--radius: 10px;--radius-lg: 16px;--sidebar-w: 276px;--files-w: 260px;--search-w: 320px;--git-w: 320px;--ask-w: 380px;--cm-key: #9a5bb0;--cm-str: #5b7f45;--cm-num: #b0762c;--cm-comment: #8a8880;--cm-fn: #4f7cac;--cm-type: #3f8f8a;--cm-prop: #a05063;--cm-const: #b1553a;--cm-op: #7c7a73;--cm-selection: rgba(201, 100, 66, .28);--cm-active: rgba(31, 30, 29, .035);--cm-match: rgba(176, 118, 44, .26);--lane-0: #c96442;--lane-1: #4f7cac;--lane-2: #5b7f45;--lane-3: #9a6bb0;--lane-4: #b0762c;--lane-5: #3f8f8a;--lane-6: #a05063}:root[data-theme=dark]{color-scheme:dark;--bg: #262624;--surface: #30302e;--surface-2: #3a3a37;--surface-3: #454542;--sidebar: #1f1e1d;--border: #3e3e3b;--border-soft: #343432;--text: #f5f4ee;--text-2: #d4d1c8;--muted: #918e86;--accent: #d97757;--accent-hover: #e08b6e;--accent-fg: #251610;--accent-soft: rgba(217, 119, 87, .14);--accent-line: rgba(217, 119, 87, .42);--select: rgba(217, 119, 87, .34);--warn: #d9a05b;--warn-soft: rgba(217, 160, 91, .14);--warn-line: rgba(217, 160, 91, .42);--danger: #e0776a;--danger-soft: rgba(224, 119, 106, .13);--ok: #8fb06b;--add-bg: rgba(143, 176, 107, .13);--add-fg: #cfe0b8;--del-bg: rgba(224, 119, 106, .13);--del-fg: #f0c6c0;--code-fg: #d4d1c8;--scroll: rgba(245, 244, 238, .16);--scroll-hover: rgba(245, 244, 238, .3);--shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);--shadow-md: 0 6px 18px rgba(0, 0, 0, .36);--shadow-lg: 0 18px 44px rgba(0, 0, 0, .5);--ring: 0 0 0 3px rgba(217, 119, 87, .22);--lane-0: #d97757;--lane-1: #7aa5d2;--lane-2: #8fb06b;--lane-3: #b98fd0;--lane-4: #d9a05b;--lane-5: #6fbdb6;--lane-6: #d2818f;--cm-key: #c39ad8;--cm-str: #a3c47f;--cm-num: #e0b276;--cm-comment: #86837b;--cm-fn: #8db6e2;--cm-type: #74c9c2;--cm-prop: #e0949f;--cm-const: #e79674;--cm-op: #a9a69d;--cm-selection: rgba(217, 119, 87, .34);--cm-active: rgba(245, 244, 238, .045);--cm-match: rgba(217, 160, 91, .3)}*{box-sizing:border-box}html,body,#root{height:100%}html,body{overflow:hidden;overscroll-behavior:none}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased}button{font:inherit;color:inherit;background:none;border:none;cursor:pointer}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}::selection{background:var(--select)}*{scrollbar-width:thin;scrollbar-color:var(--scroll) transparent}::-webkit-scrollbar{width:11px;height:11px}::-webkit-scrollbar-track,::-webkit-scrollbar-corner{background:transparent}::-webkit-scrollbar-thumb{background:var(--scroll);border:3px solid transparent;background-clip:content-box;border-radius:999px}::-webkit-scrollbar-thumb:hover{background:var(--scroll-hover);background-clip:content-box}.app{display:grid;grid-template-columns:[sidebar] var(--sidebar-w) [files] auto [search] auto [git] auto [main] minmax(0,1fr) [ask] auto;height:100%}.sidebar,.main,.sidepane{grid-row:1}.sidebar{grid-column:sidebar}.sidepane--files{grid-column:files;width:var(--files-w)}.sidepane--search{grid-column:search;width:var(--search-w)}.sidepane--git{grid-column:git;width:var(--git-w)}.main{grid-column:main}.sidepane--ask{grid-column:ask;width:var(--ask-w)}.pane-resizer{grid-row:1;display:flex;justify-content:center;position:relative;z-index:5;width:9px;cursor:col-resize;touch-action:none}.pane-resizer--left{justify-self:end;margin-right:-4px}.pane-resizer--right{justify-self:start;margin-left:-4px}.pane-resizer--sidebar{grid-column:sidebar}.pane-resizer--files{grid-column:files}.pane-resizer--search{grid-column:search}.pane-resizer--git{grid-column:git}.pane-resizer--ask{grid-column:ask}.pane-resizer__line{width:2px;border-radius:2px;background:transparent;transition:background .12s ease}.pane-resizer:hover .pane-resizer__line,.pane-resizer:active .pane-resizer__line,.pane-resizer:focus-visible .pane-resizer__line{background:var(--accent)}.pane-resizer:focus-visible{outline:none}body.is-resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}.main{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bg);container-type:inline-size}.sidebar{display:flex;flex-direction:column;min-height:0;background:var(--sidebar);border-right:1px solid var(--border)}.sidebar__head{display:flex;align-items:center;gap:9px;padding:14px 14px 14px 16px}.brand{font-family:var(--serif);font-size:16px;letter-spacing:-.01em;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dot{width:7px;height:7px;border-radius:50%;background:var(--danger);flex:none}.dot--on{background:var(--ok)}.sidebar__section{display:flex;align-items:center;gap:6px;width:100%;padding:14px 16px 6px 10px;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);text-align:left}.sidebar__section--btn:hover{color:var(--text-2)}.sidebar__section-name{flex:1;min-width:0}.sidebar__count{font-family:var(--mono);font-weight:500;letter-spacing:0;font-size:11px;color:var(--muted);opacity:.75}.sidebar__chev{flex:none;width:12px;height:12px;transition:transform .15s ease}.sidebar__chev--open{transform:rotate(90deg)}.fssearch--sidebar{margin:2px 12px 4px}.sidebar__scroll{overflow-y:auto;flex:1;min-height:0;padding-bottom:8px}.row{display:flex;align-items:center;gap:2px;width:calc(100% - 16px);margin:1px 8px;padding:7px 8px 7px 10px;border-radius:8px}.row:hover{background:var(--surface-2)}.sidebar .row{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.row--active{background:var(--surface-2)}.row--active .row__title{color:var(--text);font-weight:560}.row--active{box-shadow:inset 2px 0 0 var(--accent)}.row--selected,.row--selected:hover{background:var(--select)}.row__main{display:block;text-align:left;padding:0;min-width:0;flex:1}.row__edit{flex:none;display:grid;place-items:center;width:24px;height:24px;border-radius:6px;color:var(--muted);font-size:13px;opacity:0;transition:opacity .12s ease,background .12s ease}.row:hover .row__edit{opacity:1}.row__edit:hover{color:var(--text);background:var(--surface-3)}.row__edit:focus-visible{opacity:1}@media(hover:none){.row__edit{opacity:1}}.row__restore{flex:none;padding:4px 10px;border-radius:999px;border:1px solid var(--border);color:var(--text-2);font-size:11.5px;white-space:nowrap}.row__restore:hover{background:var(--surface-2);color:var(--text);border-color:var(--surface-3)}@media(max-width:860px){.row__restore{min-height:40px;padding:0 12px;display:inline-flex;align-items:center}}.row__head{display:flex;align-items:center;gap:8px;min-width:0}.row__title{display:block;min-width:0;flex:1 1 auto;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row__pin{width:11px;height:11px;margin:0 4px -1px 0;color:var(--accent);opacity:.8}.row__project{flex:none;max-width:42%;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row__meta{display:block;font-size:12px;line-height:1.45;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row__state{display:inline-flex;align-items:center;gap:5px}.row__state-dot{width:6px;height:6px;flex:none;border-radius:50%;background:currentColor}.row__state--running{color:var(--accent)}.row__state--starting{color:var(--accent);opacity:.6}.row__state--waiting{color:var(--warn)}.row__state--halted{color:var(--warn);opacity:.8}.row__state--ready{color:var(--ok)}.row__state--error{color:var(--danger)}.row__state--closed,.row__state--fresh{color:var(--muted)}.sidebar__foot{padding:12px 12px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--border);display:flex;gap:8px}.sidebar__foot .btn{flex:1;justify-content:center}.rename{width:100%;background:var(--surface);color:var(--text);border:1px solid var(--accent);border-radius:7px;padding:3px 7px;font:inherit;box-shadow:var(--ring)}.rename:focus{outline:none}.rename--title{font-weight:560;max-width:420px}.btn{display:inline-flex;align-items:center;gap:6px;padding:7px 13px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--text-2);font-size:13px;font-weight:500;white-space:nowrap;text-decoration:none;transition:background .12s ease,border-color .12s ease,color .12s ease}.btn:hover{background:var(--surface-2);color:var(--text)}.btn--primary{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}.btn--primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:var(--accent-fg)}.btn--warn{background:var(--warn);border-color:var(--warn);color:var(--accent-fg);font-weight:600}.btn--warn:hover{filter:brightness(1.06);color:var(--accent-fg)}.btn--ghost{background:transparent;border-color:transparent;color:var(--text-2)}.btn--ghost:hover{background:var(--surface-2)}.btn:disabled{opacity:.4;cursor:default;background:var(--surface);border-color:var(--border);color:var(--text-2)}.btn--primary:disabled{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}.theme-btn{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:8px;color:var(--muted)}.theme-btn:hover{background:var(--surface-2);color:var(--text)}.theme-btn svg{width:16px;height:16px}.theme-btn[aria-pressed=true]{color:var(--accent);background:var(--accent-soft)}.topbar{display:flex;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid var(--border);background:var(--bg);flex:none;flex-wrap:wrap;min-width:0}.topbar__tools{display:flex;align-items:center;gap:10px;min-width:0;margin-left:auto;flex-wrap:wrap;justify-content:flex-end;row-gap:6px}@container (max-width: 780px){.topbar .clock{display:none}}@container (max-width: 660px){.topbar .badge--cost{display:none}}@container (max-width: 520px){.topbar .usage{display:none}}.topbar .select__trigger{max-width:min(40vw,190px)}.topbar__id{display:flex;flex-direction:column;min-width:0;flex:0 1 auto;line-height:1.3}.topbar__head{display:flex;align-items:center;gap:8px;min-width:0}.topbar__title{display:block;text-align:left;font-family:var(--serif);font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;max-width:100%;padding:0}.topbar__title:hover:not(:disabled){color:var(--accent)}.topbar__title:disabled{cursor:default}.topbar__project{flex:0 1 auto;min-width:0;max-width:12em;padding-left:8px;border-left:1px solid var(--border);color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cwd{position:relative;min-width:0;z-index:20}.cwd__toggle{display:flex;align-items:center;gap:3px;width:100%;min-width:0;padding:0;text-align:left;color:var(--muted)}.cwd__toggle:hover{color:var(--text-2)}.cwd__chev{flex:none;width:10px;height:10px;transition:transform .15s ease}.cwd__chev--open{transform:rotate(90deg)}.cwd__short{font-family:var(--mono);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cwd__pop{position:absolute;top:calc(100% + 6px);left:0;display:flex;align-items:flex-end;gap:10px;width:max-content;min-width:min(320px,88vw);max-width:min(620px,88vw);padding:9px 10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);animation:pop .12s ease-out}.cwd__full{flex:1;min-width:0;font-family:var(--mono);font-size:12px;line-height:1.5;color:var(--text-2);word-break:break-all;-webkit-user-select:text;user-select:text}.cwd__copy{flex:none;padding:3px 9px;font-size:12px;white-space:nowrap}.badge{font-size:12px;font-family:var(--mono);color:var(--muted);background:var(--surface);padding:4px 10px;border:1px solid var(--border);border-radius:999px;white-space:nowrap;flex:none;max-width:40vw;overflow:hidden;text-overflow:ellipsis}.badge--live{color:var(--accent);border-color:var(--accent-line);background:var(--accent-soft)}.badge--wait{color:var(--warn);border-color:var(--warn-line);background:var(--warn-soft)}.menu-btn{display:none}.meters-refresh{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:8px;color:var(--muted);transition:background .12s ease,color .12s ease}.meters-refresh:hover:not(:disabled){background:var(--surface-2);color:var(--accent)}.meters-refresh:disabled{opacity:.4;cursor:default}.meters-refresh svg{width:14px;height:14px}.meters-refresh.is-busy svg{animation:meters-spin .8s linear infinite}@keyframes meters-spin{to{transform:rotate(360deg)}}.usage{display:grid;grid-template-columns:auto minmax(44px,72px) auto auto;align-items:center;gap:2px 7px;flex:none;padding:4px 11px;border:1px solid var(--border);border-radius:12px;background:var(--surface);font-size:11px;line-height:1.3;color:var(--muted);cursor:default}.usage__label{font-family:var(--mono);white-space:nowrap}.usage__track{height:4px;border-radius:999px;background:var(--surface-3);overflow:hidden}.usage__fill{display:block;height:100%;border-radius:999px;background:var(--accent);transition:width .3s ease,background .2s ease}.usage__fill--warn{background:var(--warn)}.usage__fill--over{background:var(--danger)}.usage__pct{font-family:var(--mono);font-variant-numeric:tabular-nums;text-align:right;color:var(--text-2);white-space:nowrap}.usage__reset{font-family:var(--mono);font-variant-numeric:tabular-nums;color:var(--muted);white-space:nowrap;padding-left:2px}.contextbar{display:flex;align-items:center;gap:9px;flex:none;padding:7px 16px;border-bottom:1px solid var(--border);background:var(--bg);font-size:11px;line-height:1.3;color:var(--muted)}.contextbar__label{font-family:var(--mono);white-space:nowrap}.contextbar__track{flex:1 1 auto;min-width:0;height:4px;border-radius:999px;background:var(--surface-3);overflow:hidden}.contextbar__fill{display:block;height:100%;border-radius:999px;background:var(--accent);transition:width .3s ease,background .2s ease}.contextbar__fill--warn{background:var(--warn)}.contextbar__fill--over{background:var(--danger)}.contextbar__pct{font-family:var(--mono);font-variant-numeric:tabular-nums;text-align:right;color:var(--text-2);white-space:nowrap}.clock{display:flex;flex-direction:column;align-items:flex-end;flex:none;font-family:var(--mono);font-variant-numeric:tabular-nums;line-height:1.3;cursor:default}.clock__time{font-size:13px;color:var(--text-2)}.clock__date{font-size:10.5px;color:var(--muted);white-space:nowrap}.select{position:relative;flex:none}.select__trigger{display:flex;align-items:center;gap:6px;max-width:40vw;padding:4px 8px 4px 11px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text-2);font-size:12px;font-family:var(--mono);transition:background .12s ease,border-color .12s ease}.select__trigger:hover{background:var(--surface-2);border-color:var(--surface-3)}.select--open .select__trigger{border-color:var(--accent-line);background:var(--accent-soft);color:var(--text)}.select__value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select__chev{flex:none;width:12px;height:12px;color:var(--muted);transition:transform .15s ease}.select--open .select__chev{transform:rotate(180deg)}.select__menu{position:absolute;top:calc(100% + 6px);right:0;z-index:25;min-width:232px;max-width:min(340px,92vw);max-height:min(320px,60vh);overflow-y:auto;padding:5px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);animation:pop .12s ease-out}@keyframes pop{0%{opacity:0;transform:translateY(-4px)}}.select__option{display:grid;grid-template-columns:16px 1fr;gap:2px 8px;width:100%;padding:7px 9px;border-radius:7px;text-align:left}.select__option.is-cursor{background:var(--surface-2)}.select__option.is-on .select__label{color:var(--accent)}.select__check{grid-row:1;color:var(--accent);font-size:12px;line-height:1.5}.select__label{grid-row:1;font-family:var(--mono);font-size:12.5px;color:var(--text);overflow-wrap:anywhere}.select__hint{grid-row:2;grid-column:2;font-size:11.5px;line-height:1.4;color:var(--muted)}.select__suffix{flex:none;padding:1px 6px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:11px}.select__suffix--hot{background:var(--accent);color:var(--accent-fg);font-weight:560}.modelmenu{min-width:296px}.modelmenu__head{padding:4px 9px 6px;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}.modelmenu__sep{height:1px;margin:5px 4px;background:var(--border-soft)}.modelmenu__row{display:flex;align-items:center;gap:10px;width:100%;padding:7px 9px;border-radius:7px;text-align:left}.modelmenu__row--btn:hover{background:var(--surface-2)}.modelmenu__label{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;font-size:12.5px;color:var(--text)}.modelmenu__desc{font-size:11.5px;line-height:1.35;color:var(--muted)}.modelmenu__levels{flex:none;display:flex;gap:2px;padding:2px;border:1px solid var(--border);border-radius:999px;background:var(--surface-2)}.modelmenu__level{padding:3px 8px;border-radius:999px;font-family:var(--mono);font-size:11px;color:var(--muted);transition:background .12s ease,color .12s ease}.modelmenu__level:hover{color:var(--text)}.modelmenu__level.is-on{background:var(--accent);color:var(--accent-fg)}.switch{flex:none;position:relative;width:30px;height:17px;border-radius:999px;background:var(--surface-3);transition:background .14s ease}.switch.is-on{background:var(--accent)}.switch__knob{position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:999px;background:var(--surface);box-shadow:var(--shadow-sm);transition:transform .14s ease}.switch.is-on .switch__knob{transform:translate(13px)}.transcript{flex:1;min-height:0;overflow-y:auto;padding:24px 16px 8px}.stream{max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:16px}.msg--user{align-self:flex-end;max-width:82%;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);padding:10px 15px;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere}.msg--assistant{color:var(--text);line-height:1.72;overflow-wrap:anywhere}.markdown-preview.msg--assistant__body{padding:0;font-family:inherit;font-size:inherit;line-height:inherit;color:inherit}.copybtn{flex:none;padding:3px 9px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--muted);font-size:11.5px;line-height:1.45;white-space:nowrap;transition:opacity .12s ease,background .12s ease,color .12s ease,border-color .12s ease}.copybtn:hover{background:var(--surface-2);color:var(--text)}.copybtn--done{color:var(--ok);border-color:var(--ok)}.codeblock{position:relative}.codeblock__copy{position:absolute;top:8px;right:8px;z-index:1;opacity:0}.codeblock:hover .codeblock__copy,.codeblock__copy:focus-visible{opacity:1}.markdown-preview .codeblock{margin:1em 0}.markdown-preview .codeblock>pre{margin:0}.markdown-preview.msg--assistant__body>:last-child{margin-bottom:0}.msg--assistant__foot{display:flex;justify-content:flex-end;margin-top:4px}.msg--assistant__foot .copybtn{opacity:0}.msg--assistant:hover .msg--assistant__foot .copybtn,.msg--assistant__foot .copybtn:focus-visible{opacity:1}@media(hover:none){.codeblock{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.codeblock>pre{width:100%}.codeblock__copy{position:static;order:-1;opacity:1}.msg--assistant__foot .copybtn{opacity:1}}.caret{display:inline-block;width:7px;height:1.05em;vertical-align:text-bottom;background:var(--accent);border-radius:1px;animation:blink 1s steps(2,start) infinite}@keyframes blink{50%{opacity:0}}.thinking{border-left:2px solid var(--border);padding-left:14px;color:var(--muted);font-size:13px;font-style:italic;white-space:pre-wrap}.transcript__more{align-self:center;display:inline-flex;align-items:center;padding:6px 16px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--muted);font-size:12.5px}.transcript__more:hover:not(:disabled){background:var(--surface-2);color:var(--text);border-color:var(--surface-3)}.transcript__more:disabled{opacity:.7;cursor:default}.transcript__divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px}.transcript__divider:before,.transcript__divider:after{content:"";flex:1;height:1px;background:var(--border-soft)}.work{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted)}.work__dots{display:flex;gap:4px}.work__dot{width:6px;height:6px;border-radius:50%;background:var(--accent);animation:work-bounce 1.15s ease-in-out infinite}.work__dot:nth-child(2){animation-delay:.16s}.work__dot:nth-child(3){animation-delay:.32s}@keyframes work-bounce{0%,75%,to{transform:translateY(0);opacity:.3}35%{transform:translateY(-4px);opacity:1}}.work__label{background:linear-gradient(90deg,var(--muted) 25%,var(--text) 50%,var(--muted) 75%);background-size:220% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:work-shimmer 2.1s linear infinite}@keyframes work-shimmer{0%{background-position:110% 0}to{background-position:-110% 0}}.work__time{font-family:var(--mono);font-size:12px}.work--wait .work__dot{background:var(--warn);animation:none;opacity:1}.work--wait .work__label{color:var(--warn);background:none;-webkit-background-clip:border-box;background-clip:border-box;animation:none}.badge--live{animation:badge-pulse 2s ease-in-out infinite}@keyframes badge-pulse{50%{opacity:.55}}@media(prefers-reduced-motion:reduce){.work__dot,.work__label,.badge--live,.caret,.select__menu,.modal,.modal-backdrop,.oplog,.cwd__pop,.micbtn.is-on{animation:none}.work__dot{opacity:1}.work__label{color:var(--text);background:none}.oplog--leaving,.usage__fill,.sidebar__chev,.cwd__chev{transition:none}.meters-refresh.is-busy svg,.sessionmenu__refresh.is-busy svg{animation:none}}.tool{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow-sm);overflow:hidden}.tool--wait{border-color:var(--warn-line)}.tool--error{border-color:var(--danger)}.tool__head{display:flex;align-items:center;gap:9px;width:100%;padding:9px 12px;text-align:left}.tool__head:hover{background:var(--surface-2)}.tool__name{font-family:var(--mono);font-size:12.5px;font-weight:600;color:var(--accent);flex:none}.tool__arg{font-family:var(--mono);font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.tool__status{font-size:12px;color:var(--muted);flex:none}.tool__body{border-top:1px solid var(--border-soft);padding:11px 12px;background:var(--bg)}.tool__questions{display:flex;flex-direction:column;gap:12px}.tool__question+.tool__question{padding-top:12px;border-top:1px solid var(--border-soft)}.tool__question-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 8px;margin-bottom:5px}.tool__question-text{font-size:13px;line-height:1.45;color:var(--text)}.tool__question-answer{font-size:12.5px}.tool__answer-value{color:var(--text-2)}.tool__answer-value:before{content:"→ ";color:var(--accent);font-weight:600}.tool__answer-empty{color:var(--muted);font-style:italic}pre.code{margin:0;font-family:var(--mono);font-size:12.5px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;max-height:340px;overflow-y:auto;color:var(--code-fg)}.diff{border:1px solid var(--border);border-radius:8px;overflow:hidden;background:var(--surface)}.diff__head{display:flex;align-items:center;gap:10px;padding:7px 10px;background:var(--surface-2);border-bottom:1px solid var(--border-soft);font-family:var(--mono);font-size:12px}.diff__path{min-width:0;flex:1;overflow-wrap:anywhere;color:var(--text-2)}.diff__stat{flex:none;display:flex;gap:8px;font-weight:600}.diff__stat--add{color:var(--ok)}.diff__stat--del{color:var(--danger)}.diff__note{padding:5px 10px;font-size:12px;color:var(--muted);border-bottom:1px solid var(--border-soft)}.diff__body{max-height:min(340px,46vh);overflow-y:auto;padding:4px 0;background:var(--bg)}.diff__row{display:flex;align-items:flex-start;gap:6px;padding:0 10px 0 6px;font-family:var(--mono);font-size:12.5px;line-height:1.55;color:var(--code-fg)}.diff__mark{flex:none;width:10px;text-align:center;color:var(--muted);-webkit-user-select:none;user-select:none}.diff__text{min-width:0;flex:1;white-space:pre-wrap;overflow-wrap:anywhere;-moz-tab-size:2;tab-size:2}.diff__row--add{background:var(--add-bg);color:var(--add-fg)}.diff__row--add .diff__mark{color:var(--ok)}.diff__row--del{background:var(--del-bg);color:var(--del-fg)}.diff__row--del .diff__mark{color:var(--danger)}.diff__row--gap{color:var(--muted);font-size:12px;padding-top:2px;padding-bottom:2px}.result-line{display:flex;gap:14px;font-size:12px;color:var(--muted);font-family:var(--mono);border-top:1px dashed var(--border);padding-top:10px}.notice{font-size:13px;color:var(--muted);border-left:2px solid var(--border);padding-left:14px}.notice--error{color:var(--danger);border-left-color:var(--danger)}.empty{color:var(--muted);text-align:center;padding:64px 16px;max-width:460px;margin:0 auto;font-family:var(--serif);font-size:16px;line-height:1.6}.composer{flex:none;background:var(--bg);padding:8px 16px calc(14px + env(safe-area-inset-bottom))}.composer__inner{max-width:760px;margin:0 auto;position:relative}.composer__field{display:flex;gap:8px;align-items:flex-end;padding:8px 8px 8px 4px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);transition:border-color .14s ease,box-shadow .14s ease}.composer__field:focus-within{border-color:var(--accent-line);box-shadow:var(--ring)}.composer textarea{flex:1;resize:none;background:none;color:var(--text);border:none;padding:7px 8px 7px 12px;font:inherit;line-height:1.55;max-height:190px;min-height:38px}.composer textarea:focus{outline:none}.composer textarea::placeholder{color:var(--muted)}.composer .btn{flex:none;border-radius:999px;padding:7px 16px}.sendbtn__icon{display:none;flex:none}.addbtn{flex:none;display:grid;place-items:center;width:30px;height:30px;margin-left:4px;border-radius:999px;color:var(--muted);transition:background .12s ease,color .12s ease}.addbtn:hover:not(:disabled){background:var(--surface-2);color:var(--text)}.addbtn:disabled{opacity:.4}.addbtn svg{width:16px;height:16px}.micbtn{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:999px;color:var(--muted);transition:background .12s ease,color .12s ease}.micbtn:hover:not(:disabled){background:var(--surface-2);color:var(--text)}.micbtn:disabled{opacity:.4}.micbtn svg{width:16px;height:16px}.micbtn.is-on{color:var(--danger);background:color-mix(in srgb,var(--danger) 14%,transparent);animation:mic-pulse 1.6s ease-in-out infinite}.micbtn.is-on:hover:not(:disabled){color:var(--danger);background:color-mix(in srgb,var(--danger) 22%,transparent)}@keyframes mic-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--danger) 40%,transparent)}70%{box-shadow:0 0 0 5px transparent}}.composer .oplog{margin:0 0 8px}.cmdmenu{position:absolute;left:0;right:0;bottom:calc(100% + 8px);z-index:10;padding:5px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);max-height:min(320px,46vh);overflow-y:auto;overflow-x:hidden;animation:pop .12s ease-out}.cmdmenu__row{display:flex;align-items:baseline;gap:8px;width:100%;padding:7px 10px;border-radius:7px;text-align:left}.cmdmenu__row.is-on{background:var(--surface-2)}.cmdmenu__name{font-family:var(--mono);font-size:13px;color:var(--accent);flex:none}.cmdmenu__hint{font-family:var(--mono);font-size:12px;color:var(--warn);flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmdmenu__desc{font-size:12px;color:var(--muted);min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cmdmenu__empty{padding:9px 10px;font-size:12px;color:var(--muted)}.ctxmenu{position:fixed;z-index:45;min-width:224px;max-width:min(320px,92vw);padding:5px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-lg);animation:pop .12s ease-out}.ctxmenu:focus{outline:none}.ctxmenu__note{padding:7px 9px 10px;margin-bottom:3px;border-bottom:1px solid var(--border-soft);font-size:12px;line-height:1.45;color:var(--muted)}.ctxmenu__item{display:flex;align-items:baseline;gap:8px;width:100%;padding:8px 9px;border-radius:7px;text-align:left;color:var(--text);font-size:13px}.ctxmenu__item.is-cursor{background:var(--surface-2)}.ctxmenu__label{flex:1;min-width:0}.ctxmenu__hint{font-size:11.5px;color:var(--muted)}@media(max-width:860px){.ctxmenu__item{min-height:40px}}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:16px;background:#1f1e1d6b;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:fade .14s ease-out}.modal-backdrop--sheet{align-items:flex-end;overflow-y:auto}@keyframes fade{0%{opacity:0}}.modal{width:100%;max-width:460px;display:flex;flex-direction:column;max-height:calc(100vh - 32px);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);overflow:hidden;animation:rise .16s cubic-bezier(.2,.8,.3,1)}@keyframes rise{0%{opacity:0;transform:translateY(10px) scale(.985)}}.modal__head{display:flex;align-items:center;gap:10px;padding:16px 16px 0}.modal__title{margin:0;flex:1;min-width:0;font-family:var(--serif);font-size:17px;font-weight:500}.modal__close{flex:none;display:grid;place-items:center;width:28px;height:28px;margin:-4px -4px 0 0;border-radius:8px;color:var(--muted);font-size:16px;line-height:1}.modal__close:hover{background:var(--surface-2);color:var(--text)}.modal__body{padding:10px 16px 16px;flex:1 1 auto;min-height:0;overflow-y:auto}.modal__text{margin:0 0 12px;font-size:13px;color:var(--muted)}.modal__text--dim{color:var(--muted);opacity:.75}.modal__error{margin:10px 0 0;padding:8px 10px;border:1px solid var(--warn);border-radius:8px;background:var(--surface-2);font-size:12.5px;color:var(--text)}.modal__actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px;background:var(--surface-2);border-top:1px solid var(--border-soft)}.modal__actions .btn{padding:8px 16px}.modal__actions .btn:not(.btn--primary){background:var(--surface)}.modal__actions .btn.btn--warn{background:var(--warn);border-color:var(--warn)}.modal--sheet{max-width:480px;max-height:none;border-radius:var(--radius-lg) var(--radius-lg) 0 0;overflow:visible;margin-bottom:env(safe-area-inset-bottom)}.modal--sheet .modal__body{flex:none;overflow:visible}.sessionmenu__row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 2px;border-bottom:1px solid var(--border-soft)}.sessionmenu__row:last-child{border-bottom:none}.sessionmenu__label{min-width:0;font-size:13.5px;color:var(--text-2)}.sessionmenu__row .select,.sessionmenu__row .cwd{flex:1;min-width:0}.sessionmenu__row .select__trigger{max-width:none;width:100%}.sessionmenu__row .cwd__pop{left:auto;right:0}.sessionmenu__rename{width:100%;margin-top:4px;padding:11px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);color:var(--text);font-size:13.5px;font-weight:520;text-align:center}.sessionmenu__rename:hover{background:var(--surface-3)}.sessionmenu__refresh{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;margin-top:4px;padding:8px 11px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);color:var(--text);font-size:13.5px;font-weight:520;text-align:center}.sessionmenu__refresh:hover:not(:disabled){background:var(--surface-3)}.sessionmenu__refresh:disabled{opacity:.6;cursor:default}.sessionmenu__refresh svg{flex:none;width:15px;height:15px}.sessionmenu__refresh.is-busy svg{animation:meters-spin .8s linear infinite}.sessionmenu__refresh-text{display:flex;flex-direction:column;line-height:1.35}.sessionmenu__refresh-time{font-size:11.5px;font-weight:400;color:var(--muted)}.field{display:block;font-size:12px;font-weight:500;color:var(--muted);margin-bottom:6px}.input{width:100%;padding:9px 12px;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:9px;font:inherit;transition:border-color .12s ease,box-shadow .12s ease}.input:focus{outline:none;border-color:var(--accent-line);box-shadow:var(--ring)}.input::placeholder{color:var(--muted)}.input--mono{font-family:var(--mono);font-size:13px}.finds{list-style:none;margin:12px 0 0;padding:0;max-height:240px;overflow-y:auto;border:1px solid var(--border-soft);border-radius:10px}.finds li+li{border-top:1px solid var(--border-soft)}.find{display:grid;grid-template-columns:1fr auto;gap:2px 10px;width:100%;padding:8px 10px;background:none;border:none;border-radius:0;text-align:left;cursor:pointer;color:var(--text);font:inherit}.find:hover:not(:disabled){background:var(--surface-2)}.find:disabled{cursor:default;opacity:.55}.find__name{font-size:13px;font-weight:500}.find__path{grid-column:1;font-family:var(--mono);font-size:11.5px;color:var(--muted);overflow-wrap:anywhere}.find__note{grid-column:2;grid-row:1 / span 2;align-self:center;max-width:45%;font-size:11.5px;color:var(--muted);text-align:right}.finds__agent{margin-top:12px;height:260px;border:1px solid var(--border-soft);border-radius:10px;overflow:hidden}.finds__agent .transcript{height:100%}.newproj__roots{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.newproj__root{padding:4px 9px;border:1px solid var(--border);border-radius:999px;background:var(--surface-2);color:var(--muted);font-family:var(--mono);font-size:11.5px;cursor:pointer}.newproj__root:hover{color:var(--text)}.newproj__root.is-on{border-color:var(--accent-line);color:var(--text)}.newproj__field{margin-top:14px}.newproj__preview{margin:8px 0 0;font-family:var(--mono);font-size:12px;color:var(--muted);overflow-wrap:anywhere}.newproj__opts{margin-top:14px;border:1px solid var(--border-soft);border-radius:10px;overflow:hidden}.newproj__opt+.newproj__opt{border-top:1px solid var(--border-soft)}.newproj__opt{display:flex;align-items:center;gap:10px;width:100%;padding:9px 11px;background:none;border:none;text-align:left;cursor:pointer;color:var(--text);font:inherit;font-size:13px}.newproj__opt:hover{background:var(--surface-2)}.newproj__optlabel{flex:1;display:flex;flex-direction:column;gap:1px}.newproj__optdesc{font-size:11.5px;color:var(--muted)}.newproj__warnings{margin:0;padding:0;list-style:none}.newproj__warnings li+li{margin-top:4px}.modal--wide{max-width:620px}.tabs{display:flex;gap:4px;margin-bottom:14px;padding-bottom:2px;border-bottom:1px solid var(--border-soft)}.tabs__tab{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:8px 8px 0 0;color:var(--muted);font-size:13px;font-weight:500;position:relative}.tabs__tab:hover,.tabs__tab.is-on{color:var(--text)}.tabs__tab.is-on:after{content:"";position:absolute;left:8px;right:8px;bottom:-3px;height:2px;border-radius:2px;background:var(--accent)}.tabs__count{padding:1px 6px;border-radius:999px;background:var(--surface-2);font-size:11px;font-variant-numeric:tabular-nums}.extlist{list-style:none;margin:0 0 12px;padding:0;display:flex;flex-direction:column;gap:8px}.extlist__row{padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2)}.extlist__head{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-bottom:4px}.extlist__name{font-family:var(--mono);font-size:13px;font-weight:600;color:var(--text);margin-right:2px}.extlist__meta{font-family:var(--mono);font-size:11.5px;color:var(--muted);overflow-wrap:anywhere}.extlist__error{margin-top:3px;font-size:12px;color:var(--danger);overflow-wrap:anywhere}.extlist__actions{display:flex;flex-wrap:wrap;gap:4px;margin-top:7px}.chip{padding:2px 7px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--muted);font-size:11px;white-space:nowrap}.chip--ok{color:var(--ok);border-color:var(--ok)}.chip--bad{color:var(--danger);border-color:var(--danger)}.chip--warn{color:var(--warn);border-color:var(--warn-line);background:var(--warn-soft)}.chip--mute{opacity:.75}.btn--sm{padding:4px 9px;font-size:12px}.btn--danger{color:var(--danger)}.btn--danger:hover{background:var(--danger-soft);color:var(--danger)}.extform{margin-bottom:12px}.extform .field{margin-top:10px}.extform .field:first-child{margin-top:0}.extform--card{padding:12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2)}.extform--card .input{background:var(--surface)}.extbar{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:12px}.extform--card .extbar{margin:12px 0 0}.extbar .btn{padding:8px 16px}.extform__row{display:flex;gap:8px;align-items:center}.extform__row .input{flex:1;min-width:0}.extform__row .btn{flex:none}.input--area{min-height:62px;resize:vertical}.oplog{margin:12px 0;padding:9px 11px;border-radius:9px;border:1px solid var(--border);background:var(--surface-2);font-size:12.5px;white-space:pre-wrap;overflow-wrap:anywhere;animation:oplog-in .18s ease-out}.oplog:last-child{margin-bottom:0}.oplog--ok{border-color:var(--ok);color:var(--text-2)}.oplog--bad{border-color:var(--danger);color:var(--danger)}.oplog--leaving{opacity:0;transform:translateY(-4px);transition:opacity .22s ease,transform .22s ease;pointer-events:none}@keyframes oplog-in{0%{opacity:0;transform:translateY(5px)}}.sidebar__foot{flex-wrap:wrap}.sidebar__wide{flex-basis:100%}.catalog__filters{display:flex;gap:8px;margin-bottom:12px}.catalog__filters .input{flex:1;min-width:0}.catalog__desc{margin:2px 0 4px;font-size:12.5px;line-height:1.5;color:var(--text-2);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.linkish{padding:0;color:var(--accent);text-decoration:underline;text-underline-offset:2px}.account-btn{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);font-size:13px;text-align:left}.account-btn:hover{background:var(--surface-2)}.account-btn__id{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.account{padding:12px;margin-bottom:12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2)}.account__id{font-family:var(--mono);font-size:13.5px;font-weight:600;overflow-wrap:anywhere}.account__chips{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 4px}.account__flow .field{margin-top:12px}.account__link{display:block;padding:9px 11px;border:1px solid var(--accent-line);border-radius:9px;background:var(--accent-soft);color:var(--accent);font-family:var(--mono);font-size:12px;line-height:1.5;overflow-wrap:anywhere}.account__log{margin:12px 0;padding:9px 11px;max-height:180px;overflow:auto;border:1px solid var(--border);border-radius:9px;background:var(--surface-2);color:var(--muted);font-family:var(--mono);font-size:11.5px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.account__warn{margin:0 0 12px;padding:9px 11px;border:1px solid var(--warn-line);border-radius:9px;background:var(--warn-soft);color:var(--warn);font-size:12.5px;line-height:1.5}.sheet{width:100%;max-width:560px;background:var(--surface);border:1px solid var(--warn-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);overflow:hidden;margin-bottom:env(safe-area-inset-bottom);animation:rise .16s cubic-bezier(.2,.8,.3,1)}.sheet__head{display:flex;align-items:center;gap:8px;padding:13px 16px;background:var(--warn-soft);border-bottom:1px solid var(--border-soft);font-weight:600;color:var(--text)}.sheet__body{padding:14px 16px}.sheet__tool{font-family:var(--mono);font-size:13px;color:var(--warn);margin-bottom:8px}.sheet__reason{margin:0 0 10px;font-size:13px;line-height:1.45;color:var(--text-2)}.sheet__actions{display:flex;gap:10px;padding:0 16px 16px}.sheet__actions .btn{flex:1;justify-content:center;padding:11px}.qsheet{width:100%;max-width:620px;max-height:calc(100vh - 32px);display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--accent-line);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);overflow:hidden;margin-bottom:env(safe-area-inset-bottom);animation:rise .16s cubic-bezier(.2,.8,.3,1)}.qsheet__head{display:flex;align-items:center;gap:10px;padding:13px 16px;background:var(--accent-soft);border-bottom:1px solid var(--border-soft);font-weight:600;color:var(--text);flex:none}.qsheet__head-icon{display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:999px;border:1.5px solid var(--accent);color:var(--accent);font-family:var(--serif);font-size:13px;font-weight:700}.qsheet__body{padding:14px 16px 6px;overflow-y:auto;flex:1}.qsheet__reason{margin:0 0 12px;font-size:13px;line-height:1.45;color:var(--text-2)}.qsheet__question+.qsheet__question{margin-top:20px;padding-top:18px;border-top:1px solid var(--border-soft)}.qsheet__question{margin-bottom:10px}.qsheet__qhead{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 9px;margin-bottom:10px}.qsheet__qtext{font-family:var(--serif);font-size:15px;font-weight:500;line-height:1.4;color:var(--text)}.chip--accent{color:var(--accent);border-color:var(--accent-line);background:var(--accent-soft)}.qsheet__options{display:flex;flex-direction:column;gap:6px}.qsheet__option{display:flex;align-items:flex-start;gap:10px;width:100%;padding:9px 11px;text-align:left;border:1px solid var(--border);border-radius:10px;background:var(--surface);transition:border-color .12s ease,background .12s ease}.qsheet__option:hover{background:var(--surface-2)}.qsheet__option:focus-visible{outline:none;box-shadow:var(--ring)}.qsheet__option.is-selected{border-color:var(--accent);background:var(--accent-soft)}.qsheet__opt-mark{position:relative;flex:none;margin-top:2px;width:15px;height:15px;border:1.5px solid var(--border);background:var(--surface)}.qsheet__options--radio .qsheet__opt-mark{border-radius:999px}.qsheet__options:not(.qsheet__options--radio) .qsheet__opt-mark{border-radius:5px}.qsheet__option.is-selected .qsheet__opt-mark{border-color:var(--accent);background:var(--accent)}.qsheet__options--radio .qsheet__option.is-selected .qsheet__opt-mark{box-shadow:inset 0 0 0 3px var(--surface)}.qsheet__options:not(.qsheet__options--radio) .qsheet__option.is-selected .qsheet__opt-mark:after{content:"✓";position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;font-size:10px;line-height:1;color:var(--accent-fg)}.qsheet__opt-body{min-width:0}.qsheet__opt-label{display:block;font-size:13.5px;font-weight:560;color:var(--text)}.qsheet__opt-desc{display:block;margin-top:2px;font-size:12.5px;line-height:1.4;color:var(--muted)}.qsheet__other{display:flex;flex-direction:column}.qsheet__other-input{margin-top:6px;width:100%;padding:8px 10px;border:1px solid var(--accent-line);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;font-size:13px}.qsheet__other-input:focus{outline:none;box-shadow:var(--ring)}.qsheet__other-input::placeholder{color:var(--muted)}.qsheet__preview{margin:10px 0 0;padding:10px 12px;border:1px solid var(--border-soft);border-radius:8px;background:var(--bg);color:var(--code-fg);font-family:var(--mono);font-size:12px;line-height:1.5;white-space:pre;overflow:auto;max-height:220px}.qsheet__actions{display:flex;gap:10px;padding:12px 16px;border-top:1px solid var(--border-soft);flex:none}.qsheet__actions .btn{flex:1;justify-content:center;padding:11px}.pane-btn{flex:none;display:grid;place-items:center;width:30px;height:30px;border-radius:8px;color:var(--muted);transition:background .12s ease,color .12s ease}.pane-btn:hover{background:var(--surface-2);color:var(--text)}.pane-btn.is-on{background:var(--accent-soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-line)}.pane-btn svg{width:16px;height:16px}.sidepane{display:none;flex-direction:column;min-height:0;min-width:0;background:var(--sidebar)}.sidepane--open{display:flex}.sidepane--git{border-right:1px solid var(--border)}.sidepane--ask{border-left:1px solid var(--border)}.sidepane__head{display:flex;align-items:center;gap:8px;flex:none;padding:12px 10px 12px 14px;border-bottom:1px solid var(--border-soft)}.sidepane__icon{flex:none;width:15px;height:15px;color:var(--muted)}.sidepane__title{flex:1;min-width:0;font-family:var(--serif);font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidepane__btn{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:7px;color:var(--muted);font-size:13px;line-height:1}.sidepane__btn:hover{background:var(--surface-2);color:var(--text)}.sidepane__btn:disabled{opacity:.35;cursor:default;background:none}.sidepane__btn svg{width:15px;height:15px}.sidepane__scroll{flex:1;min-height:0;overflow-y:auto;padding:6px 0 10px}.sidepane__empty{margin:0;padding:22px 16px;color:var(--muted);font-size:13px;line-height:1.55}.sidepane__tools{display:flex;align-items:center;gap:8px;flex:none;padding:0 10px 8px;border-bottom:1px solid var(--border-soft)}.sidepane__note{font-size:11px;color:var(--muted);white-space:nowrap;cursor:default}.select--compact{min-width:0}.select--compact .select__trigger{max-width:100%;padding:3px 7px 3px 10px;font-size:11.5px}.select--compact .select__menu{left:0;right:auto;max-width:min(340px,calc(100vw - 24px))}.composer--side{padding:8px 10px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--border-soft)}.composer--side .composer__inner{max-width:none}.composer--side .composer__field{flex-wrap:wrap;gap:4px 6px;padding:5px 6px;border-radius:var(--radius)}.composer--side textarea{order:-1;flex:1 0 100%;padding:4px 4px 2px 6px;font-size:13px;line-height:1.5;min-height:26px;max-height:140px}.composer--side .btn{padding:5px 13px;font-size:12.5px}.composer--side .addbtn{width:26px;height:26px;margin:0 auto 0 0}.composer--side .addbtn svg{width:14px;height:14px}.composer--side .micbtn{width:28px;height:28px}.composer--side .micbtn svg{width:14px;height:14px}.sidepane--ask .transcript{padding:14px 12px 4px}.sidepane--ask .stream{gap:12px}.sidepane--ask .msg--user{max-width:94%}.sidepane--ask .empty{padding:28px 4px;font-size:14px;text-align:left}.sidepane--files,.sidepane--search{border-right:1px solid var(--border)}.fssearch{display:flex;flex:none;align-items:center;gap:7px;margin:10px 10px 2px;padding:6px 9px;border:1px solid var(--border-soft);border-radius:8px;background:var(--surface)}.fssearch:focus-within{border-color:var(--accent-line);box-shadow:var(--ring)}.fssearch svg{flex:none;width:14px;height:14px;color:var(--muted)}.fssearch__input{flex:1;min-width:0;background:none;border:none;color:var(--text);font:inherit;font-size:12.5px}.fssearch__input:focus{outline:none}.fssearch__input::placeholder{color:var(--muted)}.fssearch__clear{flex:none;display:grid;place-items:center;width:18px;height:18px;border-radius:5px;color:var(--muted);font-size:10px;line-height:1}.fssearch__clear:hover{background:var(--surface-3);color:var(--text)}.fstree{padding:4px 0 10px;overflow-x:auto}.fsrow{display:flex;align-items:center;min-width:100%;width:max-content;padding-left:calc(8px + var(--depth, 0) * 13px);padding-right:4px;height:25px}.fsrow:hover,.fsrow.is-selected{background:var(--surface-2)}.fsrow.is-open{background:var(--accent-soft);box-shadow:inset 2px 0 0 var(--accent)}.fsrow--dragging{opacity:.4}.fsrow--drop-target{background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent-line)}.fstree--drop-target{background:var(--surface-2)}.fsrow__main{display:flex;align-items:center;gap:6px;flex:1;min-width:0;height:100%;padding:0;text-align:left}.fsrow__icon{flex:none;display:grid;place-items:center;width:15px;height:15px;color:var(--muted)}.fsrow__icon svg{width:15px;height:15px}.fsrow.is-open .fsrow__icon{color:var(--accent)}.fsrow__name{font-size:13px;color:var(--text-2);white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis}.fsrow.is-open .fsrow__name{color:var(--text)}.fsrow__icon--git-added,.fsrow__name--git-added{color:var(--ok)}.fsrow__icon--git-modified,.fsrow__name--git-modified{color:var(--warn)}.fsrow--ignored .fsrow__icon,.fsrow--ignored .fsrow__name{color:var(--muted);opacity:.72}.fsrow__tag,.cmdmenu__tag{flex:none;margin-left:6px;font-family:var(--mono);font-size:10px;letter-spacing:.02em;color:var(--muted);opacity:.8;white-space:nowrap}.fsrow__dot{flex:none;width:6px;height:6px;margin-left:2px;border-radius:50%;background:var(--accent)}.fsrow__act{flex:none;display:none;place-items:center;width:20px;height:20px;border-radius:6px;color:var(--muted);font-size:11px;line-height:1}.fsrow:hover .fsrow__act{display:grid}.fsrow__act:hover{background:var(--surface-3);color:var(--text)}.fsrow__act:focus-visible{display:grid}@media(hover:none){.fsrow__act{display:grid}}.fsrow--search{gap:6px;width:100%;color:inherit;font:inherit;text-align:left;padding-right:8px}.fsrow--search:hover{background:var(--surface-2)}.fsrow__path{flex:1;min-width:0;margin-left:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:11.5px}.fsrow--draft{gap:6px}.rename--file{flex:1;min-width:0;height:21px;padding:0 6px;font-size:13px}.fsrow__pending{margin:0;padding:2px 0 2px calc(8px + var(--depth) * 13px + 21px);color:var(--muted);font-size:12px}.searchgroup__path{margin:10px 0 0;padding:3px 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-2);font-size:12px;font-weight:600}.searchgroup__path:first-child{margin-top:0}.searchmatch{display:flex;width:100%;align-items:baseline;gap:10px;padding:3px 10px 3px 14px;border:none;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer}.searchmatch:hover{background:var(--surface-2)}.searchmatch__line{flex:none;min-width:2ch;color:var(--muted);font-family:var(--mono);font-size:11.5px;text-align:right}.searchmatch__text{flex:1;min-width:0;overflow:hidden;color:var(--text-2);font-family:var(--mono);font-size:12.5px;white-space:pre;text-overflow:ellipsis}.searchmatch__text mark{background:var(--accent-soft);color:var(--text);border-radius:3px}.worktabs{display:flex;flex:none;align-items:stretch;gap:2px;padding:4px 8px 0;overflow-x:auto;background:var(--bg);border-bottom:1px solid var(--border)}.worktab{display:flex;align-items:center;gap:5px;flex:none;max-width:220px;padding:0 8px 0 10px;height:30px;border:1px solid transparent;border-bottom:none;border-radius:8px 8px 0 0;color:var(--muted);font-size:12.5px}.worktab:hover{background:var(--surface-2);color:var(--text-2)}.worktab.is-on{background:var(--surface);border-color:var(--border);color:var(--text);margin-bottom:-1px;padding-bottom:1px}.worktab__name{min-width:0;padding:0;color:inherit;font:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.worktab__close{flex:none;display:grid;place-items:center;width:17px;height:17px;border-radius:5px;color:var(--muted);font-size:10px;line-height:1}.worktab__close:hover{background:var(--surface-3);color:var(--text)}.worktab__dot{flex:none;width:7px;height:7px;margin:0 5px;border-radius:50%;background:var(--accent);padding:0}.worktab__dot--busy{background:var(--ok);cursor:default;animation:badge-pulse 2s ease-in-out infinite}.editor{display:flex;flex-direction:column;flex:1;min-height:0;background:var(--bg)}.editor__bar{display:flex;align-items:center;gap:10px;flex:none;padding:7px 14px;border-bottom:1px solid var(--border-soft)}.editor__path{min-width:0;flex:1;font-family:var(--mono);font-size:12px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;direction:rtl;text-align:left}.editor__meta{flex:none;font-family:var(--mono);font-size:11.5px;color:var(--muted)}.editor__warn{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:none;padding:8px 14px;background:var(--warn-soft);border-bottom:1px solid var(--warn-line);color:var(--warn);font-size:12.5px}.editor__code{flex:1;min-height:0;overflow:hidden}.editor__code-surface{width:100%;height:100%}.editor__code-surface.is-hidden{display:none}.editor__state{display:grid;justify-items:center;align-content:center;gap:10px;height:100%;color:var(--muted);font-size:13.5px}.editor__fallback{display:flex;flex-direction:column;height:100%;min-height:0}.editor__fallback-banner{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:none;padding:8px 14px;background:var(--danger-soft);border-bottom:1px solid color-mix(in srgb,var(--danger) 40%,transparent);color:var(--danger);font-size:12.5px}.editor__fallback-text{flex:1;min-height:0;margin:0;padding:14px;overflow:auto;font-family:var(--mono);font-size:12.5px;line-height:1.6;color:var(--text-2);white-space:pre-wrap;word-break:break-word}.editor__empty{margin:0;padding:28px 20px;color:var(--muted);font-size:13.5px;line-height:1.6}.editor__viewtoggle{display:flex;flex:none;gap:2px;padding:2px;background:var(--surface-2);border-radius:var(--radius)}.editor__viewtoggle .btn{border:none;background:transparent;color:var(--muted)}.editor__viewtoggle .btn:hover{background:var(--surface-3);color:var(--text-2)}.editor__viewtoggle .btn.is-on{background:var(--surface);color:var(--text);box-shadow:var(--shadow-sm)}.markdown-preview{flex:1;min-height:0;overflow:auto;padding:28px 32px;font-family:var(--serif);font-size:15px;line-height:1.65;color:var(--text)}.markdown-preview>:first-child{margin-top:0}.markdown-preview h1,.markdown-preview h2,.markdown-preview h3,.markdown-preview h4,.markdown-preview h5,.markdown-preview h6{font-family:var(--sans);font-weight:600;line-height:1.3;margin:1.4em 0 .5em}.markdown-preview h1{font-size:1.6em;border-bottom:1px solid var(--border-soft);padding-bottom:.3em}.markdown-preview h2{font-size:1.3em}.markdown-preview h3{font-size:1.1em}.markdown-preview p,.markdown-preview ul,.markdown-preview ol,.markdown-preview blockquote{margin:.8em 0}.markdown-preview ul,.markdown-preview ol{padding-left:1.6em}.markdown-preview li+li{margin-top:.3em}.markdown-preview a{color:var(--accent)}.markdown-preview blockquote{border-left:3px solid var(--border);padding-left:1em;color:var(--text-2)}.markdown-preview code{font-family:var(--mono);font-size:.87em;background:var(--surface-2);padding:.15em .4em;border-radius:4px}.markdown-preview pre{background:var(--surface-2);padding:12px 14px;border-radius:var(--radius);overflow:auto}.markdown-preview pre code{background:none;padding:0}.markdown-preview pre code .cmh-key{color:var(--cm-key)}.markdown-preview pre code .cmh-prop{color:var(--cm-prop)}.markdown-preview pre code .cmh-fn{color:var(--cm-fn)}.markdown-preview pre code .cmh-const{color:var(--cm-const)}.markdown-preview pre code .cmh-type{color:var(--cm-type)}.markdown-preview pre code .cmh-num{color:var(--cm-num)}.markdown-preview pre code .cmh-str{color:var(--cm-str)}.markdown-preview pre code .cmh-op{color:var(--cm-op)}.markdown-preview pre code .cmh-comment{color:var(--cm-comment);font-style:italic}.markdown-preview pre code .cmh-invalid{color:var(--danger)}.markdown-preview table{border-collapse:collapse;width:100%;font-size:.92em}.markdown-preview th,.markdown-preview td{border:1px solid var(--border-soft);padding:6px 10px;text-align:left}.markdown-preview th{background:var(--surface-2)}.markdown-preview img{max-width:100%}.markdown-preview hr{border:none;border-top:1px solid var(--border-soft);margin:1.6em 0}.gitbar{display:flex;align-items:center;gap:6px;flex:none;padding:10px 12px;border-bottom:1px solid var(--border-soft)}.gitbar__branch{flex:1;min-width:0}.gitbar__branch .select__trigger{width:100%;max-width:none}.gitbar__branch .select__menu{left:0;right:auto;min-width:100%}.gitbar__note{margin:0;padding:8px 14px;background:var(--warn-soft);border-bottom:1px solid var(--border-soft);color:var(--warn);font-size:12px;line-height:1.45}.gitrow{display:flex;align-items:center;gap:2px;width:100%;height:50px;padding:0 10px 0 0;text-align:left}.gitrow:hover{background:var(--surface-2)}.gitrow.is-on{background:var(--surface-2);box-shadow:inset 2px 0 0 var(--accent)}.gitrow--work{height:46px;padding-left:14px;border-bottom:1px solid var(--border-soft);margin-bottom:4px}.gitrow__body{min-width:0;flex:1;display:flex;flex-direction:column;gap:1px}.gitrow__subject{display:block;font-size:13px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gitrow.is-on .gitrow__subject{color:var(--text)}.gitrow__meta{display:block;font-family:var(--mono);font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gitrow__ref{display:inline-block;margin-right:5px;padding:0 5px;border:1px solid var(--accent-line);border-radius:999px;background:var(--accent-soft);color:var(--accent);font-family:var(--mono);font-size:10.5px;vertical-align:1px}.gitgraph{flex:none}.gitgraph line,.gitgraph path{stroke-width:1.6;fill:none}.gitgraph__dot{fill:var(--sidebar);stroke-width:2}.gitrow:hover .gitgraph__dot{fill:var(--surface-2)}.gitgraph__head{fill:none;stroke:var(--accent);stroke-width:1.4;opacity:.65}.gitrow__local{margin-left:5px;color:var(--warn)}.commit__head{padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--border-soft)}.commit__subject{margin:0 0 6px;font-size:15px;font-weight:560;overflow-wrap:anywhere}.commit__meta{margin:0;font-size:12px;color:var(--muted);overflow-wrap:anywhere}.commit__hash{font-family:var(--mono);font-size:11.5px}.commit__meta--local{margin-top:4px;color:var(--warn)}.commit__body{margin:10px 0 0;padding:9px 11px;border-radius:9px;background:var(--surface-2);font-family:var(--mono);font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text-2)}.commit__file{margin-bottom:8px}.commit__filehead{display:flex;align-items:center;gap:10px;width:100%;padding:7px 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface-2);font-family:var(--mono);font-size:12px;text-align:left}.commit__filehead:hover{background:var(--surface-3)}.commit__filepath{min-width:0;flex:1;color:var(--text-2);overflow-wrap:anywhere}.commit__file .diff{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.commit__file .diff__head,.scrim{display:none}@media(max-width:860px){.app{grid-template-columns:1fr}.sidebar,.main,.sidepane{grid-column:1}.pane-resizer{display:none}.sidepane--open{position:fixed;top:0;bottom:0;width:min(var(--ask-w),calc(100vw - 44px));z-index:30;box-shadow:var(--shadow-lg)}.sidepane--open.sidepane--git,.sidepane--open.sidepane--files,.sidepane--open.sidepane--search{left:0;width:min(var(--git-w),calc(100vw - 44px))}.sidepane--open.sidepane--ask{right:0}.scrim--pane{display:block}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-w);z-index:30;transform:translate(-100%);transition:transform .18s ease;box-shadow:var(--shadow-lg)}.sidebar--open{transform:none}.scrim{display:block;position:fixed;top:0;right:0;bottom:0;left:0;background:#1f1e1d6b;z-index:20}.menu-btn{display:grid;place-items:center;width:40px;height:40px;padding:0}.pane-btn{width:40px;height:40px}.pane-btn svg{width:18px;height:18px}.topbar{gap:6px}.topbar__id{flex:1 1 100%;flex-direction:row;align-items:center;gap:10px}.topbar__head,.topbar__title{flex:1 1 auto;min-width:0}.msg--user{max-width:92%}.transcript{padding:16px 12px 4px}.composer{padding:6px 12px calc(10px + env(safe-area-inset-bottom))}.composer .sendbtn{width:32px;height:32px;padding:0;justify-content:center;border-radius:999px}.sendbtn__label{display:none}.sendbtn__icon{display:block;width:16px;height:16px}.composer--side .sendbtn{width:28px;height:28px}.composer--side .sendbtn__icon{width:14px;height:14px}.worktabs{padding:4px 6px 0}.worktab{max-width:150px}.editor__bar{padding:6px 10px}.editor__path{font-size:11.5px}}@media(max-width:380px){.menu-btn,.pane-btn{width:36px;height:36px}.pane-btn svg{width:16px;height:16px}.topbar{gap:4px}}.term-resizer{flex:none;display:flex;align-items:center;justify-content:center;position:relative;z-index:5;height:9px;margin:-4px 0;cursor:row-resize;touch-action:none}.term-resizer__line{width:100%;height:2px;margin:0 10px;border-radius:2px;background:transparent;transition:background .12s ease}.term-resizer:hover .term-resizer__line,.term-resizer:active .term-resizer__line,.term-resizer:focus-visible .term-resizer__line{background:var(--accent)}.term-resizer:focus-visible{outline:none}body.is-resizing-row{cursor:row-resize;-webkit-user-select:none;user-select:none}.termpanel{display:flex;flex-direction:column;flex:none;min-height:0;background:var(--surface);border-top:1px solid var(--border)}.termpanel--mobile{position:fixed;inset:0 0 auto 0;z-index:35;border-top:none;overscroll-behavior:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.termpanel__tabbar{display:flex;align-items:stretch;flex:none;gap:2px;padding:4px 6px;background:var(--bg);border-bottom:1px solid var(--border)}.termpanel--mobile .termpanel__tabbar{touch-action:pan-x}.termpanel__tabs{display:flex;align-items:stretch;gap:2px;min-width:0;overflow-x:auto}.termpanel--mobile .termpanel__tabs{touch-action:pan-x}.termtab{display:flex;align-items:center;gap:6px;flex:none;max-width:180px;padding:0 6px 0 11px;height:28px;border-radius:7px;color:var(--muted);font-size:12.5px}.termtab:hover{background:var(--surface-2);color:var(--text-2)}.termtab.is-on{background:var(--surface-3);color:var(--text)}.termtab--exited{opacity:.62}.termtab--exited.is-on{opacity:.85}.termtab__name{min-width:0;padding:0;color:inherit;font:inherit;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.termtab__code{flex:none;padding:0 5px;border-radius:999px;background:var(--danger-soft);color:var(--danger);font-family:var(--mono);font-size:10.5px;line-height:16px}.termtab__close{flex:none;display:grid;place-items:center;width:17px;height:17px;border-radius:5px;color:var(--muted);font-size:10px;line-height:1}.termtab__close:hover{background:var(--surface-3);color:var(--text)}.termpanel__add{flex:none;display:grid;place-items:center;width:26px;height:28px;margin-left:2px;border-radius:7px;color:var(--muted);font-size:16px;line-height:1}.termpanel__add:hover:not(:disabled){background:var(--surface-2);color:var(--text)}.termpanel__add:disabled{opacity:.4;cursor:default}.termpanel__spacer{flex:1}.termpanel__hide{flex:none;display:grid;place-items:center;width:26px;height:28px;border-radius:7px;color:var(--muted);font-size:11px}.termpanel__hide:hover{background:var(--surface-2);color:var(--text)}.termpanel--mobile .termpanel__hide{width:44px;height:44px;font-size:15px}.termpanel__body{position:relative;flex:1;min-height:0}.termview{display:none;width:100%;height:100%;padding:4px 0 4px 10px}.termview.is-active{display:block}.termpanel--mobile .xterm-viewport{overscroll-behavior:contain}.termpanel--mobile .termview{touch-action:pinch-zoom}.termview__surface{width:100%;height:100%}.termview__surface.is-hidden{display:none}.termview__state{display:grid;justify-items:center;align-content:center;gap:10px;height:100%;color:var(--muted);font-size:13.5px;text-align:center}.termview__state p{margin:0}.termview__state--error p:first-child{color:var(--text-2);font-weight:550}.termpanel__empty{display:grid;justify-items:center;align-content:center;gap:10px;height:100%;color:var(--muted);font-size:13.5px}.termpanel__empty p{margin:0}.termpanel--mobile .termpanel__empty,.termpanel--mobile .termview__state{touch-action:none}.termpanel__hint{max-width:46ch;text-align:center;font-size:12.5px;line-height:1.5}.relay{display:grid;gap:16px}.relay__lede{margin:0;color:var(--text-2);line-height:1.55}.relay__steps{margin:0;padding-left:20px;display:grid;gap:7px;color:var(--text-2);font-size:14px;line-height:1.5}.relay__form{display:grid;gap:14px}.relay__code{font-family:var(--mono);font-size:20px;letter-spacing:.16em;text-align:center;text-transform:uppercase}.relay__facts{margin:0;display:grid;gap:10px;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2)}.relay__facts>div{display:flex;align-items:center;gap:12px;font-size:14px}.relay__facts dt{color:var(--muted);min-width:96px}.relay__facts dd{margin:0;color:var(--text)}.relay__error{margin:0;padding:10px 12px;border:1px solid var(--danger);border-radius:var(--radius);background:var(--danger-soft);color:var(--danger);font-size:13.5px}.relay__note{margin:0;color:var(--muted);font-size:13px;line-height:1.5}.settings{display:grid;gap:22px}.settings__section{display:grid;gap:10px}.settings__heading{margin:0;font-size:13px;font-weight:600;color:var(--text)}.settings__hint{margin:0;color:var(--muted);font-size:13px;line-height:1.5}.settings__field{display:grid;gap:6px}.settings__field-label{font-size:12.5px;color:var(--text-2)}.settings__select{width:100%}.settings__select .select__trigger{width:100%;max-width:none;justify-content:space-between}.settings__select .select__menu{left:0;right:0;max-width:none}.settings__select-skeleton{display:flex;align-items:center;height:33px;padding:4px 8px 4px 11px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--muted);font-size:12px;font-family:var(--mono)}.access{display:grid;gap:8px}.access__card{display:flex;align-items:flex-start;gap:11px;width:100%;padding:12px 13px;text-align:left;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);transition:border-color .12s ease,background .12s ease}.access__card:hover:not(:disabled){background:var(--surface-2)}.access__card:disabled{opacity:.55;cursor:default}.access__card.is-on{border-color:var(--accent-line);background:var(--accent-soft)}.access__card--risky{border-color:var(--warn-line)}.access__card--risky.is-on{border-color:var(--warn);background:var(--warn-soft)}.access__radio{position:relative;flex:none;margin-top:2px;width:15px;height:15px;border-radius:50%;border:1.5px solid var(--border);background:var(--surface);transition:border-color .12s ease}.access__card.is-on .access__radio{border-color:var(--accent)}.access__card--risky.is-on .access__radio{border-color:var(--warn)}.access__card.is-on .access__radio:after{content:"";position:absolute;top:3px;right:3px;bottom:3px;left:3px;border-radius:50%;background:var(--accent)}.access__card--risky.is-on .access__radio:after{background:var(--warn)}.access__body{display:grid;gap:3px;min-width:0}.access__title{display:flex;align-items:center;gap:8px;font-size:13.5px;font-weight:560;color:var(--text)}.access__risk{padding:1px 7px;border:1px solid var(--warn-line);border-radius:999px;background:var(--warn-soft);color:var(--warn);font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:.02em}.access__desc{font-size:12.5px;line-height:1.45;color:var(--muted)}.settings__switch-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings__switch-copy{display:grid;gap:4px;min-width:0}.settings__switch-row>.switch,.settings__switch-row>.settings__switch-skeleton{margin-top:3px}.settings__switch-skeleton{flex:none;width:30px;height:17px;border-radius:999px;background:var(--surface-3);opacity:.55}.settings__nested{display:grid;gap:10px;padding-top:10px;border-top:1px dashed var(--border)}.settings__nested-heading{margin:0;font-size:13px;font-weight:600;color:var(--text)}.settings__nested.is-disabled{opacity:.5}