showai-reader 0.10.0-reader.lp7ix6so → 0.10.0-reader.no2caghj

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 (44) hide show
  1. package/README.md +1 -1
  2. package/chunks/{CardGrid-CXO2U3K5.js → CardGrid-ZD7JY7UV.js} +1 -1
  3. package/chunks/{CommandReference-E5Y6VMXC.js → CommandReference-YJNIRPTL.js} +1 -1
  4. package/chunks/{ComparisonMatrix-TXTUZF55.js → ComparisonMatrix-4DRFSPLO.js} +1 -1
  5. package/chunks/{EventTimeline-JOTYNIMI.js → EventTimeline-IQ2H46VE.js} +1 -1
  6. package/chunks/{ExperimentTracker-CWZCU2QO.js → ExperimentTracker-U5ITYX3T.js} +1 -1
  7. package/chunks/{ExternalDiagram-WFWITA4Q.js → ExternalDiagram-EWPIP7Z3.js} +1 -1
  8. package/chunks/{Flowchart-DJGFXDXU.js → Flowchart-KG5XEGTX.js} +1 -1
  9. package/chunks/{G2Chart-YVTXVVRZ.js → G2Chart-VK5272YL.js} +2 -2
  10. package/chunks/{LayerDiagram-KDSBIPHG.js → LayerDiagram-HCGSQAKS.js} +1 -1
  11. package/chunks/{Mindmap-SB34H5SG.js → Mindmap-NYV6EHDM.js} +1 -1
  12. package/chunks/{RichTextEditor-SMQMXUUN.js → RichTextEditor-XZ2B5GGL.js} +46 -46
  13. package/chunks/{Roadmap-BSPT5PBK.js → Roadmap-4XOIMZZP.js} +1 -1
  14. package/chunks/{Scene3D-VILMVRHH.js → Scene3D-MGIPMJO3.js} +2 -2
  15. package/chunks/{SequenceDiagram-W2YQCHNV.js → SequenceDiagram-6UO5Q4AG.js} +1 -1
  16. package/chunks/{StatusTree-57AOX2U2.js → StatusTree-DRHWD54I.js} +1 -1
  17. package/chunks/StepGuide-D7YXYHX7.js +1 -0
  18. package/chunks/{StructureBrowser-PVPAFYTN.js → StructureBrowser-GRRBMR5E.js} +1 -1
  19. package/chunks/{Waterfall-FIQDQSMD.js → Waterfall-MFZSSWA6.js} +1 -1
  20. package/chunks/{chunk-55FJSXTX.js → chunk-2URYNZTR.js} +1 -1
  21. package/chunks/{chunk-X6OHYKIW.js → chunk-7OXIV2BW.js} +1 -1
  22. package/chunks/{chunk-VUDDBRCY.js → chunk-GMWEGDGS.js} +2 -2
  23. package/chunks/chunk-JTQMPH6V.js +23 -0
  24. package/chunks/{chunk-6WTBCWHP.js.LEGAL.txt → chunk-JTQMPH6V.js.LEGAL.txt} +1 -0
  25. package/chunks/{chunk-5HKZMSJF.js → chunk-NLCSXEUT.js} +1 -1
  26. package/chunks/{chunk-TFZIEWR5.js → chunk-ODQFSR7R.js} +1 -1
  27. package/chunks/{chunk-ISEW5ABW.js → chunk-OZ5T5PI3.js} +1 -1
  28. package/chunks/{chunk-5SAGHDIJ.js → chunk-PPIHNPX6.js} +1 -1
  29. package/chunks/{chunk-7FHZWI2R.js → chunk-RR2EZ72L.js} +1 -1
  30. package/chunks/{chunk-7TNODUAV.js → chunk-T4CIPZPJ.js} +1 -1
  31. package/chunks/{chunk-DTW4F4AN.js → chunk-TJVHVAQF.js} +1 -1
  32. package/chunks/chunk-VKJZ5EGG.js +330 -0
  33. package/chunks/{chunk-UWAAPX6Y.js → chunk-YQ6N2DJR.js} +1 -1
  34. package/index.js +1 -1
  35. package/manifest.json +4 -4
  36. package/package.json +1 -1
  37. package/{reader-LP7IX6SO.js → reader-NO2CAGHJ.js} +31 -31
  38. package/chunks/StepGuide-VQRICGFO.js +0 -1
  39. package/chunks/chunk-6WTBCWHP.js +0 -23
  40. package/chunks/chunk-GREB3PFJ.js +0 -329
  41. /package/chunks/{G2Chart-YVTXVVRZ.js.LEGAL.txt → G2Chart-VK5272YL.js.LEGAL.txt} +0 -0
  42. /package/chunks/{Scene3D-VILMVRHH.js.LEGAL.txt → Scene3D-MGIPMJO3.js.LEGAL.txt} +0 -0
  43. /package/chunks/{chunk-VUDDBRCY.js.LEGAL.txt → chunk-GMWEGDGS.js.LEGAL.txt} +0 -0
  44. /package/{reader-LP7IX6SO.js.LEGAL.txt → reader-NO2CAGHJ.js.LEGAL.txt} +0 -0
@@ -5,5 +5,5 @@ function I(i){this.content=i}I.prototype={constructor:I,find:function(i){for(var
5
5
  `))}})}function $n(i,e,t){let n=i.resolve(e),r=n.index();return n.parent.canReplaceWith(r,r+1,t)}function _n(i,e,t,n,r){let s=i.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let o=t.create(n,null,r||s.marks);if(s.isLeaf)return i.replaceWith(e,e+s.nodeSize,o);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);i.step(new B(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new y(g.from(o),0,0),1,!0))}function Sr(i,e,t=1,n){let r=i.resolve(e),s=r.depth-t,o=n&&n[n.length-1]||r.parent;if(s<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!o.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let h=r.depth-1,c=t-2;h>s;h--,c--){let u=r.node(h),f=r.index(h);if(u.type.spec.isolating)return!1;let d=u.content.cutByIndex(f,u.childCount),m=n&&n[c+1];m&&(d=d.replaceChild(0,m.type.create(m.attrs)));let x=n&&n[c]||u;if(!u.canReplace(f+1,u.childCount)||!x.type.validContent(d))return!1}let a=r.indexAfter(s),l=n&&n[0];return r.node(s).canReplaceWith(a,a,l?l.type:r.node(s+1).type)}function er(i,e,t=1,n){let r=i.doc.resolve(e),s=g.empty,o=g.empty;for(let a=r.depth,l=r.depth-t,h=t-1;a>l;a--,h--){s=g.from(r.node(a).copy(s));let c=n&&n[h];o=g.from(c?c.type.create(c.attrs,o):r.node(a).copy(o))}i.step(new z(e,e,new y(s.append(o),t,t),!0))}function Er(i,e){let t=i.resolve(e),n=t.index();return jt(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(n,n+1)}function tr(i,e){e.content.size||i.type.compatibleContent(e.type);let t=i.contentMatchAt(i.childCount),{linebreakReplacement:n}=i.type.schema;for(let r=0;r<e.childCount;r++){let s=e.child(r),o=s.type==n?i.type.schema.nodes.text:s.type;if(t=t.matchType(o),!t||!i.type.allowsMarks(s.marks))return!1}return t.validEnd}function jt(i,e){return!!(i&&e&&!i.isLeaf&&tr(i,e))}function vr(i,e,t=-1){let n=i.resolve(e);for(let r=n.depth;;r--){let s,o,a=n.index(r);if(r==n.depth?(s=n.nodeBefore,o=n.nodeAfter):t>0?(s=n.node(r+1),a++,o=n.node(r).maybeChild(a)):(s=n.node(r).maybeChild(a-1),o=n.node(r+1)),s&&!s.isTextblock&&jt(s,o)&&n.node(r).canReplace(a,a+1))return e;if(r==0)break;e=t<0?n.before(r):n.after(r)}}function nr(i,e,t){let n=null,{linebreakReplacement:r}=i.doc.type.schema,s=i.doc.resolve(e-t),o=s.node().type;if(r&&o.inlineContent){let c=o.whitespace=="pre",u=!!o.contentMatch.matchType(r);c&&!u?n=!1:!c&&u&&(n=!0)}let a=i.steps.length;if(n===!1){let c=i.doc.resolve(e+t);Zt(i,c.node(),c.before(),a)}o.inlineContent&&Ye(i,e+t-1,o,s.node().contentMatchAt(s.index()),n==null);let l=i.mapping.slice(a),h=l.map(e-t);if(i.step(new z(h,l.map(e+t,-1),y.empty,!0)),n===!0){let c=i.doc.resolve(h);Qt(i,c.node(),c.before(),i.steps.length)}return i}function rr(i,e,t){let n=i.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),t))return e;if(n.parentOffset==0)for(let r=n.depth-1;r>=0;r--){let s=n.index(r);if(n.node(r).canReplaceWith(s,s,t))return n.before(r+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let r=n.depth-1;r>=0;r--){let s=n.indexAfter(r);if(n.node(r).canReplaceWith(s,s,t))return n.after(r+1);if(s<n.node(r).childCount)return null}return null}function br(i,e,t){let n=i.resolve(e);if(!t.content.size)return e;let r=t.content;for(let s=0;s<t.openStart;s++)r=r.firstChild.content;for(let s=1;s<=(t.openStart==0&&t.size?2:1);s++)for(let o=n.depth;o>=0;o--){let a=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,l=n.index(o)+(a>0?1:0),h=n.node(o),c=!1;if(s==1)c=h.canReplace(l,l,r);else{let u=h.contentMatchAt(l).findWrapping(r.firstChild.type);c=u&&h.canReplaceWith(l,l,u[0])}if(c)return a==0?n.pos:a<0?n.before(o+1):n.after(o+1)}return null}function ir(i,e,t=e,n=y.empty){if(e==t&&!n.size)return null;let r=i.resolve(e),s=i.resolve(t);return $t(r,s,n)?new z(e,t,n):new Xe(r,s,n).fit()}function $t(i,e,t){return!t.openStart&&!t.openEnd&&i.start()==e.start()&&i.parent.canReplace(i.index(),e.index(),t.content)}var Xe=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=g.empty;for(let r=0;r<=e.depth;r++){let s=e.node(r);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=g.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let h=this.findFittable();h?this.placeNodes(h):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let s=this.placed,o=n.depth,a=r.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new y(s,o,a);return e>-1?new B(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new z(n.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let s=t.firstChild;if(t.childCount>1&&(r=0),s.type.spec.isolating&&r<=n){e=n;break}t=s.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let r,s=null;n?(s=qt(this.unplaced.content,n-1).firstChild,r=s.content):r=this.unplaced.content;let o=r.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:h}=this.frontier[a],c,u=null;if(t==1&&(o?h.matchType(o.type)||(u=h.fillBefore(g.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:a,parent:s,inject:u};if(t==2&&o&&(c=h.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:a,parent:s,wrap:c};if(s&&h.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced;return Ut(e,-1)<=t?!1:(this.unplaced.size>1&&Ut(e,1)>n&&n++,this.unplaced=new y(e,t+1,n),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=qt(e,t);if(r.childCount<=1&&t>0){let s=e.size-t<=t+r.size;this.unplaced=new y(le(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new y(le(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let x=0;x<s.length;x++)this.openFrontierNode(s[x]);let o=this.unplaced,a=n?n.content:o.content,l=o.openStart-e,h=0,c=[],{match:u,type:f}=this.frontier[t];if(r){for(let x=0;x<r.childCount;x++)c.push(r.child(x));u=u.matchFragment(r)}let d=a.size+e-(o.content.size-o.openEnd);for(;h<a.childCount;){let x=a.child(h),A=u.matchType(x.type);if(!A)break;h++,(h>1||l==0||x.content.size)&&(u=A,c.push(_t(x.mark(f.allowedMarks(x.marks)),h==1?l:0,h==a.childCount?d:-1)))}let m=h==a.childCount;m||(d=-1),this.placed=ae(this.placed,t,g.from(c)),this.frontier[t].match=u,m&&d<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let x=0,A=a;x<d;x++){let L=A.lastChild;this.frontier.push({type:L.type,match:L.contentMatchAt(L.childCount)}),A=L.content}this.unplaced=m?e==0?y.empty:new y(le(o.content,e-1,1),e-1,d<0?o.openEnd:e-1):new y(le(o.content,e,h),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!qe(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],s=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=qe(e,t,r,n,s);if(o){for(let a=t-1;a>=0;a--){let{match:l,type:h}=this.frontier[a],c=qe(e,a,h,l,!0);if(!c||c.childCount)continue e}return{depth:t,fit:o,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=ae(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let r=e.node(n),s=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,s)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=ae(this.placed,this.depth,g.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(g.empty,!0);t.childCount&&(this.placed=ae(this.placed,this.frontier.length,t))}};function le(i,e,t){return e==0?i.cutByIndex(t,i.childCount):i.replaceChild(0,i.firstChild.copy(le(i.firstChild.content,e-1,t)))}function ae(i,e,t){return e==0?i.append(t):i.replaceChild(i.childCount-1,i.lastChild.copy(ae(i.lastChild.content,e-1,t)))}function qt(i,e){for(let t=0;t<e;t++)i=i.firstChild.content;return i}function _t(i,e,t){if(e<=0)return i;let n=i.content;return e>1&&(n=n.replaceChild(0,_t(n.firstChild,e-1,n.childCount==1?t-1:0))),e>0&&(n=i.type.contentMatch.fillBefore(n).append(n),t<=0&&(n=n.append(i.type.contentMatch.matchFragment(n).fillBefore(g.empty,!0)))),i.copy(n)}function qe(i,e,t,n,r){let s=i.node(e),o=r?i.indexAfter(e):i.index(e);if(o==s.childCount&&!t.compatibleContent(s.type))return null;let a=n.fillBefore(s.content,!0,o);return a&&!sr(t,s.content,o)?a:null}function sr(i,e,t){for(let n=t;n<e.childCount;n++)if(!i.allowsMarks(e.child(n).marks))return!0;return!1}function or(i){return i.spec.defining||i.spec.definingForContent}function Ut(i,e){for(let t=0;;t++){let n=e<0?i.firstChild:i.lastChild;if(!n||n.isAtom)return t;i=n.content}}function lr(i,e,t,n){if(!n.size)return i.deleteRange(e,t);let r=i.doc.resolve(e),s=i.doc.resolve(t);if($t(r,s,n))return i.step(new z(e,t,n));let o=tn(r,s);o[o.length-1]==0&&o.pop();let a=-(r.depth+1);o.unshift(a);for(let f=r.depth,d=r.pos-1;f>0;f--,d--){let m=r.node(f).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;o.indexOf(f)>-1?a=f:r.before(f)==d&&o.splice(1,0,-f)}let l=o.indexOf(a),h=[],c=n.openStart;for(let f=n.content,d=0;;d++){let m=f.firstChild;if(h.push(m),d==n.openStart)break;f=m.content}for(let f=c-1;f>=0;f--){let d=h[f],m=or(d.type);if(m&&!d.sameMarkup(r.node(Math.abs(a)-1)))c=f;else if(m||!d.type.isTextblock)break}for(let f=n.openStart;f>=0;f--){let d=(f+c+1)%(n.openStart+1),m=h[d];if(m)for(let x=0;x<o.length;x++){let A=o[(x+l)%o.length],L=!0;A<0&&(L=!1,A=-A);let q=r.node(A-1),Z=r.index(A-1);if(q.canReplaceWith(Z,Z,m.type,m.marks))return i.replace(r.before(A),L?s.after(A):t,new y(en(n.content,0,n.openStart,d),d,n.openEnd))}}let u=i.steps.length;for(let f=o.length-1;f>=0&&(i.replace(e,t,n),!(i.steps.length>u));f--){let d=o[f];d<0||(e=r.before(d),t=s.after(d))}}function en(i,e,t,n,r){if(e<t){let s=i.firstChild;i=i.replaceChild(0,s.copy(en(s.content,e+1,t,n,s)))}if(e>n){let s=r.contentMatchAt(0),o=s.fillBefore(i).append(i);i=o.append(s.matchFragment(o).fillBefore(g.empty,!0))}return i}function ar(i,e,t,n){if(!n.isInline&&e==t&&i.doc.resolve(e).parent.content.size){let r=rr(i.doc,e,n.type);r!=null&&(e=t=r)}i.replaceRange(e,t,new y(g.from(n),0,0))}function hr(i,e,t){let n=i.doc.resolve(e),r=i.doc.resolve(t);if(n.parent.isTextblock&&r.parent.isTextblock&&n.start()!=r.start()&&n.parentOffset==0&&r.parentOffset==0){let o=n.sharedDepth(t),a=!1;for(let l=n.depth;l>o;l--)n.node(l).type.spec.isolating&&(a=!0);for(let l=r.depth;l>o;l--)r.node(l).type.spec.isolating&&(a=!0);if(!a){for(let l=n.depth;l>0&&e==n.start(l);l--)e=n.before(l);for(let l=r.depth;l>0&&t==r.start(l);l--)t=r.before(l);n=i.doc.resolve(e),r=i.doc.resolve(t)}}let s=tn(n,r);for(let o=0;o<s.length;o++){let a=s[o],l=o==s.length-1;if(l&&a==0||n.node(a).type.contentMatch.validEnd)return i.delete(n.start(a),r.end(a));if(a>0&&(l||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return i.delete(n.before(a),r.after(a))}for(let o=1;o<=n.depth&&o<=r.depth;o++)if(e-n.start(o)==n.depth-o&&t>n.end(o)&&r.end(o)-t!=r.depth-o&&n.start(o-1)==r.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),r.index(o-1)))return i.delete(n.before(o),t);i.delete(e,t)}function tn(i,e){let t=[],n=Math.min(i.depth,e.depth);for(let r=n;r>=0;r--){let s=i.start(r);if(s<i.pos-(i.depth-r)||e.end(r)>e.pos+(e.depth-r)||i.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(s==e.start(r)||r==i.depth&&r==e.depth&&i.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==s-1)&&t.push(r)}return t}var Me=class i extends O{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return N.fail("No node at attribute step's position");let n=Object.create(null);for(let s in t.attrs)n[s]=t.attrs[s];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return N.fromReplace(e,this.pos,this.pos+1,new y(g.from(r),0,t.isLeaf?0:1))}getMap(){return J.empty}invert(e){return new i(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new i(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new i(t.pos,t.attr,t.value)}};O.jsonID("attr",Me);var Te=class i extends O{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return N.ok(n)}getMap(){return J.empty}invert(e){return new i(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new i(t.attr,t.value)}};O.jsonID("docAttr",Te);var te=class extends Error{};te=function i(e){let t=Error.call(this,e);return t.__proto__=i.prototype,t};te.prototype=Object.create(Error.prototype);te.prototype.constructor=te;te.prototype.name="TransformError";var Ce=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ue}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new te(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((s,o,a,l)=>{e=Math.min(e,a),t=Math.max(t,l)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=y.empty){let r=ir(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new y(g.from(n),0,0))}delete(e,t){return this.replace(e,t,y.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return lr(this,e,t,n),this}replaceRangeWith(e,t,n){return ar(this,e,t,n),this}deleteRange(e,t){return hr(this,e,t),this}lift(e,t){return Yn(this,e,t),this}join(e,t=1){return nr(this,e,t),this}wrap(e,t){return Zn(this,e,t),this}setBlockType(e,t=e,n,r=null){return jn(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return _n(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new Me(e,t,n)),this}setDocAttribute(e,t){return this.step(new Te(e,t)),this}addNodeMark(e,t){return this.step(new fe(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(t instanceof E)t.isInSet(n.marks)&&this.step(new ee(e,t));else{let r=n.marks,s,o=[];for(;s=t.isInSet(r);)o.push(new ee(e,s)),r=s.removeFromSet(r);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,t=1,n){return er(this,e,t,n),this}addMark(e,t,n){return Vn(this,e,t,n),this}removeMark(e,t,n){return Xn(this,e,t,n),this}clearIncompatible(e,t,n){return Ye(this,e,t,n),this}};var Ge=Object.create(null),R=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Ze(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=y.empty){let n=t.content.lastChild,r=null;for(let a=0;a<t.openEnd;a++)r=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:h}=o[a],c=e.mapping.slice(s);e.replaceRange(c.map(l.pos),c.map(h.pos),a?y.empty:t),a==0&&sn(e,s,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let s=0;s<r.length;s++){let{$from:o,$to:a}=r[s],l=e.mapping.slice(n),h=l.map(o.pos),c=l.map(a.pos);s?e.deleteRange(h,c):(e.replaceRangeWith(h,c,t),sn(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new P(e):ne(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let s=e.depth-1;s>=0;s--){let o=t<0?ne(e.node(0),e.node(s),e.before(s+1),e.index(s),t,n):ne(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Q(e.node(0))}static atStart(e){return ne(e,e,0,0,1)||new Q(e)}static atEnd(e){return ne(e,e,e.content.size,e.childCount,-1)||new Q(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Ge[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ge)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ge[e]=t,t.prototype.jsonID=e,t}getBookmark(){return P.between(this.$anchor,this.$head).getBookmark()}};R.prototype.visible=!0;var Ze=class{constructor(e,t){this.$from=e,this.$to=t}},nn=!1;function rn(i){!nn&&!i.parent.inlineContent&&(nn=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+i.parent.type.name+")"))}var P=class i extends R{constructor(e,t=e){rn(e),rn(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return R.near(n);let r=e.resolve(t.map(this.anchor));return new i(r.parent.inlineContent?r:n,n)}replace(e,t=y.empty){if(super.replace(e,t),t==y.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof i&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Oe(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new i(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let s=R.findFrom(t,n,!0)||R.findFrom(t,-n,!0);if(s)t=s.$head;else return R.near(t,n)}return e.parent.inlineContent||(r==0?e=t:(e=(R.findFrom(e,-n,!0)||R.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=r<0&&(e=t))),new i(e,t)}};R.jsonID("text",P);var Oe=class i{constructor(e,t){this.anchor=e,this.head=t}map(e){return new i(e.map(this.anchor),e.map(this.head))}resolve(e){return P.between(e.resolve(this.anchor),e.resolve(this.head))}},H=class i extends R{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),s=e.resolve(r);return n?R.near(s):new i(s)}content(){return new y(g.from(this.node),0,0)}eq(e){return e instanceof i&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new je(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new i(e.resolve(t.anchor))}static create(e,t){return new i(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};H.prototype.visible=!1;R.jsonID("node",H);var je=class i{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Oe(n,n):new i(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&H.isSelectable(n)?new H(t):R.near(t)}},Q=class i extends R{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=y.empty){if(t==y.empty){e.delete(0,e.doc.content.size);let n=R.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new i(e)}map(e){return new i(e)}eq(e){return e instanceof i}getBookmark(){return cr}};R.jsonID("all",Q);var cr={map(){return this},resolve(i){return new Q(i)}};function ne(i,e,t,n,r,s=!1){if(e.inlineContent)return P.create(i,t);for(let o=n-(r>0?0:1);r>0?o<e.childCount:o>=0;o+=r){let a=e.child(o);if(a.isAtom){if(!s&&H.isSelectable(a))return H.create(i,t-(r<0?a.nodeSize:0))}else{let l=ne(i,a,t+r,r<0?a.childCount:0,r,s);if(l)return l}t+=a.nodeSize*r}return null}function sn(i,e,t){let n=i.steps.length-1;if(n<e)return;let r=i.steps[n];if(!(r instanceof z||r instanceof B))return;let s=i.mapping.maps[n],o;s.forEach((a,l,h,c)=>{o==null&&(o=c)}),i.setSelection(R.near(i.doc.resolve(o),t))}var on=1,Re=2,ln=4,$e=class extends Ce{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|on)&~Re,this.storedMarks=null,this}get selectionSet(){return(this.updated&on)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Re,this}ensureMarks(e){return E.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Re)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Re,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||E.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n==null&&(n=t),!e)return this.deleteRange(t,n);let s=this.storedMarks;if(!s){let o=this.doc.resolve(t);s=n==t?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,s)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(R.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=ln,this}get scrolledIntoView(){return(this.updated&ln)>0}};function an(i,e){return!e||!i?i:i.bind(e)}var G=class{constructor(e,t,n){this.name=e,this.init=an(t.init,n),this.apply=an(t.apply,n)}},fr=[new G("doc",{init(i){return i.doc||i.schema.topNodeType.createAndFill()},apply(i){return i.doc}}),new G("selection",{init(i,e){return i.selection||R.atStart(e.doc)},apply(i){return i.selection}}),new G("storedMarks",{init(i){return i.storedMarks||null},apply(i,e,t,n){return n.selection.$cursor?i.storedMarks:null}}),new G("scrollToSelection",{init(){return 0},apply(i,e){return i.scrolledIntoView?e+1:e}})],ue=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=fr.slice(),t&&t.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new G(n.key,n.spec.state,n))})}},hn=class i{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let s=!1;for(let o=0;o<this.config.plugins.length;o++){let a=this.config.plugins[o];if(a.spec.appendTransaction){let l=r?r[o].n:0,h=r?r[o].state:this,c=l<t.length&&a.spec.appendTransaction.call(a,l?t.slice(l):t,h,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let u=0;u<this.config.plugins.length;u++)r.push(u<o?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),s=!0}r&&(r[o]={state:n,n:t.length})}}if(!s)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new i(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let s=n[r];t[s.name]=s.apply(e,this[s.name],this,t)}return t}get tr(){return new $e(this)}static create(e){let t=new ue(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new i(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new ue(this.schema,e.plugins),n=t.fields,r=new i(t);for(let s=0;s<n.length;s++){let o=n[s].name;r[o]=this.hasOwnProperty(o)?this[o]:n[s].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],s=r.spec.state;s&&s.toJSON&&(t[n]=s.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new ue(e.schema,e.plugins),s=new i(r);return r.fields.forEach(o=>{if(o.name=="doc")s.doc=D.fromJSON(e.schema,t.doc);else if(o.name=="selection")s.selection=R.fromJSON(s.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let a in n){let l=n[a],h=l.spec.state;if(l.key==o.name&&h&&h.fromJSON&&Object.prototype.hasOwnProperty.call(t,a)){s[o.name]=h.fromJSON.call(l,e,t[a],s);return}}s[o.name]=o.init(e,s)}}),s}};function un(i,e,t){for(let n in i){let r=i[n];r instanceof Function?r=r.bind(e):n=="handleDOMEvents"&&(r=un(r,e,{})),t[n]=r}return t}var cn=class{constructor(e){this.spec=e,this.props={},e.props&&un(e.props,this,this.props),this.key=e.key?e.key.key:pn("plugin")}getState(e){return e[this.key]}},Qe=Object.create(null);function pn(i){return i in Qe?i+"$"+ ++Qe[i]:(Qe[i]=0,i+"$")}var fn=class{constructor(e="key"){this.key=pn(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};var dn="showaiTextRangeEdit";function mn(i,e,t,n=!0){let r=e.filter(h=>h.to>h.from).sort((h,c)=>h.from-c.from);if(!r.length)return null;let s=[];for(let h of r){let c=!0;if(i.doc.nodesBetween(h.from,h.to,f=>{!f.isText&&f.isLeaf&&f.type.name!=="hardBreak"&&(c=!1)}),!c||!i.doc.resolve(h.from).sameParent(i.doc.resolve(h.to)))throw new Error("A text edit must stay inside a single text block.");let u=s.at(-1);u&&h.from<=u.to?u.to=Math.max(u.to,h.to):s.push({...h})}let o=i.tr;for(let h of[...s].reverse())o.delete(h.from,h.to);let a=o.mapping.map(s[0].from,-1),l=0;if(n&&t){let h=o.doc.resolve(a),c=i.doc.resolve(s[0].from).marks();if(h.parent.type.spec.code||!t.includes(`
6
6
  `))o.insertText(t,a),l=t.length;else{let u=t.split(/\r?\n/).flatMap((d,m)=>[...m?[i.schema.nodes.hardBreak.create()]:[],...d?[i.schema.text(d,c)]:[]]),f=g.fromArray(u);l=f.size,o.insert(a,f)}}return o.setSelection(P.near(o.doc.resolve(a+l))),o}function gn(i,e=()=>""){let t=i.ownerDocument,n='button,input,textarea,select,summary,[role="button"],[role="slider"],[data-surface-ui],.editor-toolbar,.editor-bubble,.block-handle,.block-menu,[data-surface-handle],script,style,[hidden],svg[aria-hidden="true"],.katex-mathml',r=[],s="",o=null,a=t.createTreeWalker(i,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode(c){if(c instanceof Element){let d=getComputedStyle(c);return c.matches(n)||d.display==="none"||d.visibility==="hidden"?NodeFilter.FILTER_REJECT:c instanceof HTMLIFrameElement||c instanceof HTMLBRElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}let u=c.parentElement;if(!c.textContent||getComputedStyle(u).userSelect==="none"||!c.textContent.trim()&&/[\n\r]/.test(c.textContent)&&!getComputedStyle(u).whiteSpace.startsWith("pre"))return NodeFilter.FILTER_REJECT;let f=t.createRange();return f.selectNodeContents(c),f.getClientRects().length?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}});for(;a.nextNode();){let c=a.currentNode,u=c instanceof HTMLIFrameElement?e(c):c instanceof HTMLBRElement?`
7
7
  `:c.data,f=(c instanceof Element?c:c.parentElement)?.closest("p,div,section,article,li,pre,td,th,h1,h2,h3,h4,h5,h6,blockquote");r.length&&f!==o&&(s+=f?.closest("tr")&&f.closest("tr")===o?.closest("tr")?" ":`
8
- `),o=f??null;let d=s.length;s+=u,r.push({node:c,start:d,end:s.length})}return{entries:r,text:s,offsetAt:(c,u)=>{let f=r.find(d=>d.node===c);return f?f.start+Math.max(0,Math.min(f.end-f.start,u)):null},ranges:(c,u)=>r.flatMap(f=>{if(f.node instanceof HTMLIFrameElement||f.end<=c||f.start>=u)return[];let d=t.createRange();return f.node instanceof HTMLBRElement?d.selectNode(f.node):(d.setStart(f.node,Math.min(f.node.length,Math.max(c-f.start,0))),d.setEnd(f.node,Math.min(f.node.length,u-f.start,f.end-f.start))),[d]})}}var pe=new WeakMap,de=new WeakMap,_e=new WeakMap;function Wr(i){for(let e=i.closest("*");e;e=e.parentElement){let t=_e.get(e);if(t)return t()}return null}var ur=".document-widget,.portable-widget,.page-document-module,.rich-text-component,[data-surface-id],pre,table,.document-callout,.document-toggle";function Hr(i){return pe.set(i.view.dom,i),()=>{pe.delete(i.view.dom)}}function qr(i,e){return de.set(i,{channel:e,text:""}),()=>{de.delete(i)}}function Ur(i,e){let t=de.get(i);t&&typeof e=="string"&&e.length<=256e3&&(t.text=e)}function Vr(i,e){if(!["down","move","up","cancel"].includes(String(e.phase))||![e.x,e.y,e.width,e.height,e.buttons,e.offset].every(n=>typeof n=="number"&&Number.isFinite(n))||Number(e.width)<=0||Number(e.height)<=0)return;let t=i.getBoundingClientRect();i.dispatchEvent(new CustomEvent("showai:text-selection-pointer",{bubbles:!0,detail:{phase:e.phase,buttons:e.buttons,point:{x:t.left+Number(e.x)/Number(e.width)*t.width,y:t.top+Number(e.y)/Number(e.height)*t.height},caret:{node:i,offset:Number(e.offset)}}}))}function Ne(i,e){if(i.caretRangeFromPoint){let n=i.caretRangeFromPoint(e.x,e.y);return n?{node:n.startContainer,offset:n.startOffset}:null}let t=i.caretPositionFromPoint?.(e.x,e.y);return t?{node:t.offsetNode,offset:t.offset}:null}function yn(i){return(i instanceof Element?i:i.parentElement)?.closest(".document-widget,.portable-widget,.page-document-module,.rich-text-component,[data-surface-id]")}function pr(i,e,t){let n=Ne(i.ownerDocument,{x:e,y:t});return!!n&&n.node.nodeType===Node.TEXT_NODE&&i.contains(n.node)&&getComputedStyle(i).userSelect!=="none"}function xn(i,e,t){let n=Math.min(40,(t-e)/3);return n<=0?0:i<e+n?-18*Math.min(1,(e+n-i)/n):i>t-n?18*Math.min(1,(i-t+n)/n):0}function dr(i,e,t){let n=!1,r=!1,s=!1,o=e.getBoundingClientRect();for(let a=i;a&&e.contains(a);a=a.parentElement){if(!(a instanceof HTMLElement))continue;let l=getComputedStyle(a),h=a.getBoundingClientRect(),c=!r&&/auto|scroll/.test(l.overflowX)?xn(t.x,Math.max(0,h.left,o.left),Math.min(innerWidth,h.right,o.right)):0,u=!s&&/auto|scroll/.test(l.overflowY)?xn(t.y,Math.max(0,h.top,o.top),Math.min(innerHeight,h.bottom,o.bottom)):0,f=a.scrollLeft,d=a.scrollTop;if(c&&(a.scrollLeft+=c),u&&(a.scrollTop+=u),(a.scrollLeft!==f||a.scrollTop!==d)&&(n=!0,r||=a.scrollLeft!==f,s||=a.scrollTop!==d,r&&s)||a===e)break}return n}function Xr(i,e="Text selection"){let t=i.ownerDocument,n=t.defaultView,r="showai-text-"+crypto.randomUUID(),s=t.createElement("style");s.textContent=`::highlight(${r}){background:Highlight;color:HighlightText}`,i.append(s);let o=t.createElement("textarea");o.tabIndex=-1,o.hidden=!0,o.dataset.textSelectionInput="true",o.setAttribute("aria-label",e),o.style.cssText="position:fixed;left:-10000px;top:0;width:1px;height:1px;opacity:0;pointer-events:none",i.append(o);let a=n,l=null,h=null,c=0,u=!1,f=!1,d=(p,S,w={})=>{let v=de.get(p);v&&p.contentWindow?.postMessage({channel:v.channel,type:S,...w},"*")},m=()=>{n.cancelAnimationFrame(c),c=0,l=null},x=()=>{a.CSS.highlights?.delete(r);for(let p of i.querySelectorAll("iframe"))d(p,"showai:text-selection-range",{from:0,to:0});h=null,o.value="",t.activeElement===o&&o.blur(),o.hidden=!0,delete i.dataset.textSelection},A=(p,S,w)=>{let v=gn(p,C=>de.get(C)?.text??""),M=v.offsetAt(S.node,S.offset),b=v.offsetAt(w.node,w.offset);if(M===null||b===null)return;let T=Math.min(M,b),k=Math.max(M,b);h={page:p,anchor:S,head:w,model:v,from:T,to:k},o.value=v.text.slice(T,k),o.setSelectionRange(0,o.value.length),a.Highlight&&a.CSS.highlights?a.CSS.highlights.set(r,new a.Highlight(...v.ranges(T,k))):t.getSelection()?.setBaseAndExtent(S.node,S.offset,w.node,w.offset);for(let C of v.entries)C.node instanceof HTMLIFrameElement&&d(C.node,"showai:text-selection-range",{from:Math.max(0,T-C.start),to:Math.min(C.end-C.start,k-C.start)})},L=(p,S,w=Ne(t,S),v)=>{if(!w||p.closest('button,input,textarea,select,summary,[role="button"],[role="slider"],[data-surface-ui],[data-surface-handle],.block-handle,.react-flow,[data-surface-gesture="own"]')||!(w.node instanceof HTMLIFrameElement)&&!pr(p,S.x,S.y))return;let M=p.closest(".container-page");if(!M||!i.contains(M))return;for(let k=M.parentElement?.closest(".container-page");k&&i.contains(k);k=k.parentElement?.closest(".container-page"))M=k;m(),x();for(let k of M.querySelectorAll("iframe"))d(k,"showai:text-selection-content-request");let b=(w.node instanceof Element?w.node:w.node.parentElement)?.closest("[contenteditable]"),T=!b||!pe.get(b)?.isEditable;T&&t.activeElement instanceof HTMLElement&&t.activeElement.blur(),l={page:M,target:p,anchor:w,start:S,point:S,cross:!1,moved:!1,pointer:v,readOnlyStart:T,boundaries:[...M.querySelectorAll(ur)],table:p.closest("table")}},q=p=>{if(!l||!l.moved||!l.anchor.node.isConnected)return;let{page:S,anchor:w,point:v}=l,M=S.getBoundingClientRect(),b={x:Math.max(M.left+2,Math.min(M.right-2,v.x)),y:Math.max(M.top+2,Math.min(innerHeight-2,M.bottom-2,v.y))},T=t.elementFromPoint(b.x,b.y);if(!T||!S.contains(T))return;if(T instanceof HTMLIFrameElement&&!p){let F=T.getBoundingClientRect();d(T,"showai:text-selection-hit",{x:(b.x-F.left)/F.width*T.clientWidth,y:(b.y-F.top)/F.height*T.clientHeight,buttons:1});return}let k=p??Ne(t,b);if(!k||!S.contains(k.node))return;let C=l.cross||l.readOnlyStart||yn(w.node)!==yn(k.node)||!!(l.table&&T.closest("table")!==l.table);if(!C&&!(w.node instanceof HTMLIFrameElement)&&!(k.node instanceof HTMLIFrameElement)){let F=t.createRange(),$=t.createRange();F.setStart(w.node,w.offset),F.collapse(!0),$.setStart(k.node,k.offset),$.collapse(!0),F.compareBoundaryPoints(Range.START_TO_START,$)>0?(F.setStart(k.node,k.offset),F.setEnd(w.node,w.offset)):F.setEnd(k.node,k.offset),C=l.boundaries.some(U=>U.isConnected&&!U.contains(w.node)&&!U.contains(k.node)&&F.intersectsNode(U))}C&&(l.cross||(l.cross=!0,i.dataset.textSelection="true",o.hidden=!1,o.focus({preventScroll:!0}),t.getSelection()?.removeAllRanges()),l.head=k,A(S,w,k))},Z=()=>{if(l){if(l.moved){let p=t.elementFromPoint(Math.max(0,Math.min(innerWidth-1,l.point.x)),Math.max(0,Math.min(innerHeight-1,l.point.y)));if(dr(p&&l.page.contains(p)?p:l.target,l.page,l.point))if(l.cross)q();else if(l.page.querySelector(".selectedCell")){let w=l.page.getBoundingClientRect();t.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0,buttons:1,clientX:l.point.x,clientY:Math.max(w.top+2,Math.min(w.bottom-2,innerHeight-2,l.point.y))}))}else{let w=l.page.getBoundingClientRect(),v=Ne(t,{x:Math.max(w.left+2,Math.min(w.right-2,l.point.x)),y:Math.max(w.top+2,Math.min(innerHeight-2,w.bottom-2,l.point.y))});v&&l.anchor.node instanceof Text&&l.page.contains(v.node)&&t.getSelection()?.setBaseAndExtent(l.anchor.node,Math.min(l.anchor.offset,l.anchor.node.length),v.node,v.offset),q()}}c=n.requestAnimationFrame(Z)}},et=p=>{p.button===0&&p.pointerType==="mouse"&&!p.shiftKey&&!p.metaKey&&!p.ctrlKey&&p.target instanceof Element&&L(p.target,{x:p.clientX,y:p.clientY},void 0,p.pointerId)},tt=p=>{if(!(!l||l.pointer!==void 0&&l.pointer!==p.pointerId)){if(!(p.buttons&1)){m();return}l.point={x:p.clientX,y:p.clientY},l.moved||=Math.hypot(l.point.x-l.start.x,l.point.y-l.start.y)>4,q(),l?.cross&&(p.preventDefault(),p.stopPropagation()),c||(c=n.requestAnimationFrame(Z))}},Ie=()=>{l?.cross&&(q(l.head),u=!0),m()},nt=p=>{l?.cross&&(p.preventDefault(),p.stopImmediatePropagation())},rt=p=>{u&&(u=!1,p.preventDefault(),p.stopPropagation())},j=p=>{if(!h||h.from===h.to)return;if(!h.anchor.node.isConnected||!h.head.node.isConnected){x();return}let S=new Map,w;for(let b of h.model.ranges(h.from,h.to)){let k=(b.startContainer instanceof Element?b.startContainer:b.startContainer.parentElement).closest("[contenteditable]"),C=k&&pe.get(k);if(!C?.isEditable||C.isDestroyed||!C.view.dom.isConnected)continue;let F=C.view.posAtDOM(b.startContainer,b.startOffset),$=C.view.posAtDOM(b.endContainer,b.endOffset);if(F>=$)continue;w??=C;let U=S.get(C)??[];U.push({from:F,to:$}),S.set(C,U)}if(!w){o.value=h.model.text.slice(h.from,h.to),o.setSelectionRange(0,o.value.length);return}let v="text-selection:"+crypto.randomUUID(),M=[...S].sort(([b],[T])=>b.view.dom.contains(T.view.dom)?-1:T.view.dom.contains(b.view.dom)?1:0);x();for(let[b,T]of M){let k=mn(b.state,T,p,b===w);k&&b.view.dispatch(k.setMeta(dn,v))}w.view.focus()},me=p=>{!h||t.activeElement!==o||!p.clipboardData||(p.clipboardData.setData("text/plain",h.model.text.slice(h.from,h.to)),p.preventDefault(),p.stopPropagation(),p.type==="cut"&&j(""))},it=p=>{if(!(!h||t.activeElement!==o)){if((p.metaKey||p.ctrlKey)&&["z","y"].includes(p.key.toLowerCase())){x(),m();return}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(p.key)){p.preventDefault(),p.stopPropagation();let S=["ArrowLeft","ArrowUp","Home"].includes(p.key),w=h.model.ranges(h.from,h.to);S||w.reverse();for(let v of w){let M=S?v.startContainer:v.endContainer,T=(M instanceof Element?M:M.parentElement)?.closest("[contenteditable]"),k=T&&pe.get(T);if(!k?.isEditable||k.isDestroyed||!k.view.dom.isConnected)continue;let C=k.view.posAtDOM(M,S?v.startOffset:v.endOffset);x(),m(),k.commands.focus(C,{scrollIntoView:!1});return}x(),m();return}if(p.key==="Escape"){p.preventDefault(),x(),m();return}p.key==="Backspace"||p.key==="Delete"?(p.preventDefault(),p.stopPropagation(),j("")):p.key==="Enter"&&!p.isComposing&&(p.preventDefault(),p.stopPropagation(),j(`
8
+ `),o=f??null;let d=s.length;s+=u,r.push({node:c,start:d,end:s.length})}return{entries:r,text:s,offsetAt:(c,u)=>{let f=r.find(d=>d.node===c);return f?f.start+Math.max(0,Math.min(f.end-f.start,u)):null},ranges:(c,u)=>r.flatMap(f=>{if(f.node instanceof HTMLIFrameElement||f.end<=c||f.start>=u)return[];let d=t.createRange();return f.node instanceof HTMLBRElement?d.selectNode(f.node):(d.setStart(f.node,Math.min(f.node.length,Math.max(c-f.start,0))),d.setEnd(f.node,Math.min(f.node.length,u-f.start,f.end-f.start))),[d]})}}var pe=new WeakMap,de=new WeakMap,_e=new WeakMap;function Wr(i){for(let e=i.closest("*");e;e=e.parentElement){let t=_e.get(e);if(t)return t()}return null}var ur=".document-widget,.portable-widget,.page-document-module,.rich-text-component,[data-surface-id],pre,table,.document-callout,.document-toggle,.document-stepper";function Hr(i){return pe.set(i.view.dom,i),()=>{pe.delete(i.view.dom)}}function qr(i,e){return de.set(i,{channel:e,text:""}),()=>{de.delete(i)}}function Ur(i,e){let t=de.get(i);t&&typeof e=="string"&&e.length<=256e3&&(t.text=e)}function Vr(i,e){if(!["down","move","up","cancel"].includes(String(e.phase))||![e.x,e.y,e.width,e.height,e.buttons,e.offset].every(n=>typeof n=="number"&&Number.isFinite(n))||Number(e.width)<=0||Number(e.height)<=0)return;let t=i.getBoundingClientRect();i.dispatchEvent(new CustomEvent("showai:text-selection-pointer",{bubbles:!0,detail:{phase:e.phase,buttons:e.buttons,point:{x:t.left+Number(e.x)/Number(e.width)*t.width,y:t.top+Number(e.y)/Number(e.height)*t.height},caret:{node:i,offset:Number(e.offset)}}}))}function Ne(i,e){if(i.caretRangeFromPoint){let n=i.caretRangeFromPoint(e.x,e.y);return n?{node:n.startContainer,offset:n.startOffset}:null}let t=i.caretPositionFromPoint?.(e.x,e.y);return t?{node:t.offsetNode,offset:t.offset}:null}function yn(i){return(i instanceof Element?i:i.parentElement)?.closest(".document-widget,.portable-widget,.page-document-module,.rich-text-component,[data-surface-id]")}function pr(i,e,t){let n=Ne(i.ownerDocument,{x:e,y:t});return!!n&&n.node.nodeType===Node.TEXT_NODE&&i.contains(n.node)&&getComputedStyle(i).userSelect!=="none"}function xn(i,e,t){let n=Math.min(40,(t-e)/3);return n<=0?0:i<e+n?-18*Math.min(1,(e+n-i)/n):i>t-n?18*Math.min(1,(i-t+n)/n):0}function dr(i,e,t){let n=!1,r=!1,s=!1,o=e.getBoundingClientRect();for(let a=i;a&&e.contains(a);a=a.parentElement){if(!(a instanceof HTMLElement))continue;let l=getComputedStyle(a),h=a.getBoundingClientRect(),c=!r&&/auto|scroll/.test(l.overflowX)?xn(t.x,Math.max(0,h.left,o.left),Math.min(innerWidth,h.right,o.right)):0,u=!s&&/auto|scroll/.test(l.overflowY)?xn(t.y,Math.max(0,h.top,o.top),Math.min(innerHeight,h.bottom,o.bottom)):0,f=a.scrollLeft,d=a.scrollTop;if(c&&(a.scrollLeft+=c),u&&(a.scrollTop+=u),(a.scrollLeft!==f||a.scrollTop!==d)&&(n=!0,r||=a.scrollLeft!==f,s||=a.scrollTop!==d,r&&s)||a===e)break}return n}function Xr(i,e="Text selection"){let t=i.ownerDocument,n=t.defaultView,r="showai-text-"+crypto.randomUUID(),s=t.createElement("style");s.textContent=`::highlight(${r}){background:Highlight;color:HighlightText}`,i.append(s);let o=t.createElement("textarea");o.tabIndex=-1,o.hidden=!0,o.dataset.textSelectionInput="true",o.setAttribute("aria-label",e),o.style.cssText="position:fixed;left:-10000px;top:0;width:1px;height:1px;opacity:0;pointer-events:none",i.append(o);let a=n,l=null,h=null,c=0,u=!1,f=!1,d=(p,S,w={})=>{let v=de.get(p);v&&p.contentWindow?.postMessage({channel:v.channel,type:S,...w},"*")},m=()=>{n.cancelAnimationFrame(c),c=0,l=null},x=()=>{a.CSS.highlights?.delete(r);for(let p of i.querySelectorAll("iframe"))d(p,"showai:text-selection-range",{from:0,to:0});h=null,o.value="",t.activeElement===o&&o.blur(),o.hidden=!0,delete i.dataset.textSelection},A=(p,S,w)=>{let v=gn(p,C=>de.get(C)?.text??""),M=v.offsetAt(S.node,S.offset),b=v.offsetAt(w.node,w.offset);if(M===null||b===null)return;let T=Math.min(M,b),k=Math.max(M,b);h={page:p,anchor:S,head:w,model:v,from:T,to:k},o.value=v.text.slice(T,k),o.setSelectionRange(0,o.value.length),a.Highlight&&a.CSS.highlights?a.CSS.highlights.set(r,new a.Highlight(...v.ranges(T,k))):t.getSelection()?.setBaseAndExtent(S.node,S.offset,w.node,w.offset);for(let C of v.entries)C.node instanceof HTMLIFrameElement&&d(C.node,"showai:text-selection-range",{from:Math.max(0,T-C.start),to:Math.min(C.end-C.start,k-C.start)})},L=(p,S,w=Ne(t,S),v)=>{if(!w||p.closest('button,input,textarea,select,summary,[role="button"],[role="slider"],[data-surface-ui],[data-surface-handle],.block-handle,.react-flow,[data-surface-gesture="own"]')||!(w.node instanceof HTMLIFrameElement)&&!pr(p,S.x,S.y))return;let M=p.closest(".container-page");if(!M||!i.contains(M))return;for(let k=M.parentElement?.closest(".container-page");k&&i.contains(k);k=k.parentElement?.closest(".container-page"))M=k;m(),x();for(let k of M.querySelectorAll("iframe"))d(k,"showai:text-selection-content-request");let b=(w.node instanceof Element?w.node:w.node.parentElement)?.closest("[contenteditable]"),T=!b||!pe.get(b)?.isEditable;T&&t.activeElement instanceof HTMLElement&&t.activeElement.blur(),l={page:M,target:p,anchor:w,start:S,point:S,cross:!1,moved:!1,pointer:v,readOnlyStart:T,boundaries:[...M.querySelectorAll(ur)],table:p.closest("table")}},q=p=>{if(!l||!l.moved||!l.anchor.node.isConnected)return;let{page:S,anchor:w,point:v}=l,M=S.getBoundingClientRect(),b={x:Math.max(M.left+2,Math.min(M.right-2,v.x)),y:Math.max(M.top+2,Math.min(innerHeight-2,M.bottom-2,v.y))},T=t.elementFromPoint(b.x,b.y);if(!T||!S.contains(T))return;if(T instanceof HTMLIFrameElement&&!p){let F=T.getBoundingClientRect();d(T,"showai:text-selection-hit",{x:(b.x-F.left)/F.width*T.clientWidth,y:(b.y-F.top)/F.height*T.clientHeight,buttons:1});return}let k=p??Ne(t,b);if(!k||!S.contains(k.node))return;let C=l.cross||l.readOnlyStart||yn(w.node)!==yn(k.node)||!!(l.table&&T.closest("table")!==l.table);if(!C&&!(w.node instanceof HTMLIFrameElement)&&!(k.node instanceof HTMLIFrameElement)){let F=t.createRange(),$=t.createRange();F.setStart(w.node,w.offset),F.collapse(!0),$.setStart(k.node,k.offset),$.collapse(!0),F.compareBoundaryPoints(Range.START_TO_START,$)>0?(F.setStart(k.node,k.offset),F.setEnd(w.node,w.offset)):F.setEnd(k.node,k.offset),C=l.boundaries.some(U=>U.isConnected&&!U.contains(w.node)&&!U.contains(k.node)&&F.intersectsNode(U))}C&&(l.cross||(l.cross=!0,i.dataset.textSelection="true",o.hidden=!1,o.focus({preventScroll:!0}),t.getSelection()?.removeAllRanges()),l.head=k,A(S,w,k))},Z=()=>{if(l){if(l.moved){let p=t.elementFromPoint(Math.max(0,Math.min(innerWidth-1,l.point.x)),Math.max(0,Math.min(innerHeight-1,l.point.y)));if(dr(p&&l.page.contains(p)?p:l.target,l.page,l.point))if(l.cross)q();else if(l.page.querySelector(".selectedCell")){let w=l.page.getBoundingClientRect();t.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0,buttons:1,clientX:l.point.x,clientY:Math.max(w.top+2,Math.min(w.bottom-2,innerHeight-2,l.point.y))}))}else{let w=l.page.getBoundingClientRect(),v=Ne(t,{x:Math.max(w.left+2,Math.min(w.right-2,l.point.x)),y:Math.max(w.top+2,Math.min(innerHeight-2,w.bottom-2,l.point.y))});v&&l.anchor.node instanceof Text&&l.page.contains(v.node)&&t.getSelection()?.setBaseAndExtent(l.anchor.node,Math.min(l.anchor.offset,l.anchor.node.length),v.node,v.offset),q()}}c=n.requestAnimationFrame(Z)}},et=p=>{p.button===0&&p.pointerType==="mouse"&&!p.shiftKey&&!p.metaKey&&!p.ctrlKey&&p.target instanceof Element&&L(p.target,{x:p.clientX,y:p.clientY},void 0,p.pointerId)},tt=p=>{if(!(!l||l.pointer!==void 0&&l.pointer!==p.pointerId)){if(!(p.buttons&1)){m();return}l.point={x:p.clientX,y:p.clientY},l.moved||=Math.hypot(l.point.x-l.start.x,l.point.y-l.start.y)>4,q(),l?.cross&&(p.preventDefault(),p.stopPropagation()),c||(c=n.requestAnimationFrame(Z))}},Ie=()=>{l?.cross&&(q(l.head),u=!0),m()},nt=p=>{l?.cross&&(p.preventDefault(),p.stopImmediatePropagation())},rt=p=>{u&&(u=!1,p.preventDefault(),p.stopPropagation())},j=p=>{if(!h||h.from===h.to)return;if(!h.anchor.node.isConnected||!h.head.node.isConnected){x();return}let S=new Map,w;for(let b of h.model.ranges(h.from,h.to)){let k=(b.startContainer instanceof Element?b.startContainer:b.startContainer.parentElement).closest("[contenteditable]"),C=k&&pe.get(k);if(!C?.isEditable||C.isDestroyed||!C.view.dom.isConnected)continue;let F=C.view.posAtDOM(b.startContainer,b.startOffset),$=C.view.posAtDOM(b.endContainer,b.endOffset);if(F>=$)continue;w??=C;let U=S.get(C)??[];U.push({from:F,to:$}),S.set(C,U)}if(!w){o.value=h.model.text.slice(h.from,h.to),o.setSelectionRange(0,o.value.length);return}let v="text-selection:"+crypto.randomUUID(),M=[...S].sort(([b],[T])=>b.view.dom.contains(T.view.dom)?-1:T.view.dom.contains(b.view.dom)?1:0);x();for(let[b,T]of M){let k=mn(b.state,T,p,b===w);k&&b.view.dispatch(k.setMeta(dn,v))}w.view.focus()},me=p=>{!h||t.activeElement!==o||!p.clipboardData||(p.clipboardData.setData("text/plain",h.model.text.slice(h.from,h.to)),p.preventDefault(),p.stopPropagation(),p.type==="cut"&&j(""))},it=p=>{if(!(!h||t.activeElement!==o)){if((p.metaKey||p.ctrlKey)&&["z","y"].includes(p.key.toLowerCase())){x(),m();return}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(p.key)){p.preventDefault(),p.stopPropagation();let S=["ArrowLeft","ArrowUp","Home"].includes(p.key),w=h.model.ranges(h.from,h.to);S||w.reverse();for(let v of w){let M=S?v.startContainer:v.endContainer,T=(M instanceof Element?M:M.parentElement)?.closest("[contenteditable]"),k=T&&pe.get(T);if(!k?.isEditable||k.isDestroyed||!k.view.dom.isConnected)continue;let C=k.view.posAtDOM(M,S?v.startOffset:v.endOffset);x(),m(),k.commands.focus(C,{scrollIntoView:!1});return}x(),m();return}if(p.key==="Escape"){p.preventDefault(),x(),m();return}p.key==="Backspace"||p.key==="Delete"?(p.preventDefault(),p.stopPropagation(),j("")):p.key==="Enter"&&!p.isComposing&&(p.preventDefault(),p.stopPropagation(),j(`
9
9
  `))}},wn=p=>{if(!f){let S=p;j(S.inputType.startsWith("delete")?"":S.data??o.value)}},kn=()=>{f=!0},Sn=()=>{f=!1,j(o.value)},st=p=>{h&&t.activeElement===o&&(p.preventDefault(),p.stopPropagation(),j(p.clipboardData?.getData("text/plain")??""))},ot=p=>{h&&p.target!==o&&(x(),m())},lt=p=>{p.button===0&&(m(),x(),u=!1)},at=p=>{if(!(p.target instanceof Element))return;let{phase:S,point:w,caret:v,buttons:M}=p.detail;S==="down"?L(p.target,w,v):S==="move"&&l&&M&1?(l.point=w,l.moved||=Math.hypot(w.x-l.start.x,w.y-l.start.y)>4,q(v),c||(c=n.requestAnimationFrame(Z))):S==="up"?Ie():S==="cancel"&&m()},ht=()=>m();return t.addEventListener("focusin",ot,!0),t.addEventListener("pointerdown",lt,!0),i.addEventListener("pointerdown",et,!0),t.addEventListener("pointermove",tt,!0),t.addEventListener("mousemove",nt,!0),t.addEventListener("pointerup",Ie,!0),t.addEventListener("pointercancel",m,!0),i.addEventListener("click",rt,!0),t.addEventListener("copy",me,!0),t.addEventListener("cut",me,!0),t.addEventListener("keydown",it,!0),t.addEventListener("paste",st,!0),o.addEventListener("input",wn),o.addEventListener("compositionstart",kn),o.addEventListener("compositionend",Sn),i.addEventListener("showai:text-selection-pointer",at),n.addEventListener("blur",ht),_e.set(i,()=>h&&h.to>h.from?{ranges:h.model.ranges(h.from,h.to),text:h.model.text.slice(h.from,h.to)}:null),()=>{_e.delete(i),m(),x(),s.remove(),o.remove(),t.removeEventListener("focusin",ot,!0),t.removeEventListener("pointerdown",lt,!0),i.removeEventListener("pointerdown",et,!0),t.removeEventListener("pointermove",tt,!0),t.removeEventListener("mousemove",nt,!0),t.removeEventListener("pointerup",Ie,!0),t.removeEventListener("pointercancel",m,!0),i.removeEventListener("click",rt,!0),t.removeEventListener("copy",me,!0),t.removeEventListener("cut",me,!0),t.removeEventListener("keydown",it,!0),t.removeEventListener("paste",st,!0),i.removeEventListener("showai:text-selection-pointer",at),n.removeEventListener("blur",ht)}}export{gn as a,g as b,E as c,y as d,De as e,dt as f,gt as g,kt as h,Ue as i,Y as j,z as k,B as l,wr as m,kr as n,Sr as o,Er as p,vr as q,br as r,ir as s,Ce as t,R as u,Ze as v,P as w,H as x,Q as y,hn as z,cn as A,fn as B,dn as C,Wr as D,Hr as E,qr as F,Ur as G,Vr as H,pr as I,Xr as J};
@@ -1 +1 @@
1
- import{F as h,G as g,H as p,a as m}from"./chunk-5HKZMSJF.js";import{c as E}from"./chunk-6WTBCWHP.js";import{c as x}from"./chunk-DCANE7XH.js";var w=Object.freeze({archify:["workflow","architecture","sequence","dataflow","lifecycle","erd","class","tree","timeline","waterfall"],"diagram-design":["architecture","architecture-delta","axonometric-plan","bar","data-flow","db-schema","dependency","deployment","dp-integration","dp-security-matrix","er","exploded","fishbone","flowchart","gantt","heatmap","high-level","it-state","journey","kanban","layers","line","loop","medallion","nested","org-chart","polar","process","pyramid","quadrant","radar","sankey","scatter","sequence","service-blueprint","state","story-map","swimlane","timeline","tree","treemap","uml-class","venn","wardley","waterfall"],"fireworks-tech-graph":Array.from({length:12},(o,t)=>`style-${t+1}`)});function T(o,t){if(!Object.hasOwn(w,o))throw new Error(`Unknown diagram family: ${o}.`);if(!t||typeof t!="object"||Array.isArray(t))throw new Error("\u56FE\u5F62\u6570\u636E\u5FC5\u987B\u662F\u5BF9\u8C61\u3002");for(let r of Object.keys(t))if(!["template","source","title","description","height","presentation"].includes(r))throw new Error(`\u4E0D\u652F\u6301\u7684\u56FE\u5F62\u5B57\u6BB5\uFF1A${r}\u3002`);if(!w[o].includes(t.template)&&t.template!=="custom")throw new Error("\u8BF7\u9009\u62E9\u8BE5\u7EC4\u4EF6\u63D0\u4F9B\u7684\u6A21\u677F\uFF0C\u6216\u4F7F\u7528 custom \u5BFC\u5165\u56FE\u5F62\u6E90\u7801\u3002");for(let r of["title","description"])if(t[r]!==void 0&&(typeof t[r]!="string"||t[r].length>2e3))throw new Error(`${r} \u5FC5\u987B\u662F\u6700\u591A 2000 \u5B57\u7B26\u7684\u6587\u672C\u3002`);if(t.height!==void 0&&(!Number.isFinite(t.height)||t.height<240||t.height>1200))throw new Error("\u56FE\u5F62\u9AD8\u5EA6\u987B\u5728 240\u20131200 px \u4E4B\u95F4\u3002");if(t.source!==void 0){if(typeof t.source!="string"||!t.source.trim())throw new Error("\u56FE\u5F62\u6E90\u7801\u987B\u4E3A\u975E\u7A7A\u7684 SVG \u6216 HTML \u6587\u672C\u3002");if(new TextEncoder().encode(t.source).byteLength>8*1024*1024)throw new Error("\u56FE\u5F62\u6E90\u7801\u8D85\u8FC7 8 MiB \u4E0A\u9650\u3002");if(!/<svg\b/i.test(t.source))throw new Error("\u56FE\u5F62\u6E90\u7801\u987B\u5305\u542B SVG\u3002JSON \u8F93\u5165\u8BF7\u5148\u7528\u539F\u9879\u76EE\u6E32\u67D3\u5668\u751F\u6210 SVG \u6216 HTML\u3002")}if(t.template==="custom"&&t.source===void 0)throw new Error("\u81EA\u5B9A\u4E49\u56FE\u5F62\u987B\u63D0\u4F9B source\u3002");if(t.presentation!==void 0){let r=t.presentation;if(!r||typeof r!="object"||Array.isArray(r))throw new Error("presentation \u5FC5\u987B\u662F\u663E\u793A\u8BBE\u7F6E\u5BF9\u8C61\u3002");for(let n of Object.keys(r))if(!["title","description","notes","legend","controls"].includes(n))throw new Error(`\u4E0D\u652F\u6301\u7684\u663E\u793A\u8BBE\u7F6E\uFF1A${n}\u3002`);for(let n of["title","description"])if(r[n]!==void 0&&!["inside","outside","hidden"].includes(r[n]))throw new Error(`${n} \u7684\u663E\u793A\u4F4D\u7F6E\u65E0\u6548\u3002`);if(r.notes!==void 0&&!["inline","details","hidden"].includes(r.notes))throw new Error("\u8BF4\u660E\u6587\u5B57\u7684\u663E\u793A\u65B9\u5F0F\u65E0\u6548\u3002");for(let n of["legend","controls"])if(r[n]!==void 0&&typeof r[n]!="boolean")throw new Error(`${n} \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002`)}}function S(o,t){let r="showai-frame-text-"+o,n=document.createElement("style");n.textContent=`::highlight(${r}){background:Highlight;color:HighlightText}`,document.head.append(n);let a=window,c=0,b=(e,i)=>{let s=document.caretRangeFromPoint(e,i);return s?t(document.body).offsetAt(s.startContainer,s.startOffset):null},f=()=>parent.postMessage({channel:o,type:"showai:text-selection-content",text:t(document.body).text.slice(0,256e3)},"*"),l=(e,i,s,u)=>{let d=b(i,s);d!==null&&(c=d),parent.postMessage({channel:o,type:"showai:text-selection-pointer",phase:e,x:i,y:s,width:innerWidth,height:innerHeight,buttons:u,offset:c},"*")};window.addEventListener("message",e=>{if(!(e.source!==parent||e.data?.channel!==o))if(e.data.type==="showai:text-selection-content-request")f();else if(e.data.type==="showai:text-selection-range"){let{from:i,to:s}=e.data;if(!Number.isFinite(i)||!Number.isFinite(s))return;if(s>i){let u=t(document.body);a.Highlight&&a.CSS.highlights&&a.CSS.highlights.set(r,new a.Highlight(...u.ranges(Math.max(0,i),Math.min(u.text.length,s)))),document.getSelection()?.removeAllRanges()}else a.CSS.highlights?.delete(r)}else e.data.type==="showai:text-selection-hit"&&[e.data.x,e.data.y].every(Number.isFinite)&&l("move",e.data.x,e.data.y,1)}),document.addEventListener("pointerdown",e=>{if(e.button!==0||e.pointerType!=="mouse"||e.shiftKey||e.metaKey||e.ctrlKey||!(e.target instanceof Element)||e.target.closest('button,input,textarea,select,summary,[role="button"],[role="slider"],[data-surface-ui],.react-flow,[data-surface-gesture="own"]')||getComputedStyle(e.target).userSelect==="none")return;let i=document.caretRangeFromPoint(e.clientX,e.clientY);i?.startContainer.nodeType!==Node.TEXT_NODE||!e.target.contains(i.startContainer)||(f(),l("down",e.clientX,e.clientY,e.buttons))},!0),document.addEventListener("pointermove",e=>{e.pointerType==="mouse"&&e.buttons&1&&l("move",e.clientX,e.clientY,e.buttons)},!0),document.addEventListener("pointerup",e=>l("up",e.clientX,e.clientY,e.buttons),!0),document.addEventListener("pointercancel",e=>l("cancel",e.clientX,e.clientY,e.buttons),!0)}function C(o){return`(${S.toString()})(${JSON.stringify(o)},${m.toString()});`}var y=x(E(),1);function F(o,t){(0,y.useEffect)(()=>{let r=o.current,n=h(r,t),a=c=>{c.source!==r.contentWindow||c.data?.channel!==t||(c.data.type==="showai:text-selection-pointer"&&p(r,c.data),c.data.type==="showai:text-selection-content"&&g(r,c.data.text))};return window.addEventListener("message",a),()=>{n(),window.removeEventListener("message",a)}},[t,o])}export{w as a,T as b,C as c,F as d};
1
+ import{F as h,G as g,H as p,a as m}from"./chunk-NLCSXEUT.js";import{c as E}from"./chunk-JTQMPH6V.js";import{c as x}from"./chunk-DCANE7XH.js";var w=Object.freeze({archify:["workflow","architecture","sequence","dataflow","lifecycle","erd","class","tree","timeline","waterfall"],"diagram-design":["architecture","architecture-delta","axonometric-plan","bar","data-flow","db-schema","dependency","deployment","dp-integration","dp-security-matrix","er","exploded","fishbone","flowchart","gantt","heatmap","high-level","it-state","journey","kanban","layers","line","loop","medallion","nested","org-chart","polar","process","pyramid","quadrant","radar","sankey","scatter","sequence","service-blueprint","state","story-map","swimlane","timeline","tree","treemap","uml-class","venn","wardley","waterfall"],"fireworks-tech-graph":Array.from({length:12},(o,t)=>`style-${t+1}`)});function T(o,t){if(!Object.hasOwn(w,o))throw new Error(`Unknown diagram family: ${o}.`);if(!t||typeof t!="object"||Array.isArray(t))throw new Error("\u56FE\u5F62\u6570\u636E\u5FC5\u987B\u662F\u5BF9\u8C61\u3002");for(let r of Object.keys(t))if(!["template","source","title","description","height","presentation"].includes(r))throw new Error(`\u4E0D\u652F\u6301\u7684\u56FE\u5F62\u5B57\u6BB5\uFF1A${r}\u3002`);if(!w[o].includes(t.template)&&t.template!=="custom")throw new Error("\u8BF7\u9009\u62E9\u8BE5\u7EC4\u4EF6\u63D0\u4F9B\u7684\u6A21\u677F\uFF0C\u6216\u4F7F\u7528 custom \u5BFC\u5165\u56FE\u5F62\u6E90\u7801\u3002");for(let r of["title","description"])if(t[r]!==void 0&&(typeof t[r]!="string"||t[r].length>2e3))throw new Error(`${r} \u5FC5\u987B\u662F\u6700\u591A 2000 \u5B57\u7B26\u7684\u6587\u672C\u3002`);if(t.height!==void 0&&(!Number.isFinite(t.height)||t.height<240||t.height>1200))throw new Error("\u56FE\u5F62\u9AD8\u5EA6\u987B\u5728 240\u20131200 px \u4E4B\u95F4\u3002");if(t.source!==void 0){if(typeof t.source!="string"||!t.source.trim())throw new Error("\u56FE\u5F62\u6E90\u7801\u987B\u4E3A\u975E\u7A7A\u7684 SVG \u6216 HTML \u6587\u672C\u3002");if(new TextEncoder().encode(t.source).byteLength>8*1024*1024)throw new Error("\u56FE\u5F62\u6E90\u7801\u8D85\u8FC7 8 MiB \u4E0A\u9650\u3002");if(!/<svg\b/i.test(t.source))throw new Error("\u56FE\u5F62\u6E90\u7801\u987B\u5305\u542B SVG\u3002JSON \u8F93\u5165\u8BF7\u5148\u7528\u539F\u9879\u76EE\u6E32\u67D3\u5668\u751F\u6210 SVG \u6216 HTML\u3002")}if(t.template==="custom"&&t.source===void 0)throw new Error("\u81EA\u5B9A\u4E49\u56FE\u5F62\u987B\u63D0\u4F9B source\u3002");if(t.presentation!==void 0){let r=t.presentation;if(!r||typeof r!="object"||Array.isArray(r))throw new Error("presentation \u5FC5\u987B\u662F\u663E\u793A\u8BBE\u7F6E\u5BF9\u8C61\u3002");for(let n of Object.keys(r))if(!["title","description","notes","legend","controls"].includes(n))throw new Error(`\u4E0D\u652F\u6301\u7684\u663E\u793A\u8BBE\u7F6E\uFF1A${n}\u3002`);for(let n of["title","description"])if(r[n]!==void 0&&!["inside","outside","hidden"].includes(r[n]))throw new Error(`${n} \u7684\u663E\u793A\u4F4D\u7F6E\u65E0\u6548\u3002`);if(r.notes!==void 0&&!["inline","details","hidden"].includes(r.notes))throw new Error("\u8BF4\u660E\u6587\u5B57\u7684\u663E\u793A\u65B9\u5F0F\u65E0\u6548\u3002");for(let n of["legend","controls"])if(r[n]!==void 0&&typeof r[n]!="boolean")throw new Error(`${n} \u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002`)}}function S(o,t){let r="showai-frame-text-"+o,n=document.createElement("style");n.textContent=`::highlight(${r}){background:Highlight;color:HighlightText}`,document.head.append(n);let a=window,c=0,b=(e,i)=>{let s=document.caretRangeFromPoint(e,i);return s?t(document.body).offsetAt(s.startContainer,s.startOffset):null},f=()=>parent.postMessage({channel:o,type:"showai:text-selection-content",text:t(document.body).text.slice(0,256e3)},"*"),l=(e,i,s,u)=>{let d=b(i,s);d!==null&&(c=d),parent.postMessage({channel:o,type:"showai:text-selection-pointer",phase:e,x:i,y:s,width:innerWidth,height:innerHeight,buttons:u,offset:c},"*")};window.addEventListener("message",e=>{if(!(e.source!==parent||e.data?.channel!==o))if(e.data.type==="showai:text-selection-content-request")f();else if(e.data.type==="showai:text-selection-range"){let{from:i,to:s}=e.data;if(!Number.isFinite(i)||!Number.isFinite(s))return;if(s>i){let u=t(document.body);a.Highlight&&a.CSS.highlights&&a.CSS.highlights.set(r,new a.Highlight(...u.ranges(Math.max(0,i),Math.min(u.text.length,s)))),document.getSelection()?.removeAllRanges()}else a.CSS.highlights?.delete(r)}else e.data.type==="showai:text-selection-hit"&&[e.data.x,e.data.y].every(Number.isFinite)&&l("move",e.data.x,e.data.y,1)}),document.addEventListener("pointerdown",e=>{if(e.button!==0||e.pointerType!=="mouse"||e.shiftKey||e.metaKey||e.ctrlKey||!(e.target instanceof Element)||e.target.closest('button,input,textarea,select,summary,[role="button"],[role="slider"],[data-surface-ui],.react-flow,[data-surface-gesture="own"]')||getComputedStyle(e.target).userSelect==="none")return;let i=document.caretRangeFromPoint(e.clientX,e.clientY);i?.startContainer.nodeType!==Node.TEXT_NODE||!e.target.contains(i.startContainer)||(f(),l("down",e.clientX,e.clientY,e.buttons))},!0),document.addEventListener("pointermove",e=>{e.pointerType==="mouse"&&e.buttons&1&&l("move",e.clientX,e.clientY,e.buttons)},!0),document.addEventListener("pointerup",e=>l("up",e.clientX,e.clientY,e.buttons),!0),document.addEventListener("pointercancel",e=>l("cancel",e.clientX,e.clientY,e.buttons),!0)}function C(o){return`(${S.toString()})(${JSON.stringify(o)},${m.toString()});`}var y=x(E(),1);function F(o,t){(0,y.useEffect)(()=>{let r=o.current,n=h(r,t),a=c=>{c.source!==r.contentWindow||c.data?.channel!==t||(c.data.type==="showai:text-selection-pointer"&&p(r,c.data),c.data.type==="showai:text-selection-content"&&g(r,c.data.text))};return window.addEventListener("message",a),()=>{n(),window.removeEventListener("message",a)}},[t,o])}export{w as a,T as b,C as c,F as d};
@@ -1 +1 @@
1
- import{a as b,c as y,e as x}from"./chunk-55FJSXTX.js";var s=e=>{throw new Error(e)},E=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function u(e,n,o){(typeof e!="string"||!e.trim())&&s(`${n} must be non-empty text.`),e.length>o&&s(`${n} must be at most ${o} characters.`)}function f(e,n,o){e!==void 0&&u(e,n,o)}function j(e,n,o,i=1){return(!Array.isArray(e)||e.length<i||e.length>o)&&s(`${n} must be an array of ${i} to ${o} items.`),e.forEach((l,a)=>{E(l)||s(`${n}[${a}] must be an object.`)}),e}function A(e,n,o){for(let i of Object.keys(e))n.includes(i)||s(`${o}.${i} is not a supported field.`)}function d(e,n){if(e===void 0)return;let[o]=x(e);o!==void 0&&s(`${n} links to ${o}; only http(s), mailto, # anchors and relative paths are allowed.`)}var w=["dir","file","object","array","field"],I=["name","kind","type","badge","summary","detail","example","exampleLang","children","open"],p={siblings:60,nodes:400,depth:8},g=e=>e.replace(/\/+$/,"")||e,T=e=>e.split("/").filter(Boolean).join("/"),C=e=>e.kind??(e.children?.length?"dir":"file");function U(e){let n=new Map,o=[],i=(l,a,m,h)=>{for(let t of l??[]){let c=(a?`${a}/`:"")+g(t.name),r={node:t,path:c,depth:m,parent:a,kind:C(t),children:[]};n.set(c,r),h.push(c),i(t.children,c,m+1,r.children)}};return i(e,null,0,o),{items:n,roots:o}}function L(e){f(e.caption,"caption",600),d(e.caption,"caption");let n=0,o=new Set,i=(l,a,m,h)=>{h>p.depth&&s(`${a} is nested deeper than ${p.depth} levels.`),j(l,a,p.siblings),l.forEach((t,c)=>{let r=`${a}[${c}]`;n+=1,n>p.nodes&&s(`The structure has more than ${p.nodes} nodes.`),A(t,I,r),u(t.name,`${r}.name`,80),g(t.name).includes("/")&&s(`${r}.name may only end with "/"; it is one path segment.`);let $=(m?`${m}/`:"")+g(t.name);o.has($)&&s(`${r}.name repeats the path ${$}; sibling names must be unique.`),o.add($),t.kind!==void 0&&!w.includes(t.kind)&&s(`${r}.kind must be one of ${w.join(", ")}.`),f(t.type,`${r}.type`,80),f(t.badge,`${r}.badge`,16),f(t.summary,`${r}.summary`,300),f(t.detail,`${r}.detail`,3e3),f(t.example,`${r}.example`,6e3),f(t.exampleLang,`${r}.exampleLang`,24),d(t.summary,`${r}.summary`),d(t.detail,`${r}.detail`),t.exampleLang!==void 0&&t.example===void 0&&s(`${r}.exampleLang needs ${r}.example.`),t.open!==void 0&&typeof t.open!="boolean"&&s(`${r}.open must be true or false.`),t.children!==void 0&&i(t.children,`${r}.children`,$,h+1)})};if(i(e.nodes,"nodes",null,1),e.initial!==void 0){u(e.initial,"initial",400);let l=T(e.initial);o.has(l)||s(`initial ${e.initial} does not match a node path.`)}}var k=["brand","teal","warm","violet","rose","slate"],S=["tile","row"],R=["icon","title","body","href","tag","tone"];function K(e){if(e.columns)return e.columns;let n=e.cards.length;return e.variant==="row"?n>3?2:1:n===4?2:Math.max(1,Math.min(3,n))}function D(e){e.variant!==void 0&&!S.includes(e.variant)&&s(`variant must be one of ${S.join(", ")}.`),e.columns!==void 0&&(!Number.isInteger(e.columns)||e.columns<1||e.columns>4)&&s("columns must be an integer from 1 to 4."),j(e.cards,"cards",24).forEach((n,o)=>{let i=`cards[${o}]`;A(n,R,i),u(n.title,`${i}.title`,80),u(n.body,`${i}.body`,400),f(n.icon,`${i}.icon`,8),f(n.tag,`${i}.tag`,16),n.tone!==void 0&&!k.includes(n.tone)&&s(`${i}.tone must be one of ${k.join(", ")}.`),n.href!==void 0?(u(n.href,`${i}.href`,2e3),b(n.href)||s(`${i}.href must be an http(s), mailto, # anchor or relative link.`),y(n.body).some(l=>l.type==="link")&&s(`${i}.body cannot contain links when the card has an href.`)):d(n.body,`${i}.body`)})}function M(e,n){return E(n)||s("Component data must be an object."),f(n.title,"title",120),e==="structure-browser"?L(n):e==="card-grid"?D(n):s(`Unknown document browsing component ${e}.`),n}export{g as a,T as b,U as c,k as d,K as e,M as f};
1
+ import{a as b,c as y,e as x}from"./chunk-2URYNZTR.js";var s=e=>{throw new Error(e)},E=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function u(e,n,o){(typeof e!="string"||!e.trim())&&s(`${n} must be non-empty text.`),e.length>o&&s(`${n} must be at most ${o} characters.`)}function f(e,n,o){e!==void 0&&u(e,n,o)}function j(e,n,o,i=1){return(!Array.isArray(e)||e.length<i||e.length>o)&&s(`${n} must be an array of ${i} to ${o} items.`),e.forEach((l,a)=>{E(l)||s(`${n}[${a}] must be an object.`)}),e}function A(e,n,o){for(let i of Object.keys(e))n.includes(i)||s(`${o}.${i} is not a supported field.`)}function d(e,n){if(e===void 0)return;let[o]=x(e);o!==void 0&&s(`${n} links to ${o}; only http(s), mailto, # anchors and relative paths are allowed.`)}var w=["dir","file","object","array","field"],I=["name","kind","type","badge","summary","detail","example","exampleLang","children","open"],p={siblings:60,nodes:400,depth:8},g=e=>e.replace(/\/+$/,"")||e,T=e=>e.split("/").filter(Boolean).join("/"),C=e=>e.kind??(e.children?.length?"dir":"file");function U(e){let n=new Map,o=[],i=(l,a,m,h)=>{for(let t of l??[]){let c=(a?`${a}/`:"")+g(t.name),r={node:t,path:c,depth:m,parent:a,kind:C(t),children:[]};n.set(c,r),h.push(c),i(t.children,c,m+1,r.children)}};return i(e,null,0,o),{items:n,roots:o}}function L(e){f(e.caption,"caption",600),d(e.caption,"caption");let n=0,o=new Set,i=(l,a,m,h)=>{h>p.depth&&s(`${a} is nested deeper than ${p.depth} levels.`),j(l,a,p.siblings),l.forEach((t,c)=>{let r=`${a}[${c}]`;n+=1,n>p.nodes&&s(`The structure has more than ${p.nodes} nodes.`),A(t,I,r),u(t.name,`${r}.name`,80),g(t.name).includes("/")&&s(`${r}.name may only end with "/"; it is one path segment.`);let $=(m?`${m}/`:"")+g(t.name);o.has($)&&s(`${r}.name repeats the path ${$}; sibling names must be unique.`),o.add($),t.kind!==void 0&&!w.includes(t.kind)&&s(`${r}.kind must be one of ${w.join(", ")}.`),f(t.type,`${r}.type`,80),f(t.badge,`${r}.badge`,16),f(t.summary,`${r}.summary`,300),f(t.detail,`${r}.detail`,3e3),f(t.example,`${r}.example`,6e3),f(t.exampleLang,`${r}.exampleLang`,24),d(t.summary,`${r}.summary`),d(t.detail,`${r}.detail`),t.exampleLang!==void 0&&t.example===void 0&&s(`${r}.exampleLang needs ${r}.example.`),t.open!==void 0&&typeof t.open!="boolean"&&s(`${r}.open must be true or false.`),t.children!==void 0&&i(t.children,`${r}.children`,$,h+1)})};if(i(e.nodes,"nodes",null,1),e.initial!==void 0){u(e.initial,"initial",400);let l=T(e.initial);o.has(l)||s(`initial ${e.initial} does not match a node path.`)}}var k=["brand","teal","warm","violet","rose","slate"],S=["tile","row"],R=["icon","title","body","href","tag","tone"];function K(e){if(e.columns)return e.columns;let n=e.cards.length;return e.variant==="row"?n>3?2:1:n===4?2:Math.max(1,Math.min(3,n))}function D(e){e.variant!==void 0&&!S.includes(e.variant)&&s(`variant must be one of ${S.join(", ")}.`),e.columns!==void 0&&(!Number.isInteger(e.columns)||e.columns<1||e.columns>4)&&s("columns must be an integer from 1 to 4."),j(e.cards,"cards",24).forEach((n,o)=>{let i=`cards[${o}]`;A(n,R,i),u(n.title,`${i}.title`,80),u(n.body,`${i}.body`,400),f(n.icon,`${i}.icon`,8),f(n.tag,`${i}.tag`,16),n.tone!==void 0&&!k.includes(n.tone)&&s(`${i}.tone must be one of ${k.join(", ")}.`),n.href!==void 0?(u(n.href,`${i}.href`,2e3),b(n.href)||s(`${i}.href must be an http(s), mailto, # anchor or relative link.`),y(n.body).some(l=>l.type==="link")&&s(`${i}.body cannot contain links when the card has an href.`)):d(n.body,`${i}.body`)})}function M(e,n){return E(n)||s("Component data must be an object."),f(n.title,"title",120),e==="structure-browser"?L(n):e==="card-grid"?D(n):s(`Unknown document browsing component ${e}.`),n}export{g as a,T as b,U as c,k as d,K as e,M as f};
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-6WTBCWHP.js";import{a as e}from"./chunk-J6IRWTF7.js";a(`.sb-block.an-block{--an-text: var(--text, #222222);--an-muted: var(--muted, #6a6a6a);--an-line: var(--line, #dddddd);--an-paper: var(--paper, #ffffff);--an-surface: var(--surface, #fafafa);--an-accent: var(--accent, #120a8f);--an-accent-soft: var(--accent-soft, #eeedf9);--an-good: #2f6b4f;--an-good-soft: #e6efe9;--an-bad: #b0473f;--an-bad-soft: #f8e7e5;--an-warn: #a86b34;--an-warn-soft: #f6ece2;--an-info: #3b74b8;--an-info-soft: #e5eff8;--an-idle: #8a918c;--an-idle-soft: #f1f2ee;color:var(--an-text);font-family:inherit;font-size:14px;line-height:1.55;padding:8px 0;container-type:inline-size;overflow-wrap:anywhere}:root[data-theme=dark] .an-block,[data-theme=dark] .an-block{--an-good: #7cc3a0;--an-good-soft: #20352b;--an-bad: #e48b83;--an-bad-soft: #3b2423;--an-warn: #e0a96f;--an-warn-soft: #3a2c1e;--an-info: #8bb8eb;--an-info-soft: #1f2d3d;--an-idle: #a3aaa5;--an-idle-soft: #2a2c2b}.an-block *{box-sizing:border-box}.an-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;margin-bottom:12px}.an-title{font-size:17px;font-weight:700;margin:0}.an-sub{color:var(--an-muted);font-size:13px;margin:0}.an-tools{margin-left:auto;display:flex;flex-wrap:wrap;gap:6px;align-items:center}.an-block .an-chip{border:1px solid var(--an-line);background:var(--an-paper);color:var(--an-muted);border-radius:999px;padding:3px 10px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}.an-chip[aria-pressed=true]{border-color:currentColor;background:var(--an-surface);color:var(--an-text)}.an-chip:focus-visible,.an-item:focus-visible,.an-col-button:focus-visible,.an-row:focus-visible{outline:2px solid var(--an-accent);outline-offset:2px}.an-panel{background:var(--an-paper);border:1px solid var(--an-line);border-radius:12px;padding:12px;min-width:0}.an-panel-title{font-size:12.5px;font-weight:700;margin:0 0 8px}.an-empty{color:var(--an-muted);font-size:13px;padding:12px 0}.an-static{margin-top:10px;font-size:13px}.an-static summary{cursor:pointer;color:var(--an-muted)}.an-static table{border-collapse:collapse;width:100%;margin-top:8px}.an-static th,.an-static td{border-bottom:1px solid var(--an-line);padding:4px 6px;text-align:left;vertical-align:top}.an-tone-yes{--tone: var(--an-good);--tone-soft: var(--an-good-soft)}.an-tone-no{--tone: var(--an-bad);--tone-soft: var(--an-bad-soft)}.an-tone-partial{--tone: var(--an-warn);--tone-soft: var(--an-warn-soft)}.an-tone-neutral{--tone: var(--an-info);--tone-soft: var(--an-info-soft)}.an-tone-na{--tone: var(--an-idle);--tone-soft: transparent}.an-matrix-scroll{overflow-x:auto}.an-matrix{border-collapse:separate;border-spacing:0;width:100%;min-width:560px}.an-matrix th,.an-matrix td{padding:8px 10px;border-bottom:1px solid var(--an-line);text-align:left;vertical-align:top}.an-matrix thead th{font-size:13px;white-space:nowrap;border-bottom-width:2px}.an-matrix .an-rowhead{position:sticky;left:0;z-index:1;background:var(--an-paper);width:180px;min-width:140px}.an-row-label{font-weight:600}.an-row-hint{color:var(--an-muted);font-size:11.5px;margin-top:2px}.an-group-row th{background:var(--an-surface);color:var(--an-muted);font-size:12px;letter-spacing:.04em}.an-col-button{all:unset;cursor:pointer;display:block}.an-col-note{display:block;font-weight:500;font-size:11.5px;color:var(--an-muted);white-space:normal}.an-matrix .is-highlight{background:var(--an-accent-soft);box-shadow:inset 2px 0 var(--an-accent),inset -2px 0 var(--an-accent)}.an-matrix thead .is-highlight{color:var(--an-accent)}.an-matrix .is-focus{background:var(--an-surface);box-shadow:inset 2px 0 var(--an-text),inset -2px 0 var(--an-text)}.an-matrix.has-focus td:not(.is-focus):not(.is-highlight):not(.an-rowhead){opacity:.55}.an-matrix tbody tr:hover td,.an-matrix tbody tr:hover th{background-image:linear-gradient(var(--an-surface),var(--an-surface))}.an-cell{display:inline-flex;gap:5px;align-items:baseline;color:var(--tone);background:var(--tone-soft);border-radius:6px;padding:1px 6px;line-height:1.5;white-space:nowrap}.an-cell span{color:var(--an-text)}.an-tone-na.an-cell,.an-tone-na.an-cell span{color:var(--an-idle);padding:0}.an-note-mark{color:var(--an-muted);font-size:11px;vertical-align:super}.an-legend{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:8px;font-size:12px;color:var(--an-muted)}.an-legend b{color:var(--tone)}.an-tree-layout{display:flex;gap:16px;align-items:flex-start}.an-tree{flex:none;max-width:100%;position:relative}.an-tree svg{position:absolute;inset:0;overflow:visible}.an-root{position:absolute;border-radius:14px;background:var(--an-text);color:var(--an-paper);padding:12px 14px;display:flex;flex-direction:column;justify-content:center;font-size:13px;font-weight:600;line-height:1.45}.an-root small{opacity:.7;font-size:11px;font-weight:500}.an-group{position:absolute;background:var(--an-paper);border:1px solid var(--an-line);border-radius:12px;padding:8px 12px;display:flex;flex-direction:column;justify-content:center;gap:5px}.an-group-top{display:flex;align-items:baseline;gap:6px;font-size:13.5px}.an-group-top span{margin-left:auto;font-size:11.5px;color:var(--an-muted)}.an-group-summary{font-size:11px;color:var(--an-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.an-bar{display:flex;height:6px;border-radius:3px;overflow:hidden;background:var(--an-idle-soft)}.an-block .an-item{position:absolute;display:flex;align-items:center;gap:8px;padding:0 10px 0 6px;border-radius:9px;border:1px solid var(--an-line);background:var(--an-paper);font:inherit;font-size:12.5px;color:var(--an-text);text-align:left;cursor:pointer;transition:opacity .15s}.an-item.is-selected{border-color:var(--tone);background:var(--tone-soft)}.an-item.is-dim{opacity:.3}.an-mark{width:20px;height:20px;flex-shrink:0;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:var(--tone);background:var(--tone-soft)}.an-st-done .an-mark{color:var(--an-paper);background:var(--tone)}.an-st-todo .an-mark{border:1px dashed var(--tone)}.an-st-active .an-mark{animation:an-pulse 1.4s ease-in-out infinite}.an-item-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-st-failed .an-item-label{color:var(--an-muted);text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--an-bad) 55%,transparent)}.an-item-result{max-width:48%;font-size:11px;color:var(--an-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-st-done .an-item-result{color:var(--tone)}.an-item-source{font-size:10.5px;color:var(--an-muted);white-space:nowrap}.an-detail{width:300px;flex-shrink:0;position:sticky;top:8px;display:flex;flex-direction:column;gap:10px}.an-detail h4{font-size:15px;margin:4px 0 8px;line-height:1.4}.an-pill{display:inline-block;font-size:12px;font-weight:600;color:var(--tone);background:var(--tone-soft);border-radius:999px;padding:2px 10px}.an-field{margin-top:12px}.an-field small{display:block;font-size:11.5px;color:var(--an-muted);margin-bottom:3px}.an-result-box{margin-top:12px;padding:10px 12px;border-radius:10px;background:var(--tone-soft)}.an-tags{display:flex;flex-wrap:wrap;gap:5px}.an-tag{font-size:12px;font-weight:600;padding:2px 8px;border-radius:6px;background:var(--an-idle-soft)}@keyframes an-pulse{0%,to{opacity:1}50%{opacity:.35}}.an-tracker{background:var(--an-surface);border:1px solid var(--an-line);border-radius:14px;padding:14px}.an-tracker-grid{display:grid;grid-template-columns:250px minmax(0,1fr) 250px;gap:16px;align-items:stretch}.an-runs{display:flex;flex-direction:column;padding:0;min-height:0}.an-runs-head{padding:10px 12px 8px;border-bottom:1px solid var(--an-line)}.an-runs-list{overflow-y:auto;flex:1 1 0;min-height:0}.an-row{display:grid;grid-template-columns:16px 40px minmax(0,1fr) auto;align-items:center;gap:6px;padding:7px 10px;font-size:12px;cursor:pointer;border-bottom:1px solid var(--an-idle-soft)}.an-row:hover{background:var(--an-surface)}.an-row.is-selected{background:var(--an-accent-soft)}.an-row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-row-name small{display:block;font-size:10.5px;color:var(--an-muted)}.an-score{font-variant-numeric:tabular-nums;font-weight:600}.an-status{font-size:10.5px;font-weight:600;color:var(--tone);background:var(--tone-soft);border-radius:999px;padding:0 7px;white-space:nowrap}.an-ex-kept{--tone: var(--an-good);--tone-soft: var(--an-good-soft)}.an-ex-discarded{--tone: var(--an-idle);--tone-soft: var(--an-idle-soft)}.an-ex-failed{--tone: var(--an-bad);--tone-soft: var(--an-bad-soft)}.an-ex-running{--tone: var(--an-info);--tone-soft: var(--an-info-soft)}.an-ex-stopped{--tone: var(--an-warn);--tone-soft: var(--an-warn-soft)}.an-main{display:flex;flex-direction:column;gap:12px;min-width:0}.an-plot-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--an-muted);padding:0 4px 6px;align-items:center}.an-plot-legend b{color:var(--an-text);font-size:13px}.an-plot{position:relative}.an-plot svg{display:block}.an-plot text{fill:var(--an-muted);font-size:11px}.an-grid-line{stroke:var(--an-line);stroke-dasharray:3 5}.an-frontier{fill:none;stroke:var(--an-good);stroke-width:2.5;stroke-linejoin:round}.an-baseline{stroke:var(--an-warn);stroke-dasharray:6 4}.an-plot .an-baseline-label{fill:var(--an-warn)}.an-lane{fill:var(--an-idle-soft)}.an-point{cursor:pointer}.an-point-kept{fill:var(--an-good)}.an-point-other{fill:var(--an-paper);stroke:var(--an-idle);stroke-width:1.6}.an-point-label{font-weight:600}.an-plot .an-point-label.is-frontier{fill:var(--an-good)}.an-ring{animation:an-ring 1.8s ease-out infinite;transform-box:fill-box;transform-origin:center}@keyframes an-ring{0%{opacity:.9;transform:scale(.6)}to{opacity:0;transform:scale(1.6)}}.an-tip{position:absolute;width:220px;pointer-events:none;background:var(--an-text);color:var(--an-paper);border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.6;box-shadow:0 10px 30px #0003}.an-tip span{display:block;opacity:.75}.an-small-multiples{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.an-mini text{fill:var(--an-muted);font-size:10px}.an-mini-values{display:flex;flex-wrap:wrap;gap:2px 10px;font-size:11px;color:var(--an-muted);min-height:17px}.an-stats{display:flex;flex-direction:column;gap:8px}.an-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.an-stat{background:var(--an-paper);border:1px solid var(--an-line);border-radius:10px;padding:8px 10px;min-width:0}.an-stat.is-wide{grid-column:1 / -1}.an-stat small{display:block;font-size:11.5px;color:var(--an-muted)}.an-stat-value{display:block;font-size:21px;font-variant-numeric:tabular-nums;line-height:1.3;white-space:nowrap}.an-stat-unit{font-style:normal;font-size:12px;font-weight:500;color:var(--an-muted);margin-left:3px}.an-stat p{margin:0;font-size:10.5px;color:var(--an-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-meter{height:5px;border-radius:3px;background:var(--an-idle-soft);margin-top:6px;position:relative}.an-meter i{position:absolute;inset:0 auto 0 0;border-radius:3px;background:var(--an-good)}.an-meter i.is-total{background:var(--an-line)}.an-detail-card{background:var(--an-text);color:var(--an-paper);border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.6}.an-detail-card span{display:block;opacity:.75}@container (max-width: 980px){.an-tracker-grid{grid-template-columns:minmax(0,1fr)}.an-runs{order:3;max-height:320px}.an-stats{order:2}.an-stat-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.an-tree-layout{flex-direction:column}.an-detail{width:100%;position:static}}@media(prefers-reduced-motion:reduce){.an-ring,.an-st-active .an-mark{animation:none}}@media print{.an-tools,.an-tip{display:none}.an-runs-list{overflow:visible}}
1
+ import{a}from"./chunk-JTQMPH6V.js";import{a as e}from"./chunk-J6IRWTF7.js";a(`.sb-block.an-block{--an-text: var(--text, #222222);--an-muted: var(--muted, #6a6a6a);--an-line: var(--line, #dddddd);--an-paper: var(--paper, #ffffff);--an-surface: var(--surface, #fafafa);--an-accent: var(--accent, #120a8f);--an-accent-soft: var(--accent-soft, #eeedf9);--an-good: #2f6b4f;--an-good-soft: #e6efe9;--an-bad: #b0473f;--an-bad-soft: #f8e7e5;--an-warn: #a86b34;--an-warn-soft: #f6ece2;--an-info: #3b74b8;--an-info-soft: #e5eff8;--an-idle: #8a918c;--an-idle-soft: #f1f2ee;color:var(--an-text);font-family:inherit;font-size:14px;line-height:1.55;padding:8px 0;container-type:inline-size;overflow-wrap:anywhere}:root[data-theme=dark] .an-block,[data-theme=dark] .an-block{--an-good: #7cc3a0;--an-good-soft: #20352b;--an-bad: #e48b83;--an-bad-soft: #3b2423;--an-warn: #e0a96f;--an-warn-soft: #3a2c1e;--an-info: #8bb8eb;--an-info-soft: #1f2d3d;--an-idle: #a3aaa5;--an-idle-soft: #2a2c2b}.an-block *{box-sizing:border-box}.an-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;margin-bottom:12px}.an-title{font-size:17px;font-weight:700;margin:0}.an-sub{color:var(--an-muted);font-size:13px;margin:0}.an-tools{margin-left:auto;display:flex;flex-wrap:wrap;gap:6px;align-items:center}.an-block .an-chip{border:1px solid var(--an-line);background:var(--an-paper);color:var(--an-muted);border-radius:999px;padding:3px 10px;font:inherit;font-size:12px;font-weight:600;cursor:pointer}.an-chip[aria-pressed=true]{border-color:currentColor;background:var(--an-surface);color:var(--an-text)}.an-chip:focus-visible,.an-item:focus-visible,.an-col-button:focus-visible,.an-row:focus-visible{outline:2px solid var(--an-accent);outline-offset:2px}.an-panel{background:var(--an-paper);border:1px solid var(--an-line);border-radius:12px;padding:12px;min-width:0}.an-panel-title{font-size:12.5px;font-weight:700;margin:0 0 8px}.an-empty{color:var(--an-muted);font-size:13px;padding:12px 0}.an-static{margin-top:10px;font-size:13px}.an-static summary{cursor:pointer;color:var(--an-muted)}.an-static table{border-collapse:collapse;width:100%;margin-top:8px}.an-static th,.an-static td{border-bottom:1px solid var(--an-line);padding:4px 6px;text-align:left;vertical-align:top}.an-tone-yes{--tone: var(--an-good);--tone-soft: var(--an-good-soft)}.an-tone-no{--tone: var(--an-bad);--tone-soft: var(--an-bad-soft)}.an-tone-partial{--tone: var(--an-warn);--tone-soft: var(--an-warn-soft)}.an-tone-neutral{--tone: var(--an-info);--tone-soft: var(--an-info-soft)}.an-tone-na{--tone: var(--an-idle);--tone-soft: transparent}.an-matrix-scroll{overflow-x:auto}.an-matrix{border-collapse:separate;border-spacing:0;width:100%;min-width:560px}.an-matrix th,.an-matrix td{padding:8px 10px;border-bottom:1px solid var(--an-line);text-align:left;vertical-align:top}.an-matrix thead th{font-size:13px;white-space:nowrap;border-bottom-width:2px}.an-matrix .an-rowhead{position:sticky;left:0;z-index:1;background:var(--an-paper);width:180px;min-width:140px}.an-row-label{font-weight:600}.an-row-hint{color:var(--an-muted);font-size:11.5px;margin-top:2px}.an-group-row th{background:var(--an-surface);color:var(--an-muted);font-size:12px;letter-spacing:.04em}.an-col-button{all:unset;cursor:pointer;display:block}.an-col-note{display:block;font-weight:500;font-size:11.5px;color:var(--an-muted);white-space:normal}.an-matrix .is-highlight{background:var(--an-accent-soft);box-shadow:inset 2px 0 var(--an-accent),inset -2px 0 var(--an-accent)}.an-matrix thead .is-highlight{color:var(--an-accent)}.an-matrix .is-focus{background:var(--an-surface);box-shadow:inset 2px 0 var(--an-text),inset -2px 0 var(--an-text)}.an-matrix.has-focus td:not(.is-focus):not(.is-highlight):not(.an-rowhead){opacity:.55}.an-matrix tbody tr:hover td,.an-matrix tbody tr:hover th{background-image:linear-gradient(var(--an-surface),var(--an-surface))}.an-cell{display:inline-flex;gap:5px;align-items:baseline;color:var(--tone);background:var(--tone-soft);border-radius:6px;padding:1px 6px;line-height:1.5;white-space:nowrap}.an-cell span{color:var(--an-text)}.an-tone-na.an-cell,.an-tone-na.an-cell span{color:var(--an-idle);padding:0}.an-note-mark{color:var(--an-muted);font-size:11px;vertical-align:super}.an-legend{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:8px;font-size:12px;color:var(--an-muted)}.an-legend b{color:var(--tone)}.an-tree-layout{display:flex;gap:16px;align-items:flex-start}.an-tree{flex:none;max-width:100%;position:relative}.an-tree svg{position:absolute;inset:0;overflow:visible}.an-root{position:absolute;border-radius:14px;background:var(--an-text);color:var(--an-paper);padding:12px 14px;display:flex;flex-direction:column;justify-content:center;font-size:13px;font-weight:600;line-height:1.45}.an-root small{opacity:.7;font-size:11px;font-weight:500}.an-group{position:absolute;background:var(--an-paper);border:1px solid var(--an-line);border-radius:12px;padding:8px 12px;display:flex;flex-direction:column;justify-content:center;gap:5px}.an-group-top{display:flex;align-items:baseline;gap:6px;font-size:13.5px}.an-group-top span{margin-left:auto;font-size:11.5px;color:var(--an-muted)}.an-group-summary{font-size:11px;color:var(--an-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.an-bar{display:flex;height:6px;border-radius:3px;overflow:hidden;background:var(--an-idle-soft)}.an-block .an-item{position:absolute;display:flex;align-items:center;gap:8px;padding:0 10px 0 6px;border-radius:9px;border:1px solid var(--an-line);background:var(--an-paper);font:inherit;font-size:12.5px;color:var(--an-text);text-align:left;cursor:pointer;transition:opacity .15s}.an-item.is-selected{border-color:var(--tone);background:var(--tone-soft)}.an-item.is-dim{opacity:.3}.an-mark{width:20px;height:20px;flex-shrink:0;border-radius:6px;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:var(--tone);background:var(--tone-soft)}.an-st-done .an-mark{color:var(--an-paper);background:var(--tone)}.an-st-todo .an-mark{border:1px dashed var(--tone)}.an-st-active .an-mark{animation:an-pulse 1.4s ease-in-out infinite}.an-item-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-st-failed .an-item-label{color:var(--an-muted);text-decoration:line-through;text-decoration-color:color-mix(in srgb,var(--an-bad) 55%,transparent)}.an-item-result{max-width:48%;font-size:11px;color:var(--an-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-st-done .an-item-result{color:var(--tone)}.an-item-source{font-size:10.5px;color:var(--an-muted);white-space:nowrap}.an-detail{width:300px;flex-shrink:0;position:sticky;top:8px;display:flex;flex-direction:column;gap:10px}.an-detail h4{font-size:15px;margin:4px 0 8px;line-height:1.4}.an-pill{display:inline-block;font-size:12px;font-weight:600;color:var(--tone);background:var(--tone-soft);border-radius:999px;padding:2px 10px}.an-field{margin-top:12px}.an-field small{display:block;font-size:11.5px;color:var(--an-muted);margin-bottom:3px}.an-result-box{margin-top:12px;padding:10px 12px;border-radius:10px;background:var(--tone-soft)}.an-tags{display:flex;flex-wrap:wrap;gap:5px}.an-tag{font-size:12px;font-weight:600;padding:2px 8px;border-radius:6px;background:var(--an-idle-soft)}@keyframes an-pulse{0%,to{opacity:1}50%{opacity:.35}}.an-tracker{background:var(--an-surface);border:1px solid var(--an-line);border-radius:14px;padding:14px}.an-tracker-grid{display:grid;grid-template-columns:250px minmax(0,1fr) 250px;gap:16px;align-items:stretch}.an-runs{display:flex;flex-direction:column;padding:0;min-height:0}.an-runs-head{padding:10px 12px 8px;border-bottom:1px solid var(--an-line)}.an-runs-list{overflow-y:auto;flex:1 1 0;min-height:0}.an-row{display:grid;grid-template-columns:16px 40px minmax(0,1fr) auto;align-items:center;gap:6px;padding:7px 10px;font-size:12px;cursor:pointer;border-bottom:1px solid var(--an-idle-soft)}.an-row:hover{background:var(--an-surface)}.an-row.is-selected{background:var(--an-accent-soft)}.an-row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-row-name small{display:block;font-size:10.5px;color:var(--an-muted)}.an-score{font-variant-numeric:tabular-nums;font-weight:600}.an-status{font-size:10.5px;font-weight:600;color:var(--tone);background:var(--tone-soft);border-radius:999px;padding:0 7px;white-space:nowrap}.an-ex-kept{--tone: var(--an-good);--tone-soft: var(--an-good-soft)}.an-ex-discarded{--tone: var(--an-idle);--tone-soft: var(--an-idle-soft)}.an-ex-failed{--tone: var(--an-bad);--tone-soft: var(--an-bad-soft)}.an-ex-running{--tone: var(--an-info);--tone-soft: var(--an-info-soft)}.an-ex-stopped{--tone: var(--an-warn);--tone-soft: var(--an-warn-soft)}.an-main{display:flex;flex-direction:column;gap:12px;min-width:0}.an-plot-legend{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--an-muted);padding:0 4px 6px;align-items:center}.an-plot-legend b{color:var(--an-text);font-size:13px}.an-plot{position:relative}.an-plot svg{display:block}.an-plot text{fill:var(--an-muted);font-size:11px}.an-grid-line{stroke:var(--an-line);stroke-dasharray:3 5}.an-frontier{fill:none;stroke:var(--an-good);stroke-width:2.5;stroke-linejoin:round}.an-baseline{stroke:var(--an-warn);stroke-dasharray:6 4}.an-plot .an-baseline-label{fill:var(--an-warn)}.an-lane{fill:var(--an-idle-soft)}.an-point{cursor:pointer}.an-point-kept{fill:var(--an-good)}.an-point-other{fill:var(--an-paper);stroke:var(--an-idle);stroke-width:1.6}.an-point-label{font-weight:600}.an-plot .an-point-label.is-frontier{fill:var(--an-good)}.an-ring{animation:an-ring 1.8s ease-out infinite;transform-box:fill-box;transform-origin:center}@keyframes an-ring{0%{opacity:.9;transform:scale(.6)}to{opacity:0;transform:scale(1.6)}}.an-tip{position:absolute;width:220px;pointer-events:none;background:var(--an-text);color:var(--an-paper);border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.6;box-shadow:0 10px 30px #0003}.an-tip span{display:block;opacity:.75}.an-small-multiples{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}.an-mini text{fill:var(--an-muted);font-size:10px}.an-mini-values{display:flex;flex-wrap:wrap;gap:2px 10px;font-size:11px;color:var(--an-muted);min-height:17px}.an-stats{display:flex;flex-direction:column;gap:8px}.an-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.an-stat{background:var(--an-paper);border:1px solid var(--an-line);border-radius:10px;padding:8px 10px;min-width:0}.an-stat.is-wide{grid-column:1 / -1}.an-stat small{display:block;font-size:11.5px;color:var(--an-muted)}.an-stat-value{display:block;font-size:21px;font-variant-numeric:tabular-nums;line-height:1.3;white-space:nowrap}.an-stat-unit{font-style:normal;font-size:12px;font-weight:500;color:var(--an-muted);margin-left:3px}.an-stat p{margin:0;font-size:10.5px;color:var(--an-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.an-meter{height:5px;border-radius:3px;background:var(--an-idle-soft);margin-top:6px;position:relative}.an-meter i{position:absolute;inset:0 auto 0 0;border-radius:3px;background:var(--an-good)}.an-meter i.is-total{background:var(--an-line)}.an-detail-card{background:var(--an-text);color:var(--an-paper);border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.6}.an-detail-card span{display:block;opacity:.75}@container (max-width: 980px){.an-tracker-grid{grid-template-columns:minmax(0,1fr)}.an-runs{order:3;max-height:320px}.an-stats{order:2}.an-stat-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.an-tree-layout{flex-direction:column}.an-detail{width:100%;position:static}}@media(prefers-reduced-motion:reduce){.an-ring,.an-st-active .an-mark{animation:none}}@media print{.an-tools,.an-tip{display:none}.an-runs-list{overflow:visible}}
2
2
  `);var n=e("analysis",{"zh-CN":{"matrix.title":"\u5BF9\u6BD4\u77E9\u9635","matrix.legend.yes":"\u91C7\u7528 / \u6EE1\u8DB3","matrix.legend.no":"\u4E0D\u91C7\u7528 / \u4E0D\u6EE1\u8DB3","matrix.legend.partial":"\u90E8\u5206\u6216\u6709\u6539\u52A8","matrix.legend.neutral":"\u4E2D\u6027\u8BF4\u660E","matrix.legend.na":"\u672A\u6D89\u53CA","matrix.diffOnly":"\u53EA\u770B\u5DEE\u5F02 {count}/{total}","matrix.clearFocus":"\u53D6\u6D88\u805A\u7126","matrix.dimension":"\u7EF4\u5EA6","matrix.source":"\u6765\u6E90 \u2197","matrix.allSame":"\u6240\u6709\u7EF4\u5EA6\u5728\u5404\u5217\u4E4B\u95F4\u90FD\u76F8\u540C\u3002","matrix.focusHint":"\u70B9\u51FB\u5217\u5934\u53EF\u805A\u7126\u4E00\u5217","matrix.notes":"\u6CE8\u91CA","matrix.note":"{column} \xB7 {row}\uFF1A{note}","tree.title":"\u72B6\u6001\u6811","tree.status.done":"\u8D70\u901A","tree.status.active":"\u8FDB\u884C\u4E2D","tree.status.failed":"\u6CA1\u8D70\u901A","tree.status.todo":"\u5F85\u63A2\u7D22","tree.status.paused":"\u6401\u7F6E","tree.highlightByStatus":"\u6309\u72B6\u6001\u7A81\u51FA","tree.question":"\u95EE\u9898","tree.source":"\u6765\u6E90\uFF1A{source}","tree.detail":"\u8BF4\u660E","tree.result":"\u7ED3\u679C","tree.links":"\u5173\u8054","tree.overall":"\u6574\u4F53\u8FDB\u5EA6","tree.readAll":"\u6309\u7C7B\u522B\u9605\u8BFB\u5168\u90E8\u6761\u76EE\uFF08{count}\uFF09","tree.itemResult":"{label}\uFF1A{result}","tracker.title":"\u5B9E\u9A8C\u8FFD\u8E2A","tracker.status.kept":"\u4FDD\u7559","tracker.status.discarded":"\u653E\u5F03","tracker.status.failed":"\u5931\u8D25","tracker.status.running":"\u8FD0\u884C\u4E2D","tracker.status.stopped":"\u5DF2\u505C\u6B62","tracker.overTime":"{metric} \u968F\u65F6\u95F4\u7684\u5206\u5E03","tracker.noScore":"\u65E0\u5206\u6570","tracker.baseline":"\u57FA\u7EBF {value}","tracker.startTime":"\u5F00\u59CB\u65F6\u95F4 \u2192","tracker.minutes":"{count} \u5206\u949F","tracker.metricValue":"{metric}\uFF1A{value}","tracker.best":"\u6700\u4F73","tracker.updatedAt":"\u66F4\u65B0\u4E8E {time}","tracker.runs":"\u8FD0\u884C \xB7 {count}","tracker.filterByStatus":"\u6309\u72B6\u6001\u7B5B\u9009","tracker.all":"\u5168\u90E8","tracker.showRun":"\u5728\u66F2\u7EBF\u4E2D\u663E\u793A {id}","tracker.allExperiments":"\u5168\u90E8\u5B9E\u9A8C \xB7 {metric}","tracker.higherIsBetter":"\u8D8A\u9AD8\u8D8A\u597D","tracker.lowerIsBetter":"\u8D8A\u4F4E\u8D8A\u597D","tracker.frontier":"\u2014 \u6700\u4F18\u524D\u6CBF","tracker.legendKept":"\u25CF \u4FDD\u7559","tracker.legendOther":"\u25CB \u5176\u4ED6","tracker.listSeparator":"\u3001","tracker.runsHint":"\u6A2A\u8F74\u4E3A\u8BAD\u7EC3\u6B65\uFF1B\u5728\u5DE6\u4FA7\u52FE\u9009\u4EE5\u663E\u793A\u6216\u9690\u85CF","tracker.total":"\u5B9E\u9A8C\u603B\u6570","tracker.runningCount":"\u8FD0\u884C\u4E2D {count}","tracker.groupBest":"{group}\u6700\u4F73","tracker.currentBest":"\u5F53\u524D\u6700\u4F73","tracker.gain":"\u6BD4\u57FA\u7EBF\u6539\u5584","tracker.gainDetail":"\u524D\u6CBF\u4E0A\u7684\u6700\u4F73 {best} \xB7 \u57FA\u7EBF {baseline}","tracker.keepRate":"\u4FDD\u7559\u7387","tracker.keepRateDetail":"\u4FDD\u7559 {kept} \xB7 \u8FD0\u884C\u4E2D {running}","tracker.resourceHours":"{unit} \xB7 \u65F6","tracker.budget":"\u9884\u7B97 {value}","tracker.cost":"\u4F30\u7B97\u6210\u672C","tracker.costRate":"\u6309 {rate} / {unit}\xB7\u65F6","tracker.byCategory":"\u6309\u65B9\u5411 \xB7 \u4FDD\u7559 / \u603B\u6570","tracker.readTable":"\u4EE5\u8868\u683C\u9605\u8BFB\u5168\u90E8\u5B9E\u9A8C\uFF08{count}\uFF09","tracker.column.name":"\u540D\u79F0","tracker.column.start":"\u5F00\u59CB","tracker.column.status":"\u72B6\u6001","tracker.column.note":"\u5907\u6CE8"},en:{"matrix.title":"Comparison matrix","matrix.legend.yes":"Adopted / met","matrix.legend.no":"Not adopted / not met","matrix.legend.partial":"Partly or with changes","matrix.legend.neutral":"Neutral note","matrix.legend.na":"Not covered","matrix.diffOnly":"Differences only {count}/{total}","matrix.clearFocus":"Clear focus","matrix.dimension":"Dimension","matrix.source":"Source \u2197","matrix.allSame":"Every dimension is the same across all columns.","matrix.focusHint":"Click a column header to focus it","matrix.notes":"Notes","matrix.note":"{column} \xB7 {row}: {note}","tree.title":"Status tree","tree.status.done":"Worked","tree.status.active":"In progress","tree.status.failed":"Didn't work","tree.status.todo":"To explore","tree.status.paused":"On hold","tree.highlightByStatus":"Highlight by status","tree.question":"Question","tree.source":"Source: {source}","tree.detail":"Details","tree.result":"Result","tree.links":"Related","tree.overall":"Overall progress","tree.readAll":"Read all items by category ({count})","tree.itemResult":"{label}: {result}","tracker.title":"Experiment tracker","tracker.status.kept":"Kept","tracker.status.discarded":"Discarded","tracker.status.failed":"Failed","tracker.status.running":"Running","tracker.status.stopped":"Stopped","tracker.overTime":"{metric} over time","tracker.noScore":"No score","tracker.baseline":"Baseline {value}","tracker.startTime":"Start time \u2192","tracker.minutes":"{count} min","tracker.metricValue":"{metric}: {value}","tracker.best":"Best","tracker.updatedAt":"Updated {time}","tracker.runs":"Runs \xB7 {count}","tracker.filterByStatus":"Filter by status","tracker.all":"All","tracker.showRun":"Show {id} in charts","tracker.allExperiments":"All experiments \xB7 {metric}","tracker.higherIsBetter":"higher is better","tracker.lowerIsBetter":"lower is better","tracker.frontier":"\u2014 Best frontier","tracker.legendKept":"\u25CF Kept","tracker.legendOther":"\u25CB Other","tracker.listSeparator":", ","tracker.runsHint":"X-axis shows training steps; check runs on the left to show or hide them","tracker.total":"Experiments","tracker.runningCount":"Running {count}","tracker.groupBest":"Best in {group}","tracker.currentBest":"Current best","tracker.gain":"Gain over baseline","tracker.gainDetail":"Best on the frontier {best} \xB7 baseline {baseline}","tracker.keepRate":"Keep rate","tracker.keepRateDetail":"Kept {kept} \xB7 running {running}","tracker.resourceHours":"{unit} hours","tracker.budget":"Budget {value}","tracker.cost":"Estimated cost","tracker.costRate":"At {rate} per {unit} hour","tracker.byCategory":"By direction \xB7 kept / total","tracker.readTable":"Read all experiments as a table ({count})","tracker.column.name":"Name","tracker.column.start":"Start","tracker.column.status":"Status","tracker.column.note":"Notes"}});export{n as a};
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-5AW2WUSZ.js";import{a as y,c as $,jb as E,ma as x,mb as K,na as L}from"./chunk-6WTBCWHP.js";import{f as S}from"./chunk-J6IRWTF7.js";import{c as f}from"./chunk-DCANE7XH.js";var i=f($(),1);y(`.viewport-lock-button{position:absolute;top:8px;right:8px;z-index:30;display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid var(--sb-line, var(--line, #e9ece5));border-radius:6px;background:var(--sb-surface, var(--paper, #fff));color:var(--sb-muted, var(--muted, #92968f));cursor:pointer}.viewport-lock-button[aria-pressed=false]{color:var(--accent, #120a8f)}.viewport-lock-button:hover{background:var(--sb-hover, var(--hover, #f0f2ed))}.viewport-lock-button:focus-visible{outline:2px solid var(--accent, #120a8f);outline-offset:2px}.viewport-lock-error{display:none;position:absolute;top:100%;right:0;width:220px;padding:8px;background:var(--paper, #fff);color:var(--text, #343a35);font-size:11px}.viewport-lock-button:hover .viewport-lock-error,.viewport-lock-button:focus-visible .viewport-lock-error{display:block}[data-viewport-locked=true]>.surface-scroll{touch-action:pan-y;overscroll-behavior:auto}.sf-block[data-viewport-locked=true] .react-flow__pane,.sf-block[data-viewport-locked=true] .react-flow__node{touch-action:pan-y;cursor:auto}.sb-header:has(~.viewport-lock-button){right:42px}.sb-header.has-caption:has(~.viewport-lock-button){right:auto;padding-right:42px}.sb-header.has-caption:has(~.viewport-lock-button)>.sb-actions{right:42px}.sb-g2-chart:has(>.viewport-lock-button)>.sb-g2-toolbar{padding-right:42px}@media print{.viewport-lock-button{display:none!important}}
1
+ import{a as h}from"./chunk-5AW2WUSZ.js";import{a as y,c as $,kb as E,na as x,nb as K,oa as L}from"./chunk-JTQMPH6V.js";import{f as S}from"./chunk-J6IRWTF7.js";import{c as f}from"./chunk-DCANE7XH.js";var i=f($(),1);y(`.viewport-lock-button{position:absolute;top:8px;right:8px;z-index:30;display:grid;place-items:center;width:30px;height:30px;padding:0;border:1px solid var(--sb-line, var(--line, #e9ece5));border-radius:6px;background:var(--sb-surface, var(--paper, #fff));color:var(--sb-muted, var(--muted, #92968f));cursor:pointer}.viewport-lock-button[aria-pressed=false]{color:var(--accent, #120a8f)}.viewport-lock-button:hover{background:var(--sb-hover, var(--hover, #f0f2ed))}.viewport-lock-button:focus-visible{outline:2px solid var(--accent, #120a8f);outline-offset:2px}.viewport-lock-error{display:none;position:absolute;top:100%;right:0;width:220px;padding:8px;background:var(--paper, #fff);color:var(--text, #343a35);font-size:11px}.viewport-lock-button:hover .viewport-lock-error,.viewport-lock-button:focus-visible .viewport-lock-error{display:block}[data-viewport-locked=true]>.surface-scroll{touch-action:pan-y;overscroll-behavior:auto}.sf-block[data-viewport-locked=true] .react-flow__pane,.sf-block[data-viewport-locked=true] .react-flow__node{touch-action:pan-y;cursor:auto}.sb-header:has(~.viewport-lock-button){right:42px}.sb-header.has-caption:has(~.viewport-lock-button){right:auto;padding-right:42px}.sb-header.has-caption:has(~.viewport-lock-button)>.sb-actions{right:42px}.sb-g2-chart:has(>.viewport-lock-button)>.sb-g2-toolbar{padding-right:42px}@media print{.viewport-lock-button{display:none!important}}
2
2
  `);var l=f(E(),1),M=S(h);function z(e,n){let r=e.closest("[data-block-id], [data-surface-id]");return`showai.viewport-lock.v1:${r?.getAttribute("data-block-id")||r?.getAttribute("data-surface-id")||location.pathname}:${n}`}function V(e){return localStorage.getItem(e)!=="unlocked"}function _(e,n){localStorage.setItem(e,n?"locked":"unlocked")}function O(e,n){let r=(0,i.useRef)(null),c=(0,i.useRef)(""),p=(0,i.useRef)(null),[s,d]=(0,i.useState)(!0),[D,g]=(0,i.useState)("");return(0,i.useLayoutEffect)(()=>{let o=r.current,T=[...(o.closest("[data-block-id], [data-surface-id]")||o.ownerDocument.body).querySelectorAll(`[data-viewport-lock-scope="${e}"]`)],w=`${e}:${T.indexOf(o)}`;c.current=n||z(o,w);let b=o.ownerDocument.getElementById("showai-component-data"),u=b?JSON.parse(b.textContent||"{}").channel:void 0;if(u&&window.parent!==window){p.current={channel:u,scope:w};let k=t=>{t.source!==parent||t.data?.channel!==u||t.data?.type!=="showai:viewport-lock-state"||t.data.scope!==w||(typeof t.data.locked=="boolean"&&d(t.data.locked),g(t.data.error||""))},m=t=>{if(o.dataset.viewportLocked==="true"){for(let a=t.target instanceof Element?t.target:null;a&&a!==o;a=a.parentElement){let Y=getComputedStyle(a);if(/auto|scroll/.test(Y.overflowY)&&(t.deltaY>0&&a.scrollTop+a.clientHeight<a.scrollHeight-1||t.deltaY<0&&a.scrollTop>0))return}t.preventDefault(),t.stopPropagation(),parent.postMessage({channel:u,type:"showai:reading-wheel",deltaX:t.deltaX,deltaY:t.deltaY,deltaMode:t.deltaMode,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey},"*")}};return window.addEventListener("message",k),o.addEventListener("wheel",m,{capture:!0,passive:!1}),parent.postMessage({channel:u,type:"showai:viewport-lock-get",scope:w},"*"),()=>{window.removeEventListener("message",k),o.removeEventListener("wheel",m,!0)}}try{d(V(c.current))}catch(k){g(M("viewportLock.readFailed",{error:String(k)}))}},[e,n]),{ref:r,locked:s,toggle:()=>{let o=!s;if(p.current){parent.postMessage({...p.current,type:"showai:viewport-lock-set",locked:o},"*");return}try{_(c.current,o),g("")}catch(v){g(M("viewportLock.saveFailed",{error:String(v)}))}d(o)},error:D}}function X({locked:e,toggle:n,error:r="",label:c,unlockDescription:p}){let s=K(h),d=s(e?"viewportLock.unlock":"viewportLock.lock",{target:c});return(0,l.jsxs)("button",{type:"button",className:"viewport-lock-button","data-surface-ui":!0,"aria-label":d,"aria-pressed":e,title:r||(e?s("viewportLock.unlockTitle",{target:c,description:p??s("viewportLock.unlockDescription")}):s("viewportLock.lockTitle",{target:c})),onClick:n,children:[e?(0,l.jsx)(L,{size:16}):(0,l.jsx)(x,{size:16}),r&&(0,l.jsx)("span",{className:"viewport-lock-error",role:"alert",children:r})]})}export{z as a,V as b,_ as c,O as d,X as e};
@@ -1,4 +1,4 @@
1
- import{b as J,c as Q}from"./chunk-DTW4F4AN.js";import{d as U,f as v}from"./chunk-55FJSXTX.js";import{d as Z}from"./chunk-UWAAPX6Y.js";import{a as q,c as rs,jb as F,mb as j}from"./chunk-6WTBCWHP.js";import{a as X}from"./chunk-J6IRWTF7.js";import{c as B}from"./chunk-DCANE7XH.js";var d=B(rs(),1);q(`.sb-block.sg-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.sg-block li:not(svg){padding:0}.sb-block.sg-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.sg-block{--sg-text: var(--text, #222222);--sg-muted: var(--muted, #6a6a6a);--sg-faint: var(--subtle, #929292);--sg-line: var(--line, #dddddd);--sg-paper: var(--paper, #ffffff);--sg-surface: var(--surface, #fafafa);--sg-accent: var(--accent, #120a8f);--sg-accent-soft: var(--accent-soft, #eeedf9);--sg-on-accent: var(--paper, #ffffff);--sg-good: #2f6b4f;--sg-good-soft: #e6efe9;--sg-warn: #a86b34;--sg-warn-soft: #f6ece2;--sg-wait: #d9a85b;--sg-wait-soft: #f8ead0;color:var(--sg-text);font-family:inherit;font-size:14px;line-height:1.7;padding:8px 0;container-type:inline-size;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}:root[data-theme=dark] .sb-block.sg-block,[data-theme=dark] .sb-block.sg-block{--sg-good: #7cc3a0;--sg-good-soft: #20352b;--sg-warn: #e0a96f;--sg-warn-soft: #3a2c1e;--sg-wait: #b88a45;--sg-wait-soft: #3a2f1c}.sb-block.sg-block *{box-sizing:border-box}.sb-block.sg-block button{font:inherit;cursor:pointer}.sb-block.sg-block button:focus-visible,.sb-block.sg-block pre:focus-visible,.sb-block.sg-block a:focus-visible{outline:2px solid var(--sg-accent);outline-offset:2px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-head{margin-bottom:14px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-heading{margin:0;font-size:17px;font-weight:700}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-sub{margin:2px 0 0;color:var(--sg-muted);font-size:13px}.sb-block.sg-block strong{font-weight:650}.sb-block.sg-block :not(pre)>code{font-family:var(--font-mono, ui-monospace, monospace);font-size:.88em;background:var(--sg-surface);border:1px solid var(--sg-line);border-radius:4px;padding:0 4px}.sb-block.sg-block a{color:var(--sg-accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--sg-accent) 35%,transparent)}.sb-block.sg-block a:hover{border-bottom-color:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-announce{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-progress{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0 0 16px;font-size:12px;line-height:1.4;color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-count{white-space:nowrap}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-bar{flex:1;max-width:220px;min-width:60px;height:3px;border-radius:2px;background:var(--sg-line);overflow:hidden}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-bar i{display:block;height:100%;background:var(--sg-accent);border-radius:2px;transition:width .25s ease}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tip{color:var(--sg-faint);white-space:nowrap}.sb-block.sg-block .sg-clear{border:0;background:none;padding:2px 4px;margin:-2px -4px;font-size:12px;color:var(--sg-muted);border-radius:4px}.sb-block.sg-block .sg-clear:hover{color:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-list{list-style:none;margin:0;padding:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-step{display:grid;grid-template-columns:30px minmax(0,1fr);gap:0 16px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-rail{position:relative;display:flex;flex-direction:column;align-items:center}.sb-block.sg-block .sg-num{position:relative;z-index:1;flex:none;display:grid;place-items:center;width:30px;height:30px;padding:0;border-radius:50%;border:1px solid var(--sg-line);background:var(--sg-paper);color:var(--sg-text);font-size:13px;font-weight:600;transition:border-color .15s,background-color .15s,color .15s,box-shadow .15s}.sb-block.sg-block .sg-num:hover{border-color:var(--sg-accent);color:var(--sg-accent);box-shadow:0 0 0 3px var(--sg-accent-soft)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-num svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.sb-block.sg-block .sg-num[aria-pressed=true]{background:var(--sg-accent);border-color:var(--sg-accent);color:var(--sg-on-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-line{flex:1;width:1px;margin:6px 0;background:var(--sg-line);position:relative}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-line:after{content:"";position:absolute;width:2px;inset:0 0 0 -.5px;background:var(--sg-accent);transform:scaleY(0);transform-origin:top;transition:transform .3s ease}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-step.is-done .sg-line:after{transform:scaleY(1)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-content{min-width:0;padding:3px 0 28px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-step:last-child .sg-content{padding-bottom:4px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-title{margin:0;font-size:16px;line-height:1.5;font-weight:650}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-badge{display:inline-block;vertical-align:2px;margin-left:8px;padding:0 8px;border:1px solid var(--sg-line);border-radius:999px;font-size:11.5px;font-weight:600;line-height:1.7;color:var(--sg-muted);background:var(--sg-paper)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-body{margin:6px 0 0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-note,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result{display:flex;align-items:flex-start;gap:8px;margin:12px 0 0;font-size:13px;line-height:1.65}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-note{color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-note svg,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result svg{flex:none;width:16px;height:16px;margin-top:2px;fill:none;stroke-linecap:round;stroke-linejoin:round}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-note svg{stroke:var(--sg-faint);stroke-width:1.3}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result{background:var(--sg-good-soft);border-radius:6px;padding:8px 12px 8px 10px;width:fit-content;max-width:100%}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result svg circle{fill:var(--sg-good);stroke:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result svg path{stroke:var(--sg-good-soft);stroke-width:1.8}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint{margin:10px 0 0;padding:8px 12px;border-radius:8px;font-size:13.5px;line-height:1.6}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint b{margin-right:8px;font-weight:650}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint.is-cue{background:var(--sg-good-soft)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint.is-cue b{color:var(--sg-good)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint.is-wait{background:var(--sg-warn-soft)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint.is-wait b{color:var(--sg-warn)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print-only{display:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer-static{margin:10px 0 0;font-size:13px;color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code{--sg-code-line: var(--line, #dddddd);margin-top:12px;border:1px solid var(--sg-code-line);border-radius:10px;background:var(--surface, #fafafa);color:var(--text, #222222);overflow:hidden}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-codebar{display:flex;align-items:center;gap:10px;min-height:38px;padding:0 6px 0 12px;border-bottom:1px solid var(--sg-code-line);background:color-mix(in srgb,var(--line, #dddddd) 30%,var(--surface, #fafafa))}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-lang{font-family:var(--font-mono, ui-monospace, monospace);font-size:11.5px;color:var(--muted, #6a6a6a);letter-spacing:.02em}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tabs{display:flex;align-self:stretch;gap:2px;margin-left:-4px;overflow-x:auto;scrollbar-width:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button{position:relative;border:0;background:none;padding:0 10px;font:inherit;font-size:12.5px;color:var(--muted, #6a6a6a);white-space:nowrap;cursor:pointer}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button:hover,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button[aria-selected=true]{color:var(--text, #222222)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button[aria-selected=true]{font-weight:650}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button[aria-selected=true]:after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:2px;border-radius:1px;background:var(--accent, #120a8f)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy-hint{flex:1;min-width:0;text-align:right;font-size:12px;color:var(--muted, #6a6a6a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-copy{flex:none;display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 9px;border:1px solid transparent;border-radius:6px;background:none;font:inherit;font-size:12px;color:var(--muted, #6a6a6a);cursor:pointer}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-copy:hover{color:var(--text, #222222);background:var(--paper, #ffffff);border-color:var(--sg-code-line)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-copy.is-ok{color:var(--accent, #120a8f)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button:focus-visible,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-copy:focus-visible,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre:focus-visible{outline:2px solid var(--accent, #120a8f);outline-offset:-2px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre{margin:0;padding:13px 16px 14px;overflow-x:auto;font-family:var(--font-mono, ui-monospace, monospace);font-size:12.5px;line-height:1.7;tab-size:2;background:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre code{font:inherit;color:inherit;background:none;border:0;padding:0;white-space:pre}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-comment{color:var(--muted, #6a6a6a)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:12px;padding:8px 10px 8px 14px;border:1px solid var(--sg-line);border-radius:12px;background:var(--sg-paper);width:fit-content;max-width:100%}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-clock{display:flex;align-items:baseline;gap:8px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-clock b{font-size:18px;font-weight:700}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-clock span{font-size:12px;color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-meter{width:72px;height:4px;border-radius:2px;background:var(--sg-line);overflow:hidden}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-meter i{display:block;height:100%;background:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-run .sg-meter i{background:var(--sg-good)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer-buttons{display:flex;flex-wrap:wrap;gap:6px}.sb-block.sg-block .sg-go,.sb-block.sg-block .sg-reset{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 12px;font-size:13px;font-weight:600}.sb-block.sg-block .sg-go{border:1px solid var(--sg-accent);background:var(--sg-accent);color:var(--sg-on-accent)}.sb-block.sg-block .sg-timer.is-run .sg-go{background:var(--sg-good);border-color:var(--sg-good)}.sb-block.sg-block .sg-reset{border:1px solid var(--sg-line);background:var(--sg-paper);color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-done{border-color:var(--sg-warn);background:var(--sg-warn-soft);animation:sg-ding .6s ease 3}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-done .sg-clock b{color:var(--sg-warn)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large{position:relative;flex-direction:column;justify-content:flex-start;width:100%;margin:0;padding:14px 10px 12px;border-radius:16px;gap:10px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ring{width:132px;height:132px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ring-bg{fill:none;stroke:var(--sg-line);stroke-width:9}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ring-fg{fill:none;stroke:var(--sg-accent);stroke-width:9;stroke-linecap:round;transition:stroke-dashoffset .3s linear}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-run .sg-ring-fg{stroke:var(--sg-good)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-done .sg-ring-fg{stroke:var(--sg-warn)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock{position:absolute;top:14px;height:132px;width:110px;flex-direction:column;align-items:center;justify-content:center;gap:0;text-align:center}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock b{font-size:26px;line-height:1.2}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large.is-done .sg-clock b{font-size:18px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock span{line-height:1.3;margin-top:2px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-timer-buttons{justify-content:center}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon{margin:0 0 16px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-sum{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 18px;margin-bottom:8px;font-size:13px;color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-total b{font-size:20px;font-weight:700;color:var(--sg-text)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key{display:inline-flex;align-items:center;gap:6px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key b{color:var(--sg-text)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key i{display:inline-block;width:20px;height:9px;border-radius:3px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key.is-active i,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-seg.is-active{background:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key.is-wait i,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-seg.is-wait{background:repeating-linear-gradient(135deg,var(--sg-wait-soft) 0 5px,var(--sg-wait) 5px 7px)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-hint{margin-left:auto;font-size:12px;color:var(--sg-faint)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-rows{background:var(--sg-surface);border:1px solid var(--sg-line);border-radius:12px;padding:8px 12px 4px}.sb-block.sg-block .sg-row{display:grid;grid-template-columns:118px minmax(0,1fr);align-items:center;width:100%;height:24px;padding:0;border:0;border-radius:6px;background:none;color:inherit;text-align:left}.sb-block.sg-block .sg-row:hover{background:var(--sg-paper)}.sb-block.sg-block .sg-row.is-current{background:var(--sg-accent-soft)}.sb-block.sg-block .sg-row:focus-visible{outline-offset:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row-label{padding-left:4px;font-size:12.5px;color:var(--sg-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row-label em{font-style:normal;font-weight:700;margin-right:6px;color:var(--sg-faint)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row.is-current .sg-row-label{color:var(--sg-text);font-weight:650}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row.is-current .sg-row-label em{color:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-track{position:relative;display:block;height:100%}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-grid{position:absolute;top:0;bottom:0;border-left:1px dashed var(--sg-line)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-seg{position:absolute;top:6px;height:12px;min-width:3px;border-radius:4px;opacity:.6;transition:opacity .2s}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row:hover .sg-seg,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row.is-current .sg-seg{opacity:1}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row.is-done .sg-seg{opacity:.35}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-live{position:absolute;inset:-3px;border-radius:6px;border:2px solid var(--sg-good);animation:sg-pulse 1.2s ease-in-out infinite}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-axis{display:grid;grid-template-columns:118px minmax(0,1fr);height:20px;font-size:11px;color:var(--sg-faint)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-axis .sg-track span{position:absolute;top:3px;transform:translate(-50%);white-space:nowrap}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-axis .sg-track span:first-child{transform:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tray{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}.sb-block.sg-block .sg-tray button{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:3px 11px;border:1px solid transparent;border-radius:999px;background:var(--sg-good-soft);color:var(--sg-text);font-size:12.5px}.sb-block.sg-block .sg-tray button.is-done{background:var(--sg-warn-soft);border-color:var(--sg-warn)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tray-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:12em}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:22px;padding:18px 20px;border:1px solid var(--sg-line);border-radius:16px;background:var(--sg-paper);animation:sg-in .25s ease}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card:not(:has(.sg-card-side)){grid-template-columns:minmax(0,1fr)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-main{min-width:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-bottom:4px}.sb-block.sg-block .sg-num.is-large{width:46px;height:46px;font-size:22px;font-weight:700}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-num.is-large svg{width:22px;height:22px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-titles{flex:1;min-width:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-titles small{font-size:12px;color:var(--sg-muted);letter-spacing:.04em}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-titles .sg-title{font-size:20px;line-height:1.3}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-head>.sg-badge{margin-left:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card .sg-body{font-size:15.5px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-foot{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;margin-top:14px}.sb-block.sg-block .sg-nav{padding:6px 16px;border:1px solid var(--sg-line);border-radius:999px;background:var(--sg-paper);color:var(--sg-text);font-size:14px;font-weight:600}.sb-block.sg-block .sg-nav.is-next{margin-left:auto;background:var(--sg-accent);border-color:var(--sg-accent);color:var(--sg-on-accent)}.sb-block.sg-block .sg-nav:disabled{opacity:.4;cursor:default}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-dots{display:flex;flex-wrap:wrap;gap:6px;min-width:0}.sb-block.sg-block .sg-dots button{width:10px;height:10px;padding:0;border:0;border-radius:50%;background:var(--sg-line)}.sb-block.sg-block .sg-dots button.is-done{background:color-mix(in srgb,var(--sg-accent) 45%,var(--sg-line))}.sb-block.sg-block .sg-dots button.is-current{width:22px;border-radius:6px;background:var(--sg-accent)}@keyframes sg-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@keyframes sg-pulse{0%,to{opacity:.3}50%{opacity:1}}@keyframes sg-ding{0%,to{transform:none}25%{transform:rotate(-1.5deg)}75%{transform:rotate(1.5deg)}}@container (max-width: 640px){:is(.sb-block.sg-block,.sb-block.cr-block) .sg-step{grid-template-columns:26px minmax(0,1fr);gap:0 12px}.sb-block.sg-block .sg-num{width:26px;height:26px;font-size:12px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-content{padding:1px 0 24px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tip,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-hint{display:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-bar{max-width:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre{padding:12px 13px;font-size:12px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-codebar{flex-wrap:wrap}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-codebar>:first-child{flex:1;min-width:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy-hint{order:3;flex-basis:100%;text-align:left;white-space:normal}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy-hint:empty{display:none}.sb-block.sg-block .sg-row,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-axis{grid-template-columns:76px minmax(0,1fr)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card{grid-template-columns:minmax(0,1fr);padding:14px 12px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ring{width:104px;height:104px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock{width:92px;height:104px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock b{font-size:20px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-titles .sg-title{font-size:18px}.sb-block.sg-block .sg-nav{padding:6px 12px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-dots{order:3;flex-basis:100%;justify-content:center}}@media(prefers-reduced-motion:reduce){.sb-block.sg-block *,.sb-block.sg-block *:after{transition:none!important}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-live,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-done{animation:none}}@media print{:is(.sb-block.sg-block,.sb-block.cr-block) .sg-progress,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tray,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-hint,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy-hint,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-foot,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-screen,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer-buttons{display:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print-only{display:block}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print{margin:0;padding-left:1.6em}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print>li{break-inside:avoid;margin-bottom:16px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre{overflow:visible}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code pre[hidden]{display:block;border-top:1px solid var(--sg-code-line)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code pre[data-label]:before{content:attr(data-label);display:block;margin-bottom:4px;font-family:var(--font-sans, sans-serif);font-size:11.5px;font-weight:650;color:var(--muted, #6a6a6a)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre code{white-space:pre-wrap}}
1
+ import{b as J,c as Q}from"./chunk-TJVHVAQF.js";import{d as U,f as v}from"./chunk-2URYNZTR.js";import{d as Z}from"./chunk-YQ6N2DJR.js";import{a as q,c as rs,kb as F,nb as j}from"./chunk-JTQMPH6V.js";import{a as X}from"./chunk-J6IRWTF7.js";import{c as B}from"./chunk-DCANE7XH.js";var d=B(rs(),1);q(`.sb-block.sg-block :is(h3,h4,p,ul,ol,li,pre):not(svg){margin:0}.sb-block.sg-block li:not(svg){padding:0}.sb-block.sg-block pre:not(svg){border:0;border-radius:0;background:none;color:inherit}.sb-block.sg-block{--sg-text: var(--text, #222222);--sg-muted: var(--muted, #6a6a6a);--sg-faint: var(--subtle, #929292);--sg-line: var(--line, #dddddd);--sg-paper: var(--paper, #ffffff);--sg-surface: var(--surface, #fafafa);--sg-accent: var(--accent, #120a8f);--sg-accent-soft: var(--accent-soft, #eeedf9);--sg-on-accent: var(--paper, #ffffff);--sg-good: #2f6b4f;--sg-good-soft: #e6efe9;--sg-warn: #a86b34;--sg-warn-soft: #f6ece2;--sg-wait: #d9a85b;--sg-wait-soft: #f8ead0;color:var(--sg-text);font-family:inherit;font-size:14px;line-height:1.7;padding:8px 0;container-type:inline-size;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}:root[data-theme=dark] .sb-block.sg-block,[data-theme=dark] .sb-block.sg-block{--sg-good: #7cc3a0;--sg-good-soft: #20352b;--sg-warn: #e0a96f;--sg-warn-soft: #3a2c1e;--sg-wait: #b88a45;--sg-wait-soft: #3a2f1c}.sb-block.sg-block *{box-sizing:border-box}.sb-block.sg-block button{font:inherit;cursor:pointer}.sb-block.sg-block button:focus-visible,.sb-block.sg-block pre:focus-visible,.sb-block.sg-block a:focus-visible{outline:2px solid var(--sg-accent);outline-offset:2px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-head{margin-bottom:14px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-heading{margin:0;font-size:17px;font-weight:700}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-sub{margin:2px 0 0;color:var(--sg-muted);font-size:13px}.sb-block.sg-block strong{font-weight:650}.sb-block.sg-block :not(pre)>code{font-family:var(--font-mono, ui-monospace, monospace);font-size:.88em;background:var(--sg-surface);border:1px solid var(--sg-line);border-radius:4px;padding:0 4px}.sb-block.sg-block a{color:var(--sg-accent);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--sg-accent) 35%,transparent)}.sb-block.sg-block a:hover{border-bottom-color:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-announce{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-progress{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:0 0 16px;font-size:12px;line-height:1.4;color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-count{white-space:nowrap}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-bar{flex:1;max-width:220px;min-width:60px;height:3px;border-radius:2px;background:var(--sg-line);overflow:hidden}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-bar i{display:block;height:100%;background:var(--sg-accent);border-radius:2px;transition:width .25s ease}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tip{color:var(--sg-faint);white-space:nowrap}.sb-block.sg-block .sg-clear{border:0;background:none;padding:2px 4px;margin:-2px -4px;font-size:12px;color:var(--sg-muted);border-radius:4px}.sb-block.sg-block .sg-clear:hover{color:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-list{list-style:none;margin:0;padding:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-step{display:grid;grid-template-columns:30px minmax(0,1fr);gap:0 16px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-rail{position:relative;display:flex;flex-direction:column;align-items:center}.sb-block.sg-block .sg-num{position:relative;z-index:1;flex:none;display:grid;place-items:center;width:30px;height:30px;padding:0;border-radius:50%;border:1px solid var(--sg-line);background:var(--sg-paper);color:var(--sg-text);font-size:13px;font-weight:600;transition:border-color .15s,background-color .15s,color .15s,box-shadow .15s}.sb-block.sg-block .sg-num:hover{border-color:var(--sg-accent);color:var(--sg-accent);box-shadow:0 0 0 3px var(--sg-accent-soft)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-num svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.sb-block.sg-block .sg-num[aria-pressed=true]{background:var(--sg-accent);border-color:var(--sg-accent);color:var(--sg-on-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-line{flex:1;width:1px;margin:6px 0;background:var(--sg-line);position:relative}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-line:after{content:"";position:absolute;width:2px;inset:0 0 0 -.5px;background:var(--sg-accent);transform:scaleY(0);transform-origin:top;transition:transform .3s ease}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-step.is-done .sg-line:after{transform:scaleY(1)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-content{min-width:0;padding:3px 0 28px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-step:last-child .sg-content{padding-bottom:4px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-title{margin:0;font-size:16px;line-height:1.5;font-weight:650}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-badge{display:inline-block;vertical-align:2px;margin-left:8px;padding:0 8px;border:1px solid var(--sg-line);border-radius:999px;font-size:11.5px;font-weight:600;line-height:1.7;color:var(--sg-muted);background:var(--sg-paper)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-body{margin:6px 0 0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-note,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result{display:flex;align-items:flex-start;gap:8px;margin:12px 0 0;font-size:13px;line-height:1.65}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-note{color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-note svg,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result svg{flex:none;width:16px;height:16px;margin-top:2px;fill:none;stroke-linecap:round;stroke-linejoin:round}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-note svg{stroke:var(--sg-faint);stroke-width:1.3}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result{background:var(--sg-good-soft);border-radius:6px;padding:8px 12px 8px 10px;width:fit-content;max-width:100%}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result svg circle{fill:var(--sg-good);stroke:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-result svg path{stroke:var(--sg-good-soft);stroke-width:1.8}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint{margin:10px 0 0;padding:8px 12px;border-radius:8px;font-size:13.5px;line-height:1.6}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint b{margin-right:8px;font-weight:650}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint.is-cue{background:var(--sg-good-soft)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint.is-cue b{color:var(--sg-good)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint.is-wait{background:var(--sg-warn-soft)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-hint.is-wait b{color:var(--sg-warn)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print-only{display:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer-static{margin:10px 0 0;font-size:13px;color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code{--sg-code-line: var(--line, #dddddd);margin-top:12px;border:1px solid var(--sg-code-line);border-radius:10px;background:var(--surface, #fafafa);color:var(--text, #222222);overflow:hidden}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-codebar{display:flex;align-items:center;gap:10px;min-height:38px;padding:0 6px 0 12px;border-bottom:1px solid var(--sg-code-line);background:color-mix(in srgb,var(--line, #dddddd) 30%,var(--surface, #fafafa))}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-lang{font-family:var(--font-mono, ui-monospace, monospace);font-size:11.5px;color:var(--muted, #6a6a6a);letter-spacing:.02em}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tabs{display:flex;align-self:stretch;gap:2px;margin-left:-4px;overflow-x:auto;scrollbar-width:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button{position:relative;border:0;background:none;padding:0 10px;font:inherit;font-size:12.5px;color:var(--muted, #6a6a6a);white-space:nowrap;cursor:pointer}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button:hover,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button[aria-selected=true]{color:var(--text, #222222)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button[aria-selected=true]{font-weight:650}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button[aria-selected=true]:after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:2px;border-radius:1px;background:var(--accent, #120a8f)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy-hint{flex:1;min-width:0;text-align:right;font-size:12px;color:var(--muted, #6a6a6a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-copy{flex:none;display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 9px;border:1px solid transparent;border-radius:6px;background:none;font:inherit;font-size:12px;color:var(--muted, #6a6a6a);cursor:pointer}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-copy:hover{color:var(--text, #222222);background:var(--paper, #ffffff);border-color:var(--sg-code-line)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-copy.is-ok{color:var(--accent, #120a8f)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-tabs button:focus-visible,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-copy:focus-visible,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre:focus-visible{outline:2px solid var(--accent, #120a8f);outline-offset:-2px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre{margin:0;padding:13px 16px 14px;overflow-x:auto;font-family:var(--font-mono, ui-monospace, monospace);font-size:12.5px;line-height:1.7;tab-size:2;background:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre code{font:inherit;color:inherit;background:none;border:0;padding:0;white-space:pre}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-comment{color:var(--muted, #6a6a6a)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:12px;padding:8px 10px 8px 14px;border:1px solid var(--sg-line);border-radius:12px;background:var(--sg-paper);width:fit-content;max-width:100%}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-clock{display:flex;align-items:baseline;gap:8px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-clock b{font-size:18px;font-weight:700}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-clock span{font-size:12px;color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-meter{width:72px;height:4px;border-radius:2px;background:var(--sg-line);overflow:hidden}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-meter i{display:block;height:100%;background:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-run .sg-meter i{background:var(--sg-good)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer-buttons{display:flex;flex-wrap:wrap;gap:6px}.sb-block.sg-block .sg-go,.sb-block.sg-block .sg-reset{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:4px 12px;font-size:13px;font-weight:600}.sb-block.sg-block .sg-go{border:1px solid var(--sg-accent);background:var(--sg-accent);color:var(--sg-on-accent)}.sb-block.sg-block .sg-timer.is-run .sg-go{background:var(--sg-good);border-color:var(--sg-good)}.sb-block.sg-block .sg-reset{border:1px solid var(--sg-line);background:var(--sg-paper);color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-done{border-color:var(--sg-warn);background:var(--sg-warn-soft);animation:sg-ding .6s ease 3}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-done .sg-clock b{color:var(--sg-warn)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large{position:relative;flex-direction:column;justify-content:flex-start;width:100%;margin:0;padding:14px 10px 12px;border-radius:16px;gap:10px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ring{width:132px;height:132px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ring-bg{fill:none;stroke:var(--sg-line);stroke-width:9}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ring-fg{fill:none;stroke:var(--sg-accent);stroke-width:9;stroke-linecap:round;transition:stroke-dashoffset .3s linear}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-run .sg-ring-fg{stroke:var(--sg-good)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-done .sg-ring-fg{stroke:var(--sg-warn)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock{position:absolute;top:14px;height:132px;width:110px;flex-direction:column;align-items:center;justify-content:center;gap:0;text-align:center}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock b{font-size:26px;line-height:1.2}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large.is-done .sg-clock b{font-size:18px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock span{line-height:1.3;margin-top:2px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-timer-buttons{justify-content:center}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon{margin:0 0 16px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-sum{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 18px;margin-bottom:8px;font-size:13px;color:var(--sg-muted)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-total b{font-size:20px;font-weight:700;color:var(--sg-text)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key{display:inline-flex;align-items:center;gap:6px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key b{color:var(--sg-text)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key i{display:inline-block;width:20px;height:9px;border-radius:3px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key.is-active i,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-seg.is-active{background:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-key.is-wait i,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-seg.is-wait{background:repeating-linear-gradient(135deg,var(--sg-wait-soft) 0 5px,var(--sg-wait) 5px 7px)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-hint{margin-left:auto;font-size:12px;color:var(--sg-faint)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-rows{background:var(--sg-surface);border:1px solid var(--sg-line);border-radius:12px;padding:8px 12px 4px}.sb-block.sg-block .sg-row{display:grid;grid-template-columns:118px minmax(0,1fr);align-items:center;width:100%;height:24px;padding:0;border:0;border-radius:6px;background:none;color:inherit;text-align:left}.sb-block.sg-block .sg-row:hover{background:var(--sg-paper)}.sb-block.sg-block .sg-row.is-current{background:var(--sg-accent-soft)}.sb-block.sg-block .sg-row:focus-visible{outline-offset:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row-label{padding-left:4px;font-size:12.5px;color:var(--sg-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row-label em{font-style:normal;font-weight:700;margin-right:6px;color:var(--sg-faint)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row.is-current .sg-row-label{color:var(--sg-text);font-weight:650}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row.is-current .sg-row-label em{color:var(--sg-accent)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-track{position:relative;display:block;height:100%}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-grid{position:absolute;top:0;bottom:0;border-left:1px dashed var(--sg-line)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-seg{position:absolute;top:6px;height:12px;min-width:3px;border-radius:4px;opacity:.6;transition:opacity .2s}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row:hover .sg-seg,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row.is-current .sg-seg{opacity:1}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-row.is-done .sg-seg{opacity:.35}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-live{position:absolute;inset:-3px;border-radius:6px;border:2px solid var(--sg-good);animation:sg-pulse 1.2s ease-in-out infinite}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-axis{display:grid;grid-template-columns:118px minmax(0,1fr);height:20px;font-size:11px;color:var(--sg-faint)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-axis .sg-track span{position:absolute;top:3px;transform:translate(-50%);white-space:nowrap}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-axis .sg-track span:first-child{transform:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tray{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 14px}.sb-block.sg-block .sg-tray button{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:3px 11px;border:1px solid transparent;border-radius:999px;background:var(--sg-good-soft);color:var(--sg-text);font-size:12.5px}.sb-block.sg-block .sg-tray button.is-done{background:var(--sg-warn-soft);border-color:var(--sg-warn)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tray-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:12em}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:22px;padding:18px 20px;border:1px solid var(--sg-line);border-radius:16px;background:var(--sg-paper);animation:sg-in .25s ease}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card:not(:has(.sg-card-side)){grid-template-columns:minmax(0,1fr)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-main{min-width:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-bottom:4px}.sb-block.sg-block .sg-num.is-large{width:46px;height:46px;font-size:22px;font-weight:700}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-num.is-large svg{width:22px;height:22px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-titles{flex:1;min-width:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-titles small{font-size:12px;color:var(--sg-muted);letter-spacing:.04em}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-titles .sg-title{font-size:20px;line-height:1.3}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-head>.sg-badge{margin-left:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card .sg-body{font-size:15.5px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-foot{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;margin-top:14px}.sb-block.sg-block .sg-nav{padding:6px 16px;border:1px solid var(--sg-line);border-radius:999px;background:var(--sg-paper);color:var(--sg-text);font-size:14px;font-weight:600}.sb-block.sg-block .sg-nav.is-next{margin-left:auto;background:var(--sg-accent);border-color:var(--sg-accent);color:var(--sg-on-accent)}.sb-block.sg-block .sg-nav:disabled{opacity:.4;cursor:default}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-dots{display:flex;flex-wrap:wrap;gap:6px;min-width:0}.sb-block.sg-block .sg-dots button{width:10px;height:10px;padding:0;border:0;border-radius:50%;background:var(--sg-line)}.sb-block.sg-block .sg-dots button.is-done{background:color-mix(in srgb,var(--sg-accent) 45%,var(--sg-line))}.sb-block.sg-block .sg-dots button.is-current{width:22px;border-radius:6px;background:var(--sg-accent)}@keyframes sg-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@keyframes sg-pulse{0%,to{opacity:.3}50%{opacity:1}}@keyframes sg-ding{0%,to{transform:none}25%{transform:rotate(-1.5deg)}75%{transform:rotate(1.5deg)}}@container (max-width: 640px){:is(.sb-block.sg-block,.sb-block.cr-block) .sg-step{grid-template-columns:26px minmax(0,1fr);gap:0 12px}.sb-block.sg-block .sg-num{width:26px;height:26px;font-size:12px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-content{padding:1px 0 24px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tip,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-hint{display:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-bar{max-width:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre{padding:12px 13px;font-size:12px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-codebar{flex-wrap:wrap}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-codebar>:first-child{flex:1;min-width:0}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy-hint{order:3;flex-basis:100%;text-align:left;white-space:normal}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy-hint:empty{display:none}.sb-block.sg-block .sg-row,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-axis{grid-template-columns:76px minmax(0,1fr)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card{grid-template-columns:minmax(0,1fr);padding:14px 12px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ring{width:104px;height:104px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock{width:92px;height:104px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-large .sg-clock b{font-size:20px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card-titles .sg-title{font-size:18px}.sb-block.sg-block .sg-nav{padding:6px 12px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-dots{order:3;flex-basis:100%;justify-content:center}}@media(prefers-reduced-motion:reduce){.sb-block.sg-block *,.sb-block.sg-block *:after{transition:none!important}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-live,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer.is-done{animation:none}}@media print{:is(.sb-block.sg-block,.sb-block.cr-block) .sg-progress,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-tray,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-ribbon-hint,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-copy-hint,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-card,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-foot,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-screen,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-timer-buttons{display:none}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print,:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print-only{display:block}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print{margin:0;padding-left:1.6em}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-print>li{break-inside:avoid;margin-bottom:16px}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre{overflow:visible}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code pre[hidden]{display:block;border-top:1px solid var(--sg-code-line)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code pre[data-label]:before{content:attr(data-label);display:block;margin-bottom:4px;font-family:var(--font-sans, sans-serif);font-size:11.5px;font-weight:650;color:var(--muted, #6a6a6a)}:is(.sb-block.sg-block,.sb-block.cr-block) .sg-code .sg-pre code{white-space:pre-wrap}}
2
2
  `);var K=X("stepGuide",{"zh-CN":{title:"\u64CD\u4F5C\u6B65\u9AA4",progress:"\u5DF2\u5B8C\u6210 {done} / {total} \u6B65",allDone:"\u5168\u90E8\u5B8C\u6210",resetProgress:"\u91CD\u7F6E",resetProgressLabel:"\u6E05\u9664\u5168\u90E8\u5B8C\u6210\u6807\u8BB0",tickHint:"\u70B9\u51FB\u5E8F\u53F7\u6807\u8BB0\u5B8C\u6210",markDone:"\u5C06\u7B2C {number} \u6B65\u6807\u8BB0\u4E3A\u5DF2\u5B8C\u6210",markUndone:"\u7B2C {number} \u6B65\u5DF2\u5B8C\u6210\uFF0C\u70B9\u51FB\u53D6\u6D88",note:"\u63D0\u793A",result:"\u5B8C\u6210\u540E",cue:"\u770B\u5230\u8FD9\u6837\u5C31\u5BF9\u4E86",wait:"\u7B49\u5F85\u65F6","code.label":"\u4EE3\u7801","code.variants":"\u9009\u62E9\u73AF\u5883","code.copy":"\u590D\u5236","code.copied":"\u5DF2\u590D\u5236","code.copyLabel":"\u590D\u5236{label}","code.selected":"\u5DF2\u9009\u4E2D\uFF0C\u6309 \u2318C / Ctrl+C \u590D\u5236","code.stepLabel":"\u7B2C {number} \u6B65\u7684\u4EE3\u7801","timer.label":"\u8BA1\u65F6\u5668","timer.start":"\u5F00\u59CB\u8BA1\u65F6","timer.pause":"\u6682\u505C","timer.resume":"\u7EE7\u7EED","timer.reset":"\u91CD\u7F6E","timer.timeUp":"\u65F6\u95F4\u5230","timer.timeUpStep":"\u7B2C {number} \u6B65\u65F6\u95F4\u5230","timer.tray":"\u6B63\u5728\u8BA1\u65F6","timer.trayItem":"\u7B2C {number} \u6B65 {label}\uFF1A{time}\uFF0C\u70B9\u51FB\u67E5\u770B","timer.of":"{label} \xB7 {minutes}","duration.minutes":"{minutes} \u5206\u949F","duration.hours":"{hours} \u5C0F\u65F6","duration.hoursMinutes":"{hours} \u5C0F\u65F6 {minutes} \u5206\u949F","ribbon.label":"\u65F6\u95F4\u7EBF","ribbon.total":"\u603B\u8BA1","ribbon.active":"\u52A8\u624B","ribbon.wait":"\u7B49\u5F85","ribbon.hint":"\u70B9\u51FB\u4E00\u884C\u8DF3\u5230\u8BE5\u6B65\u9AA4","ribbon.row":"\u7B2C {number} \u6B65 {label}","focus.position":"\u6B65\u9AA4 {number} / {total}","focus.prev":"\u4E0A\u4E00\u6B65","focus.next":"\u4E0B\u4E00\u6B65","focus.nav":"\u6B65\u9AA4\u5BFC\u822A","focus.goTo":"\u8DF3\u5230\u7B2C {number} \u6B65\uFF1A{title}"},en:{title:"Steps",progress:"{done} of {total} steps done",allDone:"All steps done",resetProgress:"Reset",resetProgressLabel:"Clear every done mark",tickHint:"Click a number to mark it done",markDone:"Mark step {number} as done",markUndone:"Step {number} is done; click to undo",note:"Note",result:"Result",cue:"You are there when",wait:"While you wait","code.label":"Code","code.variants":"Choose an environment","code.copy":"Copy","code.copied":"Copied","code.copyLabel":"Copy {label}","code.selected":"Selected. Press \u2318C / Ctrl+C to copy","code.stepLabel":"code for step {number}","timer.label":"Timer","timer.start":"Start timer","timer.pause":"Pause","timer.resume":"Resume","timer.reset":"Reset","timer.timeUp":"Time's up","timer.timeUpStep":"Step {number}: time's up","timer.tray":"Running timers","timer.trayItem":"Step {number} {label}: {time}; click to view","timer.of":"{label} \xB7 {minutes}","duration.minutes":"{minutes} min","duration.hours":"{hours} h","duration.hoursMinutes":"{hours} h {minutes} min","ribbon.label":"Timeline","ribbon.total":"total","ribbon.active":"Hands-on","ribbon.wait":"Waiting","ribbon.hint":"Click a row to jump to that step","ribbon.row":"Step {number} {label}","focus.position":"Step {number} of {total}","focus.prev":"Previous","focus.next":"Next","focus.nav":"Step navigation","focus.goTo":"Go to step {number}: {title}"}});var s=B(F(),1);function bs({source:l,className:c}){return(0,s.jsx)(s.Fragment,{children:l.split(/\n+/).filter(t=>t.trim()).map((t,r)=>(0,s.jsx)("p",{className:c,children:(0,s.jsx)(v,{source:t})},r))})}function as(l,c){let t=document.activeElement,r=document.createElement("textarea");r.value=l,r.setAttribute("readonly",""),r.style.cssText="position:fixed;top:0;left:0;width:1px;height:1px;opacity:0;pointer-events:none",document.body.appendChild(r),r.select();let n=document.execCommand("copy");if(r.remove(),t?.focus?.({preventScroll:!0}),!n&&c){let g=document.createRange();g.selectNodeContents(c);let i=window.getSelection();i?.removeAllRanges(),i?.addRange(g)}return n}var is=(l,c)=>{let t=l.trimStart();return t.startsWith("//")?!0:t.startsWith("#")&&!t.startsWith("#!")&&!/^(md|markdown)$/i.test(c??"")};function ns({variants:l,name:c,fallbackLang:t}){let r=j(K),n=(0,d.useId)(),[g,i]=(0,d.useState)(0),[k,y]=(0,d.useState)("idle"),N=(0,d.useRef)(null),S=(0,d.useRef)(null),z=(0,d.useRef)(void 0);(0,d.useEffect)(()=>()=>window.clearTimeout(z.current),[]);let a=l.length>1,x=l[Math.min(g,l.length-1)],D=x.code.replace(/\n+$/,""),h=x.lang??t,L=()=>{let u=as(D,N.current);y(u?"copied":"selected"),window.clearTimeout(z.current),z.current=window.setTimeout(()=>y("idle"),u?1500:4e3)},R=u=>{i(u),y("idle")},E=u=>{let p={ArrowRight:g+1,ArrowLeft:g-1,Home:0,End:l.length-1};if(!(u.key in p))return;u.preventDefault();let T=(p[u.key]+l.length)%l.length;R(T),S.current?.children[T]?.focus()};return(0,s.jsxs)("div",{className:"sg-code",children:[(0,s.jsxs)("div",{className:"sg-codebar",children:[a?(0,s.jsx)("div",{className:"sg-tabs",role:"tablist","aria-label":r("code.variants"),ref:S,onKeyDown:E,children:l.map((u,p)=>(0,s.jsx)("button",{type:"button",role:"tab",id:`${n}-tab${p}`,"aria-selected":p===g,"aria-controls":`${n}-panel${p}`,tabIndex:p===g?0:-1,onClick:()=>R(p),children:u.label},p))}):(0,s.jsx)("span",{className:"sg-lang",children:x.label||h||r("code.label")}),(0,s.jsx)("span",{className:"sg-copy-hint","aria-live":"polite",children:k==="selected"?r("code.selected"):""}),(0,s.jsxs)("button",{type:"button",className:`sg-copy${k==="copied"?" is-ok":""}`,onClick:L,"aria-label":k==="copied"?r("code.copied"):r("code.copyLabel",{label:c}),children:[k==="copied"?(0,s.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M3.5 8.5l3 3 6-7"})}):(0,s.jsxs)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,s.jsx)("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5"}),(0,s.jsx)("path",{d:"M10.5 3.5v-.5a1 1 0 0 0-1-1h-6a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h.5"})]}),(0,s.jsx)("span",{children:r(k==="copied"?"code.copied":"code.copy")})]})]}),l.map((u,p)=>(0,s.jsx)("pre",{className:"sg-pre",id:`${n}-panel${p}`,role:a?"tabpanel":void 0,"aria-labelledby":a?`${n}-tab${p}`:void 0,"aria-label":a?void 0:c,"data-label":a?u.label:void 0,hidden:p!==g,tabIndex:0,children:(0,s.jsx)("code",{ref:p===g?N:void 0,children:u.code.replace(/\n+$/,"").split(`
3
3
  `).map((T,C)=>(0,s.jsxs)("span",{className:is(T,u.lang??t)?"sg-comment":void 0,children:[T,`
4
4
  `]},C))})},p))]})}function H(l,c){let t=Math.floor(l/60),r=Math.round(l%60);return t?r?c("duration.hoursMinutes",{hours:t,minutes:r}):c("duration.hours",{hours:t}):c("duration.minutes",{minutes:r})}function ss(l){let c=Math.max(0,Math.ceil(l/1e3)),t=Math.floor(c/3600),r=Math.floor(c%3600/60),n=String(c%60).padStart(2,"0");return t?`${t}:${String(r).padStart(2,"0")}:${n}`:`${r}:${n}`}var gs=l=>l===0?"0":`${Math.floor(l/60)}:${String(l%60).padStart(2,"0")}`,ks=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function ds({step:l,number:c,timer:t,left:r,large:n,onToggle:g,onReset:i,t:k}){let y=l.timer.minutes*6e4,N=y?r/y:0,S=54,z=2*Math.PI*S,a=l.timer.label,x=t?.done?" is-done":t?.endAt?" is-run":"";return(0,s.jsxs)("div",{className:`sg-timer${n?" is-large":""}${x}`,role:"group","aria-label":a?`${k("timer.label")} \xB7 ${a}`:k("timer.label"),children:[n&&(0,s.jsxs)("svg",{viewBox:"0 0 132 132",className:"sg-ring","aria-hidden":"true",children:[(0,s.jsx)("circle",{cx:"66",cy:"66",r:S,className:"sg-ring-bg"}),(0,s.jsx)("circle",{cx:"66",cy:"66",r:S,className:"sg-ring-fg",strokeDasharray:z,strokeDashoffset:z*(1-N),transform:"rotate(-90 66 66)"})]}),(0,s.jsxs)("div",{className:"sg-clock",children:[(0,s.jsx)("b",{role:"timer",children:t?.done?k("timer.timeUp"):ss(r)}),a&&(0,s.jsx)("span",{children:a})]}),!n&&(0,s.jsx)("span",{className:"sg-meter","aria-hidden":"true",children:(0,s.jsx)("i",{style:{width:`${(1-N)*100}%`}})}),(0,s.jsxs)("div",{className:"sg-timer-buttons",children:[!t?.done&&(0,s.jsxs)("button",{type:"button",className:"sg-go",onClick:g,"aria-label":`${t?.endAt?k("timer.pause"):k(t?"timer.resume":"timer.start")} \xB7 ${c}`,children:[(0,s.jsx)("span",{"aria-hidden":"true",children:t?.endAt?"\u275A\u275A":"\u25B6"}),t?.endAt?k("timer.pause"):k(t?"timer.resume":"timer.start")]}),t&&(0,s.jsxs)("button",{type:"button",className:"sg-reset",onClick:i,children:[(0,s.jsx)("span",{"aria-hidden":"true",children:"\u21BA"}),k("timer.reset")]})]})]})}function G({step:l,number:c,t,timer:r}){let n=l.variants?.length?l.variants:l.code?[{label:"",code:l.code,lang:l.lang}]:null;return(0,s.jsxs)(s.Fragment,{children:[l.body&&(0,s.jsx)(bs,{source:l.body,className:"sg-body"}),n&&(0,s.jsx)(ns,{variants:n,name:t("code.stepLabel",{number:c}),fallbackLang:l.lang}),l.cue&&(0,s.jsxs)("p",{className:"sg-hint is-cue",children:[(0,s.jsx)("b",{children:t("cue")}),(0,s.jsx)("span",{children:(0,s.jsx)(v,{source:l.cue})})]}),l.wait&&(0,s.jsxs)("p",{className:"sg-hint is-wait",children:[(0,s.jsx)("b",{children:t("wait")}),(0,s.jsx)("span",{children:(0,s.jsx)(v,{source:l.wait})})]}),l.note&&(0,s.jsxs)("p",{className:"sg-note",children:[(0,s.jsxs)("svg",{viewBox:"0 0 16 16",role:"img","aria-label":t("note"),children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"6.2"}),(0,s.jsx)("path",{d:"M8 7.2v3.6M8 5.1v.1"})]}),(0,s.jsx)("span",{children:(0,s.jsx)(v,{source:l.note})})]}),l.result&&(0,s.jsxs)("p",{className:"sg-result",children:[(0,s.jsxs)("svg",{viewBox:"0 0 16 16",role:"img","aria-label":t("result"),children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"7"}),(0,s.jsx)("path",{d:"M4.9 8.2l2.1 2.1 4.1-4.5"})]}),(0,s.jsx)("span",{children:(0,s.jsx)(v,{source:l.result})})]}),r]})}function _({step:l,t:c}){if(!l.timer)return null;let t=H(l.timer.minutes,c);return(0,s.jsxs)("p",{className:"sg-timer-static",children:[(0,s.jsx)("span",{"aria-hidden":"true",children:"\u23F1 "}),l.timer.label?c("timer.of",{label:l.timer.label,minutes:t}):t]})}var ps=()=>(0,s.jsx)("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M3.8 8.4l2.8 2.8 5.6-6.4"})});function Ss({data:l}){let c=j(K),t=l,r=t.steps,n=t.layout==="focus",g=t.start??1,i=(o,e)=>o.id??`#${e}`,k=o=>o.short??U(o.title),y=(0,d.useId)(),N=o=>`${y}-step${o}`,[S,z]=(0,d.useState)(()=>Math.min(Math.max(t.initialStep??0,0),r.length-1)),a=Math.min(S,r.length-1),[x,D]=(0,d.useState)(()=>new Set),[h,L]=(0,d.useState)({}),[R,E]=(0,d.useState)(()=>Date.now()),[u,p]=(0,d.useState)(""),T=(0,d.useRef)(null);(0,d.useEffect)(()=>{if(!Object.values(h).some(e=>e.endAt))return;let o=window.setInterval(()=>{let e=Date.now();E(e);let b=Object.entries(h).filter(([,f])=>f.endAt!==null&&f.endAt<=e);if(!b.length)return;L(f=>{let $={...f};for(let[ls]of b)$[ls]={left:0,endAt:null,done:!0};return $});let m=r.findIndex((f,$)=>i(f,$)===b[0][0]);p(c("timer.timeUpStep",{number:g+m}))},250);return()=>window.clearInterval(o)},[h,r,g,c]);let C=r.filter((o,e)=>x.has(i(o,e))).length,os=o=>D(e=>{let b=new Set(e);return b.has(o)?b.delete(o):b.add(o),b}),P=(o,e)=>{let b=h[i(o,e)];return b?b.endAt?Math.max(0,b.endAt-R):b.left:(o.timer?.minutes??0)*6e4},es=(o,e)=>{let b=i(o,e),m=h[b];if(m?.done)return;let f=P(o,e),$=Date.now();E($),L({...h,[b]:m?.endAt?{left:f,endAt:null,done:!1}:{left:f,endAt:$+f,done:!1}})},cs=(o,e)=>{let b={...h};delete b[i(o,e)],L(b)},M=o=>{let e=Math.min(r.length-1,Math.max(0,o));if(z(e),n)return;let b=T.current?.querySelector(`[id="${N(e)}"]`);b?.scrollIntoView({block:"nearest",behavior:ks()?"auto":"smooth"}),b?.querySelector(".sg-num")?.focus({preventScroll:!0})},ts=o=>{if(!(!n||o.defaultPrevented||o.target.closest("[role=tablist], pre, input, textarea"))){if(o.key==="ArrowRight")M(a+1);else if(o.key==="ArrowLeft")M(a-1);else return;o.preventDefault()}},O=(o,e,b)=>o.timer?(0,s.jsx)(ds,{step:o,number:g+e,timer:h[i(o,e)],left:P(o,e),large:b,onToggle:()=>es(o,e),onReset:()=>cs(o,e),t:c}):null,W=(o,e,b="sg-num")=>{let m=g+e,f=x.has(i(o,e));return(0,s.jsx)("button",{type:"button",className:b,"aria-pressed":f,"aria-label":f?c("markUndone",{number:m}):c("markDone",{number:m}),onClick:()=>os(i(o,e)),children:f?(0,s.jsx)(ps,{}):m})},V=r.map((o,e)=>({step:o,i:e,timer:h[i(o,e)]})).filter(({i:o,timer:e})=>e&&(e.endAt||e.done)&&!(n&&o===a)),A=J(r),Y=Q(A.total),I=o=>`${o/A.total*100}%`,w=r[a];return(0,s.jsxs)("section",{ref:T,className:`sb-block sg-block ${n?"is-focus":"is-list"}`,"aria-label":Z(t.title,c("title")),onKeyDown:ts,children:[(t.title||t.description)&&(0,s.jsxs)("div",{className:"sg-head",children:[t.title&&(0,s.jsx)("h3",{className:"sg-heading",children:t.title}),t.description&&(0,s.jsx)("p",{className:"sg-sub",children:(0,s.jsx)(v,{source:t.description})})]}),r.length>1&&(0,s.jsxs)("div",{className:"sg-progress",children:[(0,s.jsx)("span",{className:"sg-count","aria-live":"polite",children:C===r.length?c("allDone"):c("progress",{done:C,total:r.length})}),(0,s.jsx)("span",{className:"sg-bar","aria-hidden":"true",children:(0,s.jsx)("i",{style:{width:`${C/r.length*100}%`}})}),C>0?(0,s.jsx)("button",{type:"button",className:"sg-clear","aria-label":c("resetProgressLabel"),onClick:()=>D(new Set),children:c("resetProgress")}):!n&&(0,s.jsx)("span",{className:"sg-tip",children:c("tickHint")})]}),A.total>0&&(0,s.jsxs)("div",{className:"sg-ribbon",role:"group","aria-label":c("ribbon.label"),children:[(0,s.jsxs)("div",{className:"sg-ribbon-sum",children:[(0,s.jsxs)("span",{className:"sg-ribbon-total",children:[(0,s.jsx)("b",{children:H(A.total,c)})," ",c("ribbon.total")]}),(0,s.jsxs)("span",{className:"sg-key is-active",children:[(0,s.jsx)("i",{"aria-hidden":"true"})," ",c("ribbon.active")," ",(0,s.jsx)("b",{children:H(A.active,c)})]}),(0,s.jsxs)("span",{className:"sg-key is-wait",children:[(0,s.jsx)("i",{"aria-hidden":"true"})," ",c("ribbon.wait")," ",(0,s.jsx)("b",{children:H(A.wait,c)})]}),(0,s.jsx)("span",{className:"sg-ribbon-hint",children:c("ribbon.hint")})]}),(0,s.jsxs)("div",{className:"sg-ribbon-rows",children:[r.map((o,e)=>o.segments?.length?(0,s.jsxs)("button",{type:"button",className:`sg-row${n&&e===a?" is-current":""}${x.has(i(o,e))?" is-done":""}`,"aria-current":n&&e===a?"step":void 0,"aria-label":c("ribbon.row",{number:g+e,label:k(o)}),onClick:()=>M(e),children:[(0,s.jsxs)("span",{className:"sg-row-label","aria-hidden":"true",children:[(0,s.jsx)("em",{children:g+e}),k(o)]}),(0,s.jsxs)("span",{className:"sg-track","aria-hidden":"true",children:[Y.map(b=>(0,s.jsx)("span",{className:"sg-grid",style:{left:I(b)}},b)),o.segments.map((b,m)=>(0,s.jsx)("span",{className:`sg-seg is-${b.kind}`,style:{left:I(b.start),width:I(b.minutes)},children:h[i(o,e)]?.endAt&&m===o.segments.length-1&&(0,s.jsx)("span",{className:"sg-live"})},m))]})]},i(o,e)):null),(0,s.jsxs)("div",{className:"sg-axis","aria-hidden":"true",children:[(0,s.jsx)("span",{}),(0,s.jsx)("span",{className:"sg-track",children:Y.map(o=>(0,s.jsx)("span",{style:{left:I(o)},children:gs(o)},o))})]})]})]}),V.length>0&&(0,s.jsx)("div",{className:"sg-tray",role:"group","aria-label":c("timer.tray"),children:V.map(({step:o,i:e,timer:b})=>{let m=b.done?c("timer.timeUp"):ss(P(o,e));return(0,s.jsxs)("button",{type:"button",className:b.done?"is-done":void 0,"aria-label":c("timer.trayItem",{number:g+e,label:k(o),time:m}),onClick:()=>M(e),children:[(0,s.jsx)("span",{"aria-hidden":"true",children:b.done?"\u23F0":"\u23F1"}),(0,s.jsx)("span",{className:"sg-tray-label",children:k(o)}),(0,s.jsx)("b",{children:m})]},i(o,e))})}),n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"sg-card",children:[(0,s.jsxs)("div",{className:"sg-card-main",children:[(0,s.jsxs)("div",{className:`sg-card-head${x.has(i(w,a))?" is-done":""}`,children:[W(w,a,"sg-num is-large"),(0,s.jsxs)("div",{className:"sg-card-titles",children:[(0,s.jsx)("small",{children:c("focus.position",{number:a+1,total:r.length})}),(0,s.jsx)("h4",{className:"sg-title","aria-live":"polite",children:(0,s.jsx)(v,{source:w.title})})]}),w.badge&&(0,s.jsx)("span",{className:"sg-badge",children:w.badge})]}),(0,s.jsx)(G,{step:w,number:g+a,t:c})]}),w.timer&&(0,s.jsx)("div",{className:"sg-card-side",children:O(w,a,!0)})]},i(w,a)),(0,s.jsxs)("nav",{className:"sg-foot","aria-label":c("focus.nav"),children:[(0,s.jsxs)("button",{type:"button",className:"sg-nav",onClick:()=>M(a-1),disabled:a===0,children:[(0,s.jsx)("span",{"aria-hidden":"true",children:"\u2190 "}),c("focus.prev")]}),(0,s.jsx)("div",{className:"sg-dots",children:r.map((o,e)=>(0,s.jsx)("button",{type:"button","aria-label":c("focus.goTo",{number:g+e,title:U(o.title)}),"aria-current":e===a?"step":void 0,className:`${e===a?"is-current":""}${x.has(i(o,e))?" is-done":""}`,onClick:()=>M(e)},i(o,e)))}),(0,s.jsxs)("button",{type:"button",className:"sg-nav is-next",onClick:()=>M(a+1),disabled:a===r.length-1,children:[c("focus.next"),(0,s.jsx)("span",{"aria-hidden":"true",children:" \u2192"})]})]}),(0,s.jsx)("ol",{className:"sg-print",start:g,children:r.map((o,e)=>(0,s.jsxs)("li",{children:[(0,s.jsxs)("h4",{className:"sg-title",children:[(0,s.jsx)(v,{source:o.title}),o.badge&&(0,s.jsx)("span",{className:"sg-badge",children:o.badge})]}),(0,s.jsx)(G,{step:o,number:g+e,t:c,timer:(0,s.jsx)(_,{step:o,t:c})})]},i(o,e)))})]}):(0,s.jsx)("ol",{className:"sg-list",children:r.map((o,e)=>{let b=x.has(i(o,e));return(0,s.jsxs)("li",{id:N(e),className:`sg-step${b?" is-done":""}`,children:[(0,s.jsxs)("div",{className:"sg-rail",children:[W(o,e),e<r.length-1&&(0,s.jsx)("span",{className:"sg-line","aria-hidden":"true"})]}),(0,s.jsxs)("div",{className:"sg-content",children:[(0,s.jsxs)("h4",{className:"sg-title",children:[(0,s.jsx)(v,{source:o.title}),o.badge&&(0,s.jsx)("span",{className:"sg-badge",children:o.badge})]}),(0,s.jsx)(G,{step:o,number:g+e,t:c,timer:o.timer&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"sg-screen",children:O(o,e,!1)}),(0,s.jsx)("div",{className:"sg-print-only",children:(0,s.jsx)(_,{step:o,t:c})})]})})]})]},i(o,e))})}),(0,s.jsx)("p",{className:"sg-announce","aria-live":"assertive",children:u})]})}export{ns as a,Ss as b};
@@ -1 +1 @@
1
- import{d as p}from"./chunk-55FJSXTX.js";var r=t=>{throw new Error(t)},h=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function l(t,i,o){(typeof t!="string"||!t.trim())&&r(`${i} must be non-empty text.`),t.length>o&&r(`${i} must be at most ${o} characters.`)}function a(t,i,o){t!==void 0&&l(t,i,o)}function g(t,i){(typeof t!="string"||!t.trim())&&r(`${i} must be non-empty code.`),t.length>8e3&&r(`${i} must be at most 8000 characters.`)}function b(t,i,o,e,f=!1){(typeof t!="number"||!Number.isFinite(t)||(f?t<=o:t<o)||t>e)&&r(`${i} must be a number ${f?"above":"of at least"} ${o} and at most ${e}.`)}function y(t,i,o,e){(!Number.isInteger(t)||t<o||t>e)&&r(`${i} must be an integer from ${o} to ${e}.`)}function m(t,i,o,e=0){return(!Array.isArray(t)||t.length<e||t.length>o)&&r(`${i} must be an array of ${e} to ${o} items.`),t.forEach((f,n)=>{h(f)||r(`${i}[${n}] must be an object.`)}),t}function u(t,i,o){for(let e of Object.keys(t))i.includes(e)||r(`${o}.${e} is not a known field.`)}var w=["list","focus"],S=["active","wait"],x=["id","title","short","badge","body","code","lang","variants","note","result","cue","wait","timer","segments"];function E(t){a(t.description,"description",600),t.layout!==void 0&&!w.includes(t.layout)&&r(`layout must be one of ${w.join(", ")}.`),t.start!==void 0&&y(t.start,"start",0,999);let i=m(t.steps,"steps",40,1);t.initialStep!==void 0&&y(t.initialStep,"initialStep",0,i.length-1);let o=new Set;i.forEach((e,f)=>{let n=`steps[${f}]`;u(e,x,n),e.id!==void 0&&(l(e.id,`${n}.id`,64),o.has(e.id)&&r(`${n}.id duplicates ${e.id}.`),o.add(e.id)),l(e.title,`${n}.title`,160),a(e.short,`${n}.short`,24),a(e.badge,`${n}.badge`,24),a(e.body,`${n}.body`,3e3);for(let s of["note","result","cue","wait"])a(e[s],`${n}.${s}`,600);if(a(e.lang,`${n}.lang`,24),e.code!==void 0&&g(e.code,`${n}.code`),e.variants!==void 0){e.code!==void 0&&r(`${n} uses either code or variants, not both.`);let s=new Set;m(e.variants,`${n}.variants`,6,1).forEach((c,d)=>{let $=`${n}.variants[${d}]`;u(c,["label","code","lang"],$),l(c.label,`${$}.label`,32),s.has(c.label)&&r(`${$}.label duplicates ${c.label}.`),s.add(c.label),g(c.code,`${$}.code`),a(c.lang,`${$}.lang`,24)})}e.timer!==void 0&&(h(e.timer)||r(`${n}.timer must be an object.`),u(e.timer,["minutes","label"],`${n}.timer`),b(e.timer.minutes,`${n}.timer.minutes`,0,1440,!0),a(e.timer.label,`${n}.timer.label`,40)),e.segments!==void 0&&m(e.segments,`${n}.segments`,8,1).forEach((s,c)=>{let d=`${n}.segments[${c}]`;u(s,["start","minutes","kind"],d),b(s.start,`${d}.start`,0,1e4),b(s.minutes,`${d}.minutes`,0,1e4,!0),S.includes(s.kind)||r(`${d}.kind must be one of ${S.join(", ")}.`)})})}function k(t){a(t.description,"description",600),a(t.placeholder,"placeholder",60),a(t.program,"program",40),t.program!==void 0&&/\s/.test(t.program)&&r("program must be a single word.");let i=new Set;m(t.groups,"groups",16,1).forEach((e,f)=>{let n=`groups[${f}]`;u(e,["id","label"],n),l(e.id,`${n}.id`,64),i.has(e.id)&&r(`${n}.id duplicates ${e.id}.`),i.add(e.id),l(e.label,`${n}.label`,24)});let o=new Set;m(t.commands,"commands",300,1).forEach((e,f)=>{let n=`commands[${f}]`;if(u(e,["id","group","command","summary","detail","params","examples"],n),e.id!==void 0&&(l(e.id,`${n}.id`,64),o.has(e.id)&&r(`${n}.id duplicates ${e.id}.`),o.add(e.id)),l(e.group,`${n}.group`,64),i.has(e.group)||r(`${n}.group ${e.group} does not match a group id.`),l(e.command,`${n}.command`,240),l(e.summary,`${n}.summary`,240),a(e.detail,`${n}.detail`,3e3),e.params!==void 0){let s=new Set;m(e.params,`${n}.params`,40,1).forEach((c,d)=>{let $=`${n}.params[${d}]`;u(c,["name","meaning"],$),l(c.name,`${$}.name`,80),s.has(c.name)&&r(`${$}.name duplicates ${c.name}.`),s.add(c.name),l(c.meaning,`${$}.meaning`,400)})}e.examples!==void 0&&m(e.examples,`${n}.examples`,6,1).forEach((s,c)=>{let d=`${n}.examples[${c}]`;u(s,["label","code"],d),a(s.label,`${d}.label`,40),g(s.code,`${d}.code`)})})}function T(t,i){return h(i)||r("Component data must be an object."),a(i.title,"title",120),t==="step-guide"?E(i):t==="command-reference"?k(i):r(`Unknown doc reference component ${t}.`),i}function A(t){let i=0,o=0,e=0;for(let f of t)for(let n of f.segments??[])n.kind==="active"?i+=n.minutes:o+=n.minutes,e=Math.max(e,n.start+n.minutes);return{active:i,wait:o,total:e}}function C(t){if(!(t>0))return[];let i=[5,10,15,30,60,120,240,480].find(e=>t/e<=8)??Math.ceil(t/8/60)*60,o=[];for(let e=0;e<=t;e+=i)o.push(e);return o}function O(t){return[...new Set(t.toLowerCase().split(/\s+/).filter(Boolean))]}function L(t,i){let o=[t.command,p(t.summary),...(t.params??[]).map(e=>`${e.name} ${e.meaning}`)].map(e=>e.toLowerCase());return i.every(e=>o.some(f=>f.includes(e)))}function M(t,i){let o=t.toLowerCase(),e=[];for(let n of i)for(let s=o.indexOf(n);s>=0;s=o.indexOf(n,s+n.length))e.push([s,s+n.length]);e.sort((n,s)=>n[0]-s[0]);let f=[];for(let n of e){let s=f[f.length-1];s&&n[0]<=s[1]?s[1]=Math.max(s[1],n[1]):f.push([n[0],n[1]])}return f}export{T as a,A as b,C as c,O as d,L as e,M as f};
1
+ import{d as p}from"./chunk-2URYNZTR.js";var r=t=>{throw new Error(t)},h=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function l(t,i,o){(typeof t!="string"||!t.trim())&&r(`${i} must be non-empty text.`),t.length>o&&r(`${i} must be at most ${o} characters.`)}function a(t,i,o){t!==void 0&&l(t,i,o)}function g(t,i){(typeof t!="string"||!t.trim())&&r(`${i} must be non-empty code.`),t.length>8e3&&r(`${i} must be at most 8000 characters.`)}function b(t,i,o,e,f=!1){(typeof t!="number"||!Number.isFinite(t)||(f?t<=o:t<o)||t>e)&&r(`${i} must be a number ${f?"above":"of at least"} ${o} and at most ${e}.`)}function y(t,i,o,e){(!Number.isInteger(t)||t<o||t>e)&&r(`${i} must be an integer from ${o} to ${e}.`)}function m(t,i,o,e=0){return(!Array.isArray(t)||t.length<e||t.length>o)&&r(`${i} must be an array of ${e} to ${o} items.`),t.forEach((f,n)=>{h(f)||r(`${i}[${n}] must be an object.`)}),t}function u(t,i,o){for(let e of Object.keys(t))i.includes(e)||r(`${o}.${e} is not a known field.`)}var w=["list","focus"],S=["active","wait"],x=["id","title","short","badge","body","code","lang","variants","note","result","cue","wait","timer","segments"];function E(t){a(t.description,"description",600),t.layout!==void 0&&!w.includes(t.layout)&&r(`layout must be one of ${w.join(", ")}.`),t.start!==void 0&&y(t.start,"start",0,999);let i=m(t.steps,"steps",40,1);t.initialStep!==void 0&&y(t.initialStep,"initialStep",0,i.length-1);let o=new Set;i.forEach((e,f)=>{let n=`steps[${f}]`;u(e,x,n),e.id!==void 0&&(l(e.id,`${n}.id`,64),o.has(e.id)&&r(`${n}.id duplicates ${e.id}.`),o.add(e.id)),l(e.title,`${n}.title`,160),a(e.short,`${n}.short`,24),a(e.badge,`${n}.badge`,24),a(e.body,`${n}.body`,3e3);for(let s of["note","result","cue","wait"])a(e[s],`${n}.${s}`,600);if(a(e.lang,`${n}.lang`,24),e.code!==void 0&&g(e.code,`${n}.code`),e.variants!==void 0){e.code!==void 0&&r(`${n} uses either code or variants, not both.`);let s=new Set;m(e.variants,`${n}.variants`,6,1).forEach((c,d)=>{let $=`${n}.variants[${d}]`;u(c,["label","code","lang"],$),l(c.label,`${$}.label`,32),s.has(c.label)&&r(`${$}.label duplicates ${c.label}.`),s.add(c.label),g(c.code,`${$}.code`),a(c.lang,`${$}.lang`,24)})}e.timer!==void 0&&(h(e.timer)||r(`${n}.timer must be an object.`),u(e.timer,["minutes","label"],`${n}.timer`),b(e.timer.minutes,`${n}.timer.minutes`,0,1440,!0),a(e.timer.label,`${n}.timer.label`,40)),e.segments!==void 0&&m(e.segments,`${n}.segments`,8,1).forEach((s,c)=>{let d=`${n}.segments[${c}]`;u(s,["start","minutes","kind"],d),b(s.start,`${d}.start`,0,1e4),b(s.minutes,`${d}.minutes`,0,1e4,!0),S.includes(s.kind)||r(`${d}.kind must be one of ${S.join(", ")}.`)})})}function k(t){a(t.description,"description",600),a(t.placeholder,"placeholder",60),a(t.program,"program",40),t.program!==void 0&&/\s/.test(t.program)&&r("program must be a single word.");let i=new Set;m(t.groups,"groups",16,1).forEach((e,f)=>{let n=`groups[${f}]`;u(e,["id","label"],n),l(e.id,`${n}.id`,64),i.has(e.id)&&r(`${n}.id duplicates ${e.id}.`),i.add(e.id),l(e.label,`${n}.label`,24)});let o=new Set;m(t.commands,"commands",300,1).forEach((e,f)=>{let n=`commands[${f}]`;if(u(e,["id","group","command","summary","detail","params","examples"],n),e.id!==void 0&&(l(e.id,`${n}.id`,64),o.has(e.id)&&r(`${n}.id duplicates ${e.id}.`),o.add(e.id)),l(e.group,`${n}.group`,64),i.has(e.group)||r(`${n}.group ${e.group} does not match a group id.`),l(e.command,`${n}.command`,240),l(e.summary,`${n}.summary`,240),a(e.detail,`${n}.detail`,3e3),e.params!==void 0){let s=new Set;m(e.params,`${n}.params`,40,1).forEach((c,d)=>{let $=`${n}.params[${d}]`;u(c,["name","meaning"],$),l(c.name,`${$}.name`,80),s.has(c.name)&&r(`${$}.name duplicates ${c.name}.`),s.add(c.name),l(c.meaning,`${$}.meaning`,400)})}e.examples!==void 0&&m(e.examples,`${n}.examples`,6,1).forEach((s,c)=>{let d=`${n}.examples[${c}]`;u(s,["label","code"],d),a(s.label,`${d}.label`,40),g(s.code,`${d}.code`)})})}function T(t,i){return h(i)||r("Component data must be an object."),a(i.title,"title",120),t==="step-guide"?E(i):t==="command-reference"?k(i):r(`Unknown doc reference component ${t}.`),i}function A(t){let i=0,o=0,e=0;for(let f of t)for(let n of f.segments??[])n.kind==="active"?i+=n.minutes:o+=n.minutes,e=Math.max(e,n.start+n.minutes);return{active:i,wait:o,total:e}}function C(t){if(!(t>0))return[];let i=[5,10,15,30,60,120,240,480].find(e=>t/e<=8)??Math.ceil(t/8/60)*60,o=[];for(let e=0;e<=t;e+=i)o.push(e);return o}function O(t){return[...new Set(t.toLowerCase().split(/\s+/).filter(Boolean))]}function L(t,i){let o=[t.command,p(t.summary),...(t.params??[]).map(e=>`${e.name} ${e.meaning}`)].map(e=>e.toLowerCase());return i.every(e=>o.some(f=>f.includes(e)))}function M(t,i){let o=t.toLowerCase(),e=[];for(let n of i)for(let s=o.indexOf(n);s>=0;s=o.indexOf(n,s+n.length))e.push([s,s+n.length]);e.sort((n,s)=>n[0]-s[0]);let f=[];for(let n of e){let s=f[f.length-1];s&&n[0]<=s[1]?s[1]=Math.max(s[1],n[1]):f.push([n[0],n[1]])}return f}export{T as a,A as b,C as c,O as d,L as e,M as f};