{"main":"apps/model-tour/model-tour.declare","kind":"run","props":{"render":"dom"},"programJson":{"classes":[{"name":"Director","base":"Node","body":{"tag":"Director","decls":[{"name":"chipGeo","type":"ChipGeo","def":{"kind":"code","src":" this.$root.tour.value?.chip ?? ({ chipH: 36, chipR: 18, padStart: 12, padEnd: 14, gap: 8, dot: 10, dotR: 5, fontSize: 15 }) ","deps":["this.$root.tour.value.chip"]}}],"methods":[{"name":"geo","params":[{"name":"step","type":"string"}],"returns":"Geo","returnsNullable":false,"body":"return this.$root.steps.find(s=>s.id==step)?.geo??{}"},{"name":"chipW","params":[{"name":"s","type":"string"}],"returns":"number","returnsNullable":false,"body":"const c=this.chipGeo;return Math.round(c.padStart+c.dot+c.gap+measureText(s,{fontSize:c.fontSize,fontWeight:\"medium\",fontFamily:this.$root.uiFace}).width+c.padEnd)"},{"name":"look","params":[{"name":"i","type":"number"},{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"w","type":"number"},{"name":"h","type":"number"},{"name":"r","type":"number"}],"returns":"Pose","returnsNullable":false,"body":"return{id:i,x,y,w,h,a:1,tone:i,chip:0,zoom:1,label:\"\",rc:[r,r,r,r],grad:0,light:0,sw:0,sides:0,lift:0,rot:0,pivot:0,drawn:0,head:0}"},{"name":"hidden","params":[{"name":"i","type":"number"}],"returns":"Pose","returnsNullable":false,"body":"return{...this.look(i,0,0,0,0,10),a:0}"},{"name":"box","params":[{"name":"i","type":"number"},{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"w","type":"number"},{"name":"h","type":"number"}],"returns":"Pose","returnsNullable":false,"body":"return this.look(i,x,y,w,h,10)"},{"name":"chip","params":[{"name":"i","type":"number"},{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"label","type":"string"}],"returns":"Pose","returnsNullable":false,"body":"return{...this.look(i,x,y,this.chipW(label),this.chipGeo.chipH,this.chipGeo.chipR),chip:1,label}"},{"name":"heading","params":[{"name":"i","type":"number"},{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"label","type":"string"}],"returns":"Pose","returnsNullable":false,"body":"return{...this.chip(i,x,y,label),head:1,w:this.chipW(label)-this.chipGeo.padStart-this.chipGeo.dot-this.chipGeo.gap,h:28}"},{"name":"frame","params":[{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"w","type":"number"},{"name":"h","type":"number"}],"returns":"Frame","returnsNullable":false,"body":"return{x,y,w,h,a:1,solid:0,r:14,zoom:1,blur:0,gray:0,hue:0}"},{"name":"open","params":[{"name":"zoom","type":"number"}],"returns":"Frame","returnsNullable":false,"body":"return{...this.frame(0,0,STAGE_W,STAGE_H),a:0,r:0,zoom}"},{"name":"note","params":[{"name":"id","type":"string"},{"name":"kind","type":"\"label\" | \"tag\" | \"warn\" | \"code\" | \"dot\" | \"hdim\" | \"vdim\" | \"vdimr\" | \"frame\" | \"arrow\" | \"ray\""},{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"w","type":"number"},{"name":"h","type":"number"},{"name":"text","type":"string"}],"returns":"Note","returnsNullable":false,"body":"return{id,kind,x,y,w,h,text}"},{"name":"chipRow","params":[{"name":"labels","type":"string[]"},{"name":"pieces","type":"number[]"},{"name":"y","type":"number"}],"returns":"Pose[]","returnsNullable":false,"body":"const ws=labels.map(s=>this.chipW(s));let x=(STAGE_W-ws.reduce((a,b)=>a+b,0)-10*(labels.length-1))/2;return labels.map((s,i)=>{const p=this.chip(pieces[i],x,y,s);x=x+ws[i]+10;return p})"},{"name":"chipRing","returns":"Pose[]","returnsNullable":false,"body":"const g=this.geo(\"glide\"),r=g.r??120;return this.$root.labels.map((s,i)=>{const a=2*Math.PI*i/this.$root.labels.length;return this.chip(i,STAGE_W/2+r*Math.cos(a)-this.chipW(s)/2,STAGE_H/2+r*Math.sin(a)-this.chipGeo.chipH/2,s)})"},{"name":"chipGrid","returns":"Pose[]","returnsNullable":false,"body":"const g=this.geo(\"glide\"),cell=g.cell??110,rowH=g.rowH??48;return this.$root.labels.map((s,i)=>this.chip(i,STAGE_W/2-1.5*cell+i%3*cell,STAGE_H/2-rowH+Math.floor(i/3)*rowH,s))"},{"name":"raw","params":[{"name":"step","type":"string"}],"returns":"Scene","returnsNullable":false,"body":"const c=this.$root.choices.value;const g=this.geo(step);const k=[0,1,2,3,4,5].map(i=>this.hidden(i));const n=[];let p=this.frame(120,60,360,280);let wordsA=0,glass=0;const put=pieces=>{pieces.forEach(q=>{k[q.id]=q})};switch(step){case\"view\":{p={...this.frame((g.x??0)+c.dx,(g.y??0)+c.dy,g.w??0,g.h??0),solid:1,r:g.r??0};n.push(this.note(\"origin\",\"label\",-2,-18,1,1,\"0, 0\"));n.push(this.note(\"xy\",\"ray\",0,0,p.x,p.y,`x ${p.x}, y ${p.y}`));n.push(this.note(\"w\",\"hdim\",p.x,p.y-14,p.w,1,`width ${p.w}`));n.push(this.note(\"h\",\"vdim\",p.x-14,p.y,1,p.h,`height ${p.h}`));break}case\"content\":{const v=this.geo(\"view\");p={...this.frame(v.x??0,v.y??0,v.w??0,v.h??0),a:0,solid:1,r:v.r??0};wordsA=1;const tw=Math.round(this.$root.wordsW),th=Math.round(this.$root.wordsH),x=g.x??0,y=g.y??0;n.push(this.note(\"frame\",\"frame\",x,y,tw,th,\"\"));n.push(this.note(\"w\",\"hdim\",x,y-14,tw,1,`width ${tw}: its words`));n.push(this.note(\"h\",\"vdim\",x-14,y,1,th,`height ${th}`));break}case\"children\":{p=this.frame((g.x??0)+c.dx,(g.y??0)+c.dy,g.w??0,g.h??0);put(this.ab(g));n.push(this.note(\"origin\",\"label\",p.x+6,p.y+4,1,1,\"0, 0\"));n.push(this.note(\"bx\",\"hdim\",p.x,p.y+(g.by??0)+(g.bh??0)+18,g.bx??0,1,`x ${g.bx}`));n.push(this.note(\"by\",\"vdimr\",p.x+(g.bx??0)+(g.bw??0)+14,p.y,1,g.by??0,`y ${g.by}`));break}case\"order\":{p=this.frame(g.x??0,g.y??0,g.w??0,g.h??0);const ab=this.ab(g);const a=ab[0],b=ab[1];if(c.swapped){k[0]=b;k[1]=a}else{k[0]=a;k[1]=b}const top=c.swapped?a:b;n.push(this.note(\"top\",\"tag\",p.x+top.x+10,p.y+top.y+top.h+10,1,1,(c.swapped?\"a\":\"b\")+\" is written later, so it is on top\"));return{p,wordsA:0,k,glass:0,frost:0,notes:n}}case\"relation\":{const w=c.panelWidth,inset=g.inset??0,bw=g.bw??0;p=this.frame(g.x??0,g.y??0,w,g.h??0);put([this.box(0,g.ax??0,g.ay??0,g.aw??0,g.ah??0),this.box(1,w-bw-inset,g.by??0,bw,g.bh??0)]);n.push(this.note(\"gap\",\"hdim\",p.x+w-inset,p.y+(g.by??0)+(g.bh??0)+24,inset,1,\"\"+inset));n.push(this.note(\"rel\",\"tag\",p.x+24,p.y+(g.h??0)+16,1,1,\"b's x follows the parent's width\"));break}case\"readers\":{p=this.open(1);const z=c.size,h=g.h??0,gap=g.gap??0;const x0=(STAGE_W-(z+2*z+h+2*gap))/2,y0=150;put([this.box(0,x0,y0,z,h),this.box(1,x0+z+gap,y0,2*z,h),this.box(2,x0+3*z+2*gap,y0,h,z)]);n.push(this.note(\"say\",\"label\",0,y0-44,STAGE_W,1,`app.size = ${z}: three readers follow it`));break}case\"spring\":{p=this.open(1);const w=(g.w??0)+(g.grow??0)*this.$root.openT;k[0]=this.box(0,120,160,w,g.h??0);n.push(this.note(\"say\",\"label\",0,116,STAGE_W,1,`t = ${this.$root.openT.toFixed(2)}`));n.push(this.note(\"w\",\"hdim\",120,262,w,1,\"\"));break}case\"layout\":{const col=c.axis==\"y\",ws=this.widths(g),h=g.h??0,gap=g.gap??0;const pw=col?Math.max(...ws):ws.reduce((a,b)=>a+b,0)+gap*(ws.length-1);const ph=col?ws.length*h+gap*(ws.length-1):h;p=this.frame((STAGE_W-pw)/2,(STAGE_H-ph)/2,pw,ph);let at=0;ws.forEach((w,i)=>{k[i]=col?this.box(i,0,at,w,h):this.box(i,at,0,w,h);at=at+(col?h:w)+gap});if(col)n.push(this.note(\"sp\",\"vdim\",p.x-14,p.y+h,1,gap,`spacing ${gap}`));else n.push(this.note(\"sp\",\"hdim\",p.x+ws[0],p.y-14,gap,1,`spacing ${gap}`));n.push(this.note(\"nox\",\"label\",p.x,p.y+ph+18,pw,1,\"no x, no y on the children\"));break}case\"align\":{const ws=this.widths(g),h=g.h??0,gap=g.gap??0;const pw=Math.max(...ws),ph=ws.length*h+gap*(ws.length-1);p=this.frame((STAGE_W-pw)/2,(STAGE_H-ph)/2,pw,ph);ws.forEach((w,i)=>{k[i]=this.box(i,this.alignOffset(c.align,pw,w),i*(h+gap),w,h)});n.push(this.note(\"along\",\"arrow\",p.x-28,p.y,0,ph,\"along: the layout\"));n.push(this.note(\"across\",\"arrow\",p.x,p.y+ph+26,pw,0,\"across: align\"));break}case\"flexes\":case\"decider\":{const w=c.rowWidth,w0=g.w0??0,w2=g.w2??0,h=g.h??0,gap=g.gap??0;const flex=w-w0-w2-2*gap;p=this.frame((STAGE_W-w)/2,160,w,h);put([this.box(0,0,0,w0,h),this.box(1,w0+gap,0,flex,h),this.box(2,w-w2,0,w2,h)]);if(step==\"flexes\")n.push(this.note(\"left\",\"hdim\",p.x+w0+gap,p.y-14,flex,1,`flexes: what is left, ${flex}`));else{n.push(this.note(\"dp\",\"tag\",p.x,p.y-40,1,1,\"parent \\u2014 width: itself \\xB7 height: its content\"));n.push(this.note(\"d0\",\"tag\",p.x,p.y+h+12,1,1,\"width: itself\"));n.push(this.note(\"d1\",\"tag\",p.x+w0+gap,p.y+h+44,1,1,\"width: the layout\"));n.push(this.note(\"d2\",\"tag\",p.x+w-w2,p.y+h+12,1,1,\"width: itself\"));n.push(this.note(\"no\",\"warn\",p.x,p.y+h+94,1,1,\"x = 40 is refused: in a row, the layout places x\"))}break}case\"padding\":{const pad=c.padding,w=g.w??0,h=g.h??0,gap=g.gap??0;const ph=2*pad+3*h+2*gap;p=this.frame(80,(STAGE_H-ph)/2,w,ph);for(let i=0;i<3;i++)k[i]=this.box(i,pad,pad+i*(h+gap),w-2*pad,h);n.push(this.note(\"inner\",\"hdim\",p.x+pad,p.y+ph+30,w-2*pad,1,`100% = ${w-2*pad}`));n.push(this.note(\"pad\",\"hdim\",p.x,p.y-14,Math.max(pad,1),1,`padding ${pad}`));break}case\"scroll\":{const w=g.w??0,h=g.h??0,pad=g.pad??0,rowH=g.rowH??0,gap=g.gap??0;p=this.frame((STAGE_W-w)/2,(STAGE_H-h)/2,w,h);for(let i=0;i<6;i++)k[i]=this.box(i,pad,pad+i*(rowH+gap),w-2*pad,rowH);n.push(this.note(\"ph\",\"vdimr\",p.x+w+14,p.y,1,h,`height ${h}`));n.push(this.note(\"sc\",\"tag\",p.x,p.y+h+10,1,1,`six children, ${2*pad+6*rowH+5*gap} tall: the rest scrolls`));break}case\"fill\":case\"stroke\":case\"corners\":case\"shadow\":{p=this.open(1);const w=g.w??0,h=g.h??0,x=(STAGE_W-w)/2,y=(STAGE_H-h)/2,r=g.r??0;const b=this.look(0,x,y,w,h,0);if(step==\"fill\")k[0]={...b,grad:c.fill==\"gradient\"?1:0};if(step==\"stroke\"){k[0]={...b,light:1,sw:4,sides:c.sides==\"bottom\"?1:0};n.push(this.note(\"w\",\"hdim\",x,y-14,w,1,`width ${w}, with the stroke inside`));n.push(this.note(\"frame\",\"frame\",x,y,w,h,\"\"))}if(step==\"corners\")k[0]={...b,rc:this.cornersOf(c.corners)};if(step==\"shadow\")k[0]={...b,light:1,rc:[r,r,r,r],lift:c.lift};break}case\"presence\":{const gone=c.presence==\"hidden\",w=g.w??0,h=g.h??0,gap=g.gap??0;const pw=gone?2*w+gap:3*w+2*gap;p={...this.frame((STAGE_W-pw)/2,160,pw,h),a:0};put([this.box(0,0,0,w,h),{...this.box(1,gone?(w+gap)/2:w+gap,0,w,h),a:this.presenceAlpha(c.presence)},this.box(2,gone?w+gap:2*(w+gap),0,w,h)]);n.push(this.note(\"say\",\"label\",0,124,STAGE_W,1,this.presenceSays(c.presence)));break}case\"draw\":{p=this.open(1);const s=g.size??0;k[0]={...this.look(0,(STAGE_W-s)/2,(STAGE_H-s)/2,s,s,0),drawn:1};n.push(this.note(\"say\",\"label\",0,(STAGE_H+s)/2+20,STAGE_W,1,`done = ${c.done.toFixed(2)}`));break}case\"clip\":{p=this.frame(g.x??0,g.y??0,g.w??0,g.h??0);put(this.ab(g));n.push(this.note(\"cl\",\"tag\",p.x,p.y+(g.h??0)+16,1,1,this.clipSays(c.clip)));break}case\"scale\":{const s=c.scaleBy,w=g.w??0,h=g.h??0,gap=g.gap??0;const rowH=Math.max(h,h*s),pw=w+gap+w*s+gap+w;p=this.frame((STAGE_W-pw)/2,(STAGE_H-rowH)/2,pw,rowH);put([this.box(0,0,(rowH-h)/2,w,h),{...this.box(1,w+gap-w*(1-s)/2,(rowH-h)/2,w,h),zoom:s},this.box(2,w+gap+w*s+gap,(rowH-h)/2,w,h)]);n.push(this.note(\"sw\",\"hdim\",p.x+w+gap,p.y-14,w*s,1,`${Math.round(w*s)} wide, as seen`));n.push(this.note(\"sl\",\"label\",p.x,p.y+rowH+18,pw,1,\"the row packs what you see\"));break}case\"rotate\":{p=this.open(1);const corner=c.pivot==\"corner\",w=g.w??0,h=g.h??0;const x=(STAGE_W-w)/2,y=(STAGE_H-h)/2;k[0]={...this.look(0,x,y,w,h,0),rot:c.turn,pivot:corner?1:0};n.push(this.note(\"frame\",\"frame\",x,y,w,h,\"\"));n.push(this.note(\"pivot\",\"dot\",corner?x:x+w/2,corner?y:y+h/2,1,1,\"pivot\"));break}case\"filter\":{const w=g.w??0,h=g.h??0,gap=g.gap??0,pw=3*w+2*gap;p={...this.frame((STAGE_W-pw)/2,160,pw,h),a:0,blur:c.filter==\"blur\"?4:0,gray:c.filter==\"grayscale\"?1:0,hue:c.filter==\"hue\"?120:0};for(let i=0;i<3;i++)k[i]=this.box(i,i*(w+gap),0,w,h);break}case\"frost\":{p=this.open(1);put([this.box(0,130,110,120,120),this.box(1,230,180,150,90),this.box(2,350,120,110,130),this.look(3,280,90,70,70,35)]);glass=1;break}case\"chip\":{p=this.open(1);const cg=this.chipGeo,w=this.chipW(\"Design\"),z=2.2;k[0]={...this.chip(0,STAGE_W/2-w/2,STAGE_H/2-cg.chipH/2,\"Design\"),zoom:z};const left=STAGE_W/2-w*z/2,top=STAGE_H/2-cg.chipH*z/2;const dotX=left+(cg.padStart+cg.dot/2)*z;const textX=left+(cg.padStart+cg.dot+cg.gap)*z;n.push(this.note(\"pChip\",\"arrow\",STAGE_W/2-120,70,100,top-74,\"View: rounded, with a row layout\"));n.push(this.note(\"pDot\",\"arrow\",dotX-60,320,60,-(320-STAGE_H/2-8),\"View: the dot\"));n.push(this.note(\"pText\",\"arrow\",textX+120,320,-90,-(320-STAGE_H/2-12),\"Text: the label\"));break}case\"class\":case\"attrs\":case\"control\":case\"state\":{p=this.open(ZOOM);const same=step==\"class\",y=STAGE_H/2-this.chipGeo.chipH/2;const row=this.chipRow(same?[\"Design\",\"Design\",\"Design\"]:this.$root.labels.slice(0,3),[0,1,2],y);put(same?row.map(q=>({...q,tone:0})):row);n.push(this.note(\"say\",\"label\",0,y-this.chipGeo.chipH*(ZOOM-1)/2-44,STAGE_W,1,this.chipsSay(step)));break}case\"bind\":{p=this.open(ZOOM);const w=this.chipW(c.label);k[0]=this.chip(0,STAGE_W/2-w/2,STAGE_H/2-this.chipGeo.chipH/2+20,c.label);n.push(this.note(\"rec\",\"code\",STAGE_W/2-110,70,1,1,`{ \"id\": 1, \"label\": \"${c.label}\" }`));n.push(this.note(\"ptr\",\"arrow\",STAGE_W/2,108,0,54,\"\"));break}case\"replicate\":case\"change\":case\"derive\":{p=this.open(ZOOM);const y=STAGE_H/2-this.chipGeo.chipH/2;const shown=this.recordsShown(step);put(this.chipRow(shown.map(r=>r.label),shown.map(r=>this.$root.labels.indexOf(r.label)),y));const others=step==\"derive\"?this.$root.records.all().filter(r=>r.status!=c.status):[];const otherRow=this.chipRow(others.map(r=>r.label),others.map(r=>this.$root.labels.indexOf(r.label)),y);const start=k.find(q=>q.a>0)?.x??STAGE_W/2;this.$root.labels.forEach((l,i)=>{if(shown.some(r=>r.label==l))return;k[i]={...this.chip(i,otherRow.find(q=>q.id==i)?.x??start,y,l),a:0}});n.push(this.note(\"say\",\"label\",0,y-this.chipGeo.chipH*(ZOOM-1)/2-44,STAGE_W,1,this.recordsSay(step,shown.length)));break}case\"kinds\":{p=this.open(1);const x0=240;put([this.heading(4,x0,76,\"Doing\"),this.chip(0,x0,110,\"Design\"),this.chip(1,x0,154,\"Build\"),this.heading(5,x0,206,\"Done\"),this.chip(2,x0,240,\"Ship\"),this.chip(3,x0,284,\"Test\")]);n.push(this.note(\"h\",\"tag\",x0+130,80,1,1,\"kind: head \\u2192 Heading\"));n.push(this.note(\"c\",\"tag\",x0+130,118,1,1,\"anything else \\u2192 Chip\"));break}case\"own\":{p=this.open(ZOOM);put(this.chipRing());n.push(this.note(\"say\",\"label\",0,STAGE_H/2-8,STAGE_W,1,\"place(): a box for each child\"));break}case\"glide\":{p=this.open(ZOOM);put(c.round?this.chipRing():this.chipGrid());const rowH=this.geo(\"glide\").rowH??48;n.push(this.note(\"say\",\"label\",0,c.round?STAGE_H/2-8:STAGE_H/2-rowH*ZOOM-44,STAGE_W,1,c.round?\"round = true\":\"round = false\"));break}}return{p,wordsA,k,glass,frost:glass*(c.frost?1:0),notes:n}"},{"name":"ab","params":[{"name":"g","type":"Geo"}],"returns":"Pose[]","returnsNullable":false,"body":"return[this.box(0,g.ax??0,g.ay??0,g.aw??0,g.ah??0),this.box(1,g.bx??0,g.by??0,g.bw??0,g.bh??0)]"},{"name":"widths","params":[{"name":"g","type":"Geo"}],"returns":"number[]","returnsNullable":false,"body":"return[g.w0??0,g.w1??0,g.w2??0]"},{"name":"alignOffset","params":[{"name":"align","type":"string"},{"name":"room","type":"number"},{"name":"w","type":"number"}],"returns":"number","returnsNullable":false,"body":"if(align==\"center\")return(room-w)/2;return align==\"end\"?room-w:0"},{"name":"cornersOf","params":[{"name":"m","type":"string"}],"returns":"number[]","returnsNullable":false,"body":"if(m==\"four\")return[48,0,48,0];return m==\"pill\"?[80,80,80,80]:[24,24,24,24]"},{"name":"presenceAlpha","params":[{"name":"m","type":"string"}],"returns":"number","returnsNullable":false,"body":"if(m==\"faded\")return .25;return m==\"shown\"?1:0"},{"name":"recordsShown","params":[{"name":"step","type":"string"}],"returns":"Item[]","returnsNullable":false,"body":"if(step==\"change\")return this.$root.records.all();if(step==\"derive\")return this.$root.records.all().filter(r=>r.status==this.$root.choices.value.status);return this.$root.records.all().slice(0,4)"},{"name":"presenceSays","params":[{"name":"m","type":"string"}],"returns":"string","returnsNullable":false,"body":"switch(m){case\"faded\":return\"faded: still in the row\";case\"clear\":return\"opacity 0: unseen, and still in the row\";case\"hidden\":return\"visible = false: out of the row\";default:return\"every box in the row\"}"},{"name":"clipSays","params":[{"name":"m","type":"string"}],"returns":"string","returnsNullable":false,"body":"switch(m){case\"box\":return\"clip = true: cut to the parent's box\";case\"shape\":return\"a shape: a press outside it reaches what is beneath\";default:return\"a and b paint past the parent's edge\"}"},{"name":"chipsSay","params":[{"name":"step","type":"string"}],"returns":"string","returnsNullable":false,"body":"switch(step){case\"class\":return\"Chip [ ] three times: three views, one class\";case\"attrs\":return\"each use sets its label and tone\";case\"control\":return`pressed ${this.$root.presses} ${this.$root.presses==1?\"time\":\"times\"}`;default:return\"on: the State holds while it is true\"}"},{"name":"recordsSay","params":[{"name":"step","type":"string"},{"name":"count","type":"number"}],"returns":"string","returnsNullable":false,"body":"switch(step){case\"change\":return`${count} records, ${count} chips`;case\"derive\":return`the records whose status is \"${this.$root.choices.value.status}\"`;default:return\"one Chip for each record\"}"},{"name":"clipShape","params":[{"name":"w","type":"number"},{"name":"h","type":"number"}],"returns":"string","returnsNullable":false,"body":"const pts=[0,1,2,3,4,5,6,7,8,9].map(i=>{const a=-Math.PI/2+Math.PI*i/5;const rx=i%2==0?w*.49:w*.22,ry=i%2==0?h*.49:h*.22;return Math.round(w/2+rx*Math.cos(a))+\" \"+Math.round(h/2+ry*Math.sin(a))});return\"M \"+pts.join(\" L \")+\" Z\""},{"name":"clipFor","params":[{"name":"w","type":"number"},{"name":"h","type":"number"}],"returns":"string | true | null","returnsNullable":false,"body":"if(this.$root.prevStep==\"scroll\"&&this.$root.stepId!=\"scroll\")return true;if(this.$root.stepId!=\"clip\"||this.$root.choices.value.clip==\"none\")return null;return this.$root.choices.value.clip==\"box\"?true:this.clipShape(w,h)"},{"name":"scene","params":[{"name":"step","type":"string"}],"returns":"Scene","returnsNullable":false,"body":"const s=this.raw(step);const before=this.$root.prevStep!=step?this.raw(this.$root.prevStep):null;const order=this.$root.order;const at=order.indexOf(step);const ahead=[...order.slice(at+1),...order.slice(0,Math.max(0,at)).reverse()];const k=s.k.map(piece=>{if(piece.a>0)return piece;const was=before?.k.find(q=>q.id==piece.id);if(was!=null&&was.a>0)return{...was,a:0};for(const other of ahead){const q=this.raw(other).k.find(r=>r.id==piece.id);if(q!=null&&q.a>0)return{...q,a:0}}return piece});return{...s,k}"}]}},{"name":"Glide","base":"Spring","body":{"tag":"Glide","attrs":[{"name":"stiffness","value":{"kind":"code","src":" this.$root.following ? 1400 : 170 ","deps":["this.$root.following"],"expr":"L0 K1400 K170 ?"}},{"name":"damping","value":{"kind":"code","src":" this.$root.following ? 75 : 24 ","deps":["this.$root.following"],"expr":"L0 K75 K24 ?"}}]}},{"name":"Piece","base":"Control","body":{"tag":"Piece","attrs":[{"name":"disabled","value":{"kind":"code","src":" !this.$root.chipsLive || classroot.pose.a < 0.5 "}},{"name":"visible","value":{"kind":"code","src":" classroot.pose.a > 0 || this.opacity > 0.01 "}},{"name":"pointerEvents","value":{"kind":"code","src":" this.$root.chipsLive ? \"auto\" : \"none\" ","deps":["this.$root.chipsLive"]}},{"name":"accessibilityLabel","value":{"kind":"code","src":" classroot.pose.label "}},{"name":"accessibilityPressed","value":{"kind":"code","src":" this.$root.chipsToggle ? classroot.on : null ","$nullsUndefined":true,"deps":["this.$root.chipsToggle","classroot.on"],"expr":"L0 L1 N ?"}},{"name":"cornerRadius","value":{"kind":"code","src":" classroot.corners ","deps":["classroot.corners"],"expr":"L0"}},{"name":"pivotX","value":{"kind":"code","src":" this.width / 2 * (1 - classroot.pivotT) ","deps":["this.width","classroot.pivotT"],"expr":"L0 K2 / K1 L1 - *"}},{"name":"pivotY","value":{"kind":"code","src":" this.height / 2 * (1 - classroot.pivotT) ","deps":["this.height","classroot.pivotT"],"expr":"L0 K2 / K1 L1 - *"}},{"name":"shadow","value":{"kind":"code","src":" classroot.liftT > 0.01\n        ? Shadow(0, 2 + 14 * classroot.liftT, 4 + 36 * classroot.liftT, Color.withAlpha(0x000000, 0.28 * classroot.liftT)) : null ","$nullsUndefined":true,"deps":["classroot.liftT"]}}],"decls":[{"name":"pose","type":"Pose","def":{"kind":"code","src":" this.$data([]) ","deps":[":"]}},{"name":"on","type":"boolean","def":{"kind":"value","value":false}},{"name":"chipT","type":"number","def":{"kind":"value","value":0}},{"name":"onT","type":"number","def":{"kind":"value","value":0}},{"name":"gradT","type":"number","def":{"kind":"value","value":0}},{"name":"lightT","type":"number","def":{"kind":"value","value":0}},{"name":"drawnT","type":"number","def":{"kind":"value","value":0}},{"name":"headT","type":"number","def":{"kind":"value","value":0}},{"name":"liftT","type":"number","def":{"kind":"value","value":0}},{"name":"pivotT","type":"number","def":{"kind":"value","value":0}},{"name":"strokeWidth","type":"number","def":{"kind":"value","value":0}},{"name":"c0","type":"number","def":{"kind":"value","value":10}},{"name":"c1","type":"number","def":{"kind":"value","value":10}},{"name":"c2","type":"number","def":{"kind":"value","value":10}},{"name":"c3","type":"number","def":{"kind":"value","value":10}},{"name":"corners","type":"[number, number, number, number]","def":{"kind":"code","src":" [classroot.c0, classroot.c1, classroot.c2, classroot.c3] ","deps":["classroot.c0","classroot.c1","classroot.c2","classroot.c3"]}},{"name":"tone","type":"Color","def":{"kind":"code","src":" this.$provided(\"theme\").tones[classroot.pose.tone] "}},{"name":"boxT","type":"number","def":{"kind":"code","src":"1-classroot.chipT)*(1-classroot.drawnT","deps":["classroot.chipT","classroot.drawnT"],"expr":"K1 L0 - K1 L1 - *"}}],"methods":[{"name":"press","body":"if(this.$root.chipsToggle)this.on=!this.on;else this.$root.presses=this.$root.presses+1"}],"children":[{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"x"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.x "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"y"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.y "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"width"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.w "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"height"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.h "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"scale"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.zoom "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"rotation"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.rot "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"opacity"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.a "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"chipT"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.chip "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"onT"}},{"name":"to","value":{"kind":"code","src":" classroot.on && this.$root.chipsToggle ? 1 : 0 ","deps":["classroot.on","this.$root.chipsToggle"],"expr":"L0 L1 & K1 K0 ?"}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"gradT"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.grad "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"lightT"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.light "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"drawnT"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.drawn "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"headT"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.head "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"liftT"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.lift "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"pivotT"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.pivot "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"strokeWidth"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.sw "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"c0"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.rc[0] "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"c1"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.rc[1] "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"c2"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.rc[2] "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"c3"}},{"name":"to","value":{"kind":"code","src":" classroot.pose.rc[3] "}}]},{"tag":"View","name":"box","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"cornerRadius","value":{"kind":"code","src":" classroot.corners ","deps":["classroot.corners"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" classroot.tone ","deps":["classroot.tone"],"expr":"L0"}},{"name":"opacity","value":{"kind":"code","src":" classroot.boxT * (1 - classroot.lightT) ","deps":["classroot.boxT","classroot.lightT"],"expr":"L0 K1 L1 - *"}}]},{"tag":"View","name":"grad","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"cornerRadius","value":{"kind":"code","src":" classroot.corners ","deps":["classroot.corners"],"expr":"L0"}},{"name":"visible","value":{"kind":"code","src":" this.opacity > 0.01 ","deps":["this.opacity"],"expr":"L0 K0.01 >"}},{"name":"fill","value":{"kind":"code","src":" Gradient.linear(\"135deg\", classroot.tone, this.$provided(\"theme\").tones[4]) ","deps":["classroot.tone","this.$provided(\"theme\")"]}},{"name":"opacity","value":{"kind":"code","src":" classroot.boxT * classroot.gradT ","deps":["classroot.boxT","classroot.gradT"],"expr":"L0 L1 *"}}]},{"tag":"View","name":"light","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"cornerRadius","value":{"kind":"code","src":" classroot.corners ","deps":["classroot.corners"],"expr":"L0"}},{"name":"visible","value":{"kind":"code","src":" this.opacity > 0.01 ","deps":["this.opacity"],"expr":"L0 K0.01 >"}},{"name":"fill","value":{"kind":"code","src":" Color.from(this.$root.paint.box) "}},{"name":"stroke","value":{"kind":"code","src":" classroot.strokeWidth < 0.2 ? null : classroot.pose.sides == 1\n            ? [null, null, Stroke(classroot.strokeWidth, this.$provided(\"theme\").tones[0]), null] : Stroke(classroot.strokeWidth, this.$provided(\"theme\").tones[0]) "}},{"name":"opacity","value":{"kind":"code","src":" classroot.boxT * classroot.lightT ","deps":["classroot.boxT","classroot.lightT"],"expr":"L0 L1 *"}}]},{"tag":"Ring","name":"drawing","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"visible","value":{"kind":"code","src":" classroot.drawnT > 0.01 ","deps":["classroot.drawnT"],"expr":"L0 K0.01 >"}},{"name":"opacity","value":{"kind":"code","src":" classroot.drawnT ","deps":["classroot.drawnT"],"expr":"L0"}}]},{"tag":"View","name":"face","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"cornerRadius","value":{"kind":"code","src":" classroot.corners ","deps":["classroot.corners"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" classroot.pressed ? this.$provided(\"theme\").chipFillPressed : classroot.hovered ? this.$provided(\"theme\").chipFillHovered : this.$provided(\"theme\").chipFill ","deps":["classroot.pressed","this.$provided(\"theme\")","classroot.hovered"]}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, this.$provided(\"theme\").chipStrokeColor) ","deps":["this.$provided(\"theme\")"]}},{"name":"opacity","value":{"kind":"code","src":" classroot.chipT * (1 - classroot.headT) ","deps":["classroot.chipT","classroot.headT"],"expr":"L0 K1 L1 - *"}}]},{"tag":"View","name":"onFace","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"cornerRadius","value":{"kind":"code","src":" classroot.corners ","deps":["classroot.corners"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" classroot.tone ","deps":["classroot.tone"],"expr":"L0"}},{"name":"opacity","value":{"kind":"code","src":" classroot.chipT * classroot.onT ","deps":["classroot.chipT","classroot.onT"],"expr":"L0 L1 *"}}]},{"tag":"ChipRow","name":"row","attrs":[{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"opacity","value":{"kind":"code","src":" classroot.chipT ","deps":["classroot.chipT"],"expr":"L0"}}]},{"tag":"Outline"}]}},{"name":"ChipRow","base":"View","body":{"tag":"ChipRow","attrs":[{"name":"padding","value":{"kind":"code","src":" [0, classroot.g.padEnd, 0, classroot.g.padStart * classroot.fold] "}}],"decls":[{"name":"g","type":"ChipGeo","def":{"kind":"code","src":" this.$root.director.chipGeo ","deps":["this.$root.director.chipGeo"],"expr":"L0"}},{"name":"piece","type":"Piece","def":{"kind":"code","src":" parent "}},{"name":"fold","type":"number","def":{"kind":"code","src":" 1 - classroot.piece.headT "}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"code","src":" classroot.g.gap * classroot.fold "}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"View","name":"dot","attrs":[{"name":"width","value":{"kind":"code","src":" classroot.g.dot * classroot.fold "}},{"name":"height","value":{"kind":"code","src":" classroot.g.dot "}},{"name":"cornerRadius","value":{"kind":"code","src":" classroot.g.dotR "}},{"name":"fill","value":{"kind":"code","src":" classroot.piece.tone "}},{"name":"opacity","value":{"kind":"code","src":" classroot.fold ","deps":["classroot.fold"],"expr":"L0"}}]},{"tag":"Words","name":"words","attrs":[{"name":"text","value":{"kind":"code","src":" classroot.piece.pose.label "}},{"name":"size","value":{"kind":"code","src":" classroot.g.fontSize "}},{"name":"ink","value":{"kind":"code","src":" Color.mix(Color.mix(this.$provided(\"theme\").chipTextColor, 0xFFFFFF, classroot.piece.onT), this.$provided(\"theme\").textMuted, classroot.piece.headT) "}}]}]}},{"name":"Words","base":"View","body":{"tag":"Words","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"text"}]},"route":"list"}],"decls":[{"name":"text","type":"string","def":{"kind":"value","value":""}},{"name":"size","type":"number","def":{"kind":"value","value":15}},{"name":"ink","type":"Color","def":{"kind":"value","value":0}},{"name":"first","type":"string","def":{"kind":"value","value":""}},{"name":"second","type":"string","def":{"kind":"value","value":""}},{"name":"onFirst","type":"boolean","def":{"kind":"value","value":true}},{"name":"firstT","type":"number","def":{"kind":"value","value":1}}],"methods":[{"name":"onChange","body":"if(this.onFirst){this.second=this.text;this.onFirst=false}else{this.first=this.text;this.onFirst=true}"},{"name":"onInit","body":"this.first=this.text"}],"children":[{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"firstT"}},{"name":"to","value":{"kind":"code","src":" classroot.onFirst ? 1 : 0 ","deps":["classroot.onFirst"],"expr":"L0 K1 K0 ?"}}]},{"tag":"Text","name":"a","attrs":[{"name":"fontSize","value":{"kind":"code","src":" classroot.size ","deps":["classroot.size"],"expr":"L0"}},{"name":"fontWeight","value":{"kind":"value","value":"medium"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" classroot.ink ","deps":["classroot.ink"],"expr":"L0"}},{"name":"opacity","value":{"kind":"code","src":" classroot.firstT ","deps":["classroot.firstT"],"expr":"L0"}},{"name":"text","value":{"kind":"code","src":" classroot.first ","deps":["classroot.first"],"expr":"L0"}}]},{"tag":"Text","name":"b","attrs":[{"name":"ignoreLayout","value":{"kind":"value","value":true}},{"name":"fontSize","value":{"kind":"code","src":" classroot.size ","deps":["classroot.size"],"expr":"L0"}},{"name":"fontWeight","value":{"kind":"value","value":"medium"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" classroot.ink ","deps":["classroot.ink"],"expr":"L0"}},{"name":"opacity","value":{"kind":"code","src":" 1 - classroot.firstT ","deps":["classroot.firstT"],"expr":"K1 L0 -"}},{"name":"text","value":{"kind":"code","src":" classroot.second ","deps":["classroot.second"],"expr":"L0"}}]}]}},{"name":"Ring","base":"View","body":{"tag":"Ring","attrs":[{"name":"width","value":{"kind":"code","src":" this.g.size ?? 160 "}},{"name":"height","value":{"kind":"code","src":" this.width ","deps":["this.width"],"expr":"L0"}}],"decls":[{"name":"g","type":"Geo","def":{"kind":"code","src":" this.$root.director.geo(\"draw\") "}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.lineWidth=this.g.line??16;d.lineCap=\"round\";d.strokeStyle=this.$provided(\"theme\").stageStrokeColor;d.beginPath();d.arc(d.w/2,d.h/2,this.g.r??60,0,2*Math.PI);d.stroke();d.strokeStyle=this.$provided(\"theme\").tones[0];d.beginPath();d.arc(d.w/2,d.h/2,this.g.r??60,-Math.PI/2,-Math.PI/2+2*Math.PI*Math.max(.001,this.$root.choices.value.done));d.stroke()"}]}},{"name":"Outline","base":"View","body":{"tag":"Outline","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"visible","value":{"kind":"code","src":" this.$root.outlines ","deps":["this.$root.outlines"],"expr":"L0"}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, Color.withAlpha(this.$provided(\"theme\").noteInk, 0.7)) ","deps":["this.$provided(\"theme\")"]}}],"children":[{"tag":"TextLabel","attrs":[{"name":"x","value":{"kind":"value","value":4}},{"name":"y","value":{"kind":"value","value":3}},{"name":"fontSize","value":{"kind":"value","value":10}},{"name":"fontFamily","value":{"kind":"code","src":" this.$root.monoFace ","deps":["this.$root.monoFace"],"expr":"L0"}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").noteInk ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" Math.round(classroot.width) + \" × \" + Math.round(classroot.height) ","deps":["classroot.width","classroot.height"]}}]}]}},{"name":"NoteView","base":"View","body":{"tag":"NoteView","attrs":[{"name":"opacity","value":{"kind":"value","value":0}},{"name":"visible","value":{"kind":"code","src":" this.opacity > 0.01 || !classroot.gone ","deps":["this.opacity","classroot.gone"],"expr":"L0 K0.01 > L0 K0.01 > L1 n ?"}}],"decls":[{"name":"kind","type":"string","def":{"kind":"code","src":" this.$data([\"kind\"]) ?? \"label\" ","deps":[":kind"]}},{"name":"say","type":"string","def":{"kind":"code","src":" this.$data([\"text\"]) ?? \"\" ","deps":[":text"]}},{"name":"gone","type":"boolean","def":{"kind":"code","src":" this.$data([\"gone\"]) ?? false ","deps":[":gone"],"expr":"L0 K0 Q"}}],"methods":[{"name":"onInit","body":"this.gx.arrive();this.gy.arrive();this.gw.arrive();this.gh.arrive()"}],"children":[{"tag":"Glide","name":"gx","attrs":[{"name":"attribute","value":{"kind":"value","value":"x"}},{"name":"to","value":{"kind":"code","src":" this.$data([\"x\"]) ?? 0 ","deps":[":x"],"expr":"L0 K0 Q"}}]},{"tag":"Glide","name":"gy","attrs":[{"name":"attribute","value":{"kind":"value","value":"y"}},{"name":"to","value":{"kind":"code","src":" this.$data([\"y\"]) ?? 0 ","deps":[":y"],"expr":"L0 K0 Q"}}]},{"tag":"Glide","name":"gw","attrs":[{"name":"attribute","value":{"kind":"value","value":"width"}},{"name":"to","value":{"kind":"code","src":" this.$data([\"w\"]) ?? 1 ","deps":[":w"],"expr":"L0 K1 Q"}}]},{"tag":"Glide","name":"gh","attrs":[{"name":"attribute","value":{"kind":"value","value":"height"}},{"name":"to","value":{"kind":"code","src":" this.$data([\"h\"]) ?? 1 ","deps":[":h"],"expr":"L0 K1 Q"}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"opacity"}},{"name":"to","value":{"kind":"code","src":" classroot.gone ? 0 : 1 ","deps":["classroot.gone"],"expr":"L0 K0 K1 ?"}}]}]}},{"name":"NoteWords","base":"TextLabel","body":{"tag":"NoteWords","attrs":[{"name":"fontSize","value":{"kind":"value","value":12}},{"name":"fontWeight","value":{"kind":"value","value":"medium"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").noteTextColor ","deps":["this.$provided(\"theme\")"]}}]}},{"name":"Hairline","base":"View","body":{"tag":"Hairline","attrs":[{"name":"height","value":{"kind":"value","value":1.25}},{"name":"pivotX","value":{"kind":"value","value":0}},{"name":"pivotY","value":{"kind":"value","value":0.6}},{"name":"width","value":{"kind":"code","src":" Math.max(0, this.length) ","deps":["this.length"],"expr":"K0 L0 M"}},{"name":"rotation","value":{"kind":"code","src":" this.angle ","deps":["this.angle"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").noteInk ","deps":["this.$provided(\"theme\")"]}}],"decls":[{"name":"length","type":"number","def":{"kind":"value","value":0}},{"name":"angle","type":"number","def":{"kind":"value","value":0}}]}},{"name":"WidthNote","base":"NoteView","body":{"tag":"WidthNote","children":[{"tag":"Hairline","attrs":[{"name":"length","value":{"kind":"code","src":" classroot.width ","deps":["classroot.width"],"expr":"L0"}}]},{"tag":"Hairline","attrs":[{"name":"x","value":{"kind":"value","value":0.6}},{"name":"y","value":{"kind":"value","value":-4}},{"name":"length","value":{"kind":"value","value":8}},{"name":"angle","value":{"kind":"value","value":90}}]},{"tag":"Hairline","attrs":[{"name":"x","value":{"kind":"code","src":" classroot.width + 0.6 ","deps":["classroot.width"],"expr":"L0 K0.6 +"}},{"name":"y","value":{"kind":"value","value":-4}},{"name":"length","value":{"kind":"value","value":8}},{"name":"angle","value":{"kind":"value","value":90}}]},{"tag":"NoteWords","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":-20}},{"name":"text","value":{"kind":"code","src":" classroot.say ","deps":["classroot.say"],"expr":"L0"}}]}]}},{"name":"HeightNote","base":"NoteView","body":{"tag":"HeightNote","decls":[{"name":"right","type":"boolean","def":{"kind":"code","src":" classroot.kind == \"vdimr\" ","deps":["classroot.kind"]}}],"children":[{"tag":"Hairline","attrs":[{"name":"x","value":{"kind":"value","value":0.6}},{"name":"length","value":{"kind":"code","src":" classroot.height ","deps":["classroot.height"],"expr":"L0"}},{"name":"angle","value":{"kind":"value","value":90}}]},{"tag":"Hairline","attrs":[{"name":"x","value":{"kind":"value","value":-4}},{"name":"length","value":{"kind":"value","value":8}}]},{"tag":"Hairline","attrs":[{"name":"x","value":{"kind":"value","value":-4}},{"name":"y","value":{"kind":"code","src":" classroot.height ","deps":["classroot.height"],"expr":"L0"}},{"name":"length","value":{"kind":"value","value":8}}]},{"tag":"NoteWords","attrs":[{"name":"x","value":{"kind":"code","src":" classroot.right ? 8 : -this.width - 8 ","deps":["classroot.right","this.width"],"expr":"L0 K8 L1 ~ K8 - ?"}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"text","value":{"kind":"code","src":" classroot.say ","deps":["classroot.say"],"expr":"L0"}}]}]}},{"name":"PointerNote","base":"NoteView","body":{"tag":"PointerNote","decls":[{"name":"length","type":"number","def":{"kind":"code","src":" Math.hypot(this.width, this.height) ","deps":["this.width","this.height"]}},{"name":"angle","type":"number","def":{"kind":"code","src":" Math.atan2(this.height, this.width) * 180 / Math.PI ","deps":["this.height","this.width"]}}],"children":[{"tag":"Hairline","attrs":[{"name":"length","value":{"kind":"code","src":" classroot.length ","deps":["classroot.length"],"expr":"L0"}},{"name":"angle","value":{"kind":"code","src":" classroot.angle ","deps":["classroot.angle"],"expr":"L0"}}]},{"tag":"Arrowhead","attrs":[{"name":"x","value":{"kind":"code","src":" classroot.width - 9 ","deps":["classroot.width"],"expr":"L0 K9 -"}},{"name":"y","value":{"kind":"code","src":" classroot.height - 5 ","deps":["classroot.height"],"expr":"L0 K5 -"}},{"name":"rotation","value":{"kind":"code","src":" classroot.angle ","deps":["classroot.angle"],"expr":"L0"}}]},{"tag":"NoteWords","attrs":[{"name":"text","value":{"kind":"code","src":" classroot.say ","deps":["classroot.say"],"expr":"L0"}},{"name":"x","value":{"kind":"code","src":" classroot.kind == \"ray\" ? classroot.width / 2 + 10 : -this.width / 2 ","deps":["classroot.kind","classroot.width","this.width"]}},{"name":"y","value":{"kind":"code","src":" classroot.kind == \"ray\" ? classroot.height / 2 - this.height - 2 : classroot.height >= 0 ? -this.height - 6 : 6 ","deps":["classroot.kind","classroot.height","this.height"]}}]}]}},{"name":"Arrowhead","base":"View","body":{"tag":"Arrowhead","attrs":[{"name":"width","value":{"kind":"value","value":10}},{"name":"height","value":{"kind":"value","value":10}},{"name":"pivotX","value":{"kind":"value","value":9}},{"name":"pivotY","value":{"kind":"value","value":5}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.strokeStyle=this.$provided(\"theme\").noteInk;d.lineWidth=1.25;d.beginPath();d.moveTo(4,1);d.lineTo(9,5);d.lineTo(4,9);d.stroke()"}]}},{"name":"FrameNote","base":"NoteView","body":{"tag":"FrameNote","attrs":[{"name":"stroke","value":{"kind":"code","src":" Stroke(1, Color.withAlpha(this.$provided(\"theme\").noteInk, 0.8)) ","deps":["this.$provided(\"theme\")"]}}]}},{"name":"DotNote","base":"NoteView","body":{"tag":"DotNote","children":[{"tag":"View","attrs":[{"name":"x","value":{"kind":"value","value":-4.5}},{"name":"y","value":{"kind":"value","value":-4.5}},{"name":"width","value":{"kind":"value","value":9}},{"name":"height","value":{"kind":"value","value":9}},{"name":"cornerRadius","value":{"kind":"value","value":4.5}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").noteInk ","deps":["this.$provided(\"theme\")"]}}]},{"tag":"NoteWords","attrs":[{"name":"x","value":{"kind":"value","value":9}},{"name":"y","value":{"kind":"code","src":" -this.height / 2 ","deps":["this.height"],"expr":"L0 ~ K2 /"}},{"name":"text","value":{"kind":"code","src":" classroot.say ","deps":["classroot.say"],"expr":"L0"}}]}]}},{"name":"TagNote","base":"NoteView","body":{"tag":"TagNote","children":[{"tag":"View","name":"pill","attrs":[{"name":"x","value":{"kind":"value","value":-8}},{"name":"y","value":{"kind":"value","value":-5}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":5},{"kind":"number","value":8},{"kind":"number","value":5},{"kind":"number","value":8}]},"route":"corners"},{"name":"cornerRadius","value":{"kind":"value","value":8}},{"name":"fill","value":{"kind":"code","src":" classroot.kind == \"warn\" ? this.$provided(\"theme\").noteWarnFill : this.$provided(\"theme\").noteTagFill ","deps":["classroot.kind","this.$provided(\"theme\")"]}}],"children":[{"tag":"NoteWords","attrs":[{"name":"text","value":{"kind":"code","src":" classroot.say ","deps":["classroot.say"],"expr":"L0"}},{"name":"fontFamily","value":{"kind":"code","src":" classroot.kind == \"code\" ? this.$root.monoFace : this.$root.uiFace ","deps":["classroot.kind","this.$root.monoFace","this.$root.uiFace"]}},{"name":"textColor","value":{"kind":"code","src":" classroot.kind == \"warn\" ? this.$provided(\"theme\").noteWarnTextColor : this.$provided(\"theme\").noteTextColor ","deps":["classroot.kind","this.$provided(\"theme\")"]}}]}]}]}},{"name":"LabelNote","base":"NoteView","body":{"tag":"LabelNote","children":[{"tag":"NoteWords","attrs":[{"name":"x","value":{"kind":"code","src":" classroot.width > 1 ? (classroot.width - this.width) / 2 : 0 ","deps":["classroot.width","this.width"],"expr":"L0 K1 > L0 L1 - K2 / K0 ?"}},{"name":"text","value":{"kind":"code","src":" classroot.say ","deps":["classroot.say"],"expr":"L0"}}]}]}},{"name":"DragSurface","base":"View","body":{"tag":"DragSurface","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"visible","value":{"kind":"code","src":" this.$root.dragKnob ","deps":["this.$root.dragKnob"],"expr":"L0"}},{"name":"focusable","value":{"kind":"value","value":true}},{"name":"accessibilityRole","value":{"kind":"value","value":"group"}},{"name":"accessibilityLabel","value":{"kind":"value","value":"The box: drag it, or move it with the arrow keys"}},{"name":"cursor","value":{"kind":"value","value":"grab"}},{"name":"keyBindings","value":{"kind":"code","src":" [ ({ key: \"ArrowLeft\", command: \"nudge\", args: [-10, 0] }), ({ key: \"ArrowRight\", command: \"nudge\", args: [10, 0] }),\n        ({ key: \"ArrowUp\", command: \"nudge\", args: [0, -10] }), ({ key: \"ArrowDown\", command: \"nudge\", args: [0, 10] }) ] "}}],"decls":[{"name":"fromX","type":"number","def":{"kind":"value","value":0}},{"name":"fromY","type":"number","def":{"kind":"value","value":0}}],"methods":[{"name":"onDragStart","params":[{"name":"e","type":"PointerEvent"}],"body":"this.fromX=this.$root.choices.value.dx;this.fromY=this.$root.choices.value.dy;this.$root.dragging=true"},{"name":"onDrag","params":[{"name":"e","type":"PointerEvent"}],"body":"this.$root.moveBox(this.fromX+e.deltaX,this.fromY+e.deltaY)"},{"name":"onDragEnd","params":[{"name":"e","type":"DragEndEvent"}],"body":"this.$root.dragging=false"},{"name":"nudge","params":[{"name":"dx","type":"number"},{"name":"dy","type":"number"}],"body":"this.$root.moveBox(this.$root.choices.value.dx+dx,this.$root.choices.value.dy+dy)"}]}},{"name":"Stage","base":"View","body":{"tag":"Stage","attrs":[{"name":"width","value":{"kind":"code","src":" STAGE_W "}},{"name":"height","value":{"kind":"code","src":" STAGE_H "}}],"children":[{"tag":"View","name":"grid","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.fillStyle=this.$provided(\"theme\").gridDotFill;for(let y=20;y<STAGE_H;y=y+20)for(let x=20;x<STAGE_W;x=x+20)d.fillRect(x-1,y-1,2,2)"}]},{"tag":"View","name":"p","attrs":[{"name":"pivotX","value":{"kind":"code","src":" this.width / 2 ","deps":["this.width"],"expr":"L0 K2 /"}},{"name":"pivotY","value":{"kind":"code","src":" this.height / 2 ","deps":["this.height"],"expr":"L0 K2 /"}},{"name":"visualFilter","value":{"kind":"code","src":" this.blurT + this.grayT + this.hueT < 0.01 ? null\n            : [VisualFilter.blur(this.blurT), VisualFilter.grayscale(this.grayT), VisualFilter.hueRotate(this.hueT)] ","$nullsUndefined":true,"deps":["this.blurT","this.grayT","this.hueT"]}},{"name":"scrolls","value":{"kind":"code","src":" this.$root.stepId == \"scroll\" ? \"y\" : \"none\" ","deps":["this.$root.stepId"]}},{"name":"padding","value":{"kind":"code","src":" this.$root.stepId == \"scroll\" ? [0, 0, this.$root.director.geo(\"scroll\").pad ?? 0, 0] : 0 "}},{"name":"clip","value":{"kind":"code","src":" this.$root.director.clipFor(this.width, this.height) ","$nullsUndefined":true,"deps":["this.width","this.height","this.$root.director","this.$root.director.$root.prevStep","this.$root.director.$root.stepId","this.$root.director.$root.choices.value.clip"]}},{"name":"fill","value":{"kind":"code","src":" Color.withAlpha(Color.from(this.$root.paint.panel), this.containerT) "}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1.5, Color.withAlpha(this.$provided(\"theme\").containerStrokeColor, this.containerT)) ","deps":["this.$provided(\"theme\")","this.containerT"]}}],"decls":[{"name":"frame","type":"Frame","def":{"kind":"code","src":" this.$root.scene.p "}},{"name":"paintT","type":"number","def":{"kind":"value","value":1}},{"name":"solidT","type":"number","def":{"kind":"value","value":1}},{"name":"blurT","type":"number","def":{"kind":"value","value":0}},{"name":"grayT","type":"number","def":{"kind":"value","value":0}},{"name":"hueT","type":"number","def":{"kind":"value","value":0}},{"name":"containerT","type":"number","def":{"kind":"code","src":" this.paintT * (1 - this.solidT) ","deps":["this.paintT","this.solidT"],"expr":"L0 K1 L1 - *"}}],"children":[{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"x"}},{"name":"to","value":{"kind":"code","src":" parent.frame.x "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"y"}},{"name":"to","value":{"kind":"code","src":" parent.frame.y "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"width"}},{"name":"to","value":{"kind":"code","src":" parent.frame.w "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"height"}},{"name":"to","value":{"kind":"code","src":" parent.frame.h "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"cornerRadius"}},{"name":"to","value":{"kind":"code","src":" parent.frame.r "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"paintT"}},{"name":"to","value":{"kind":"code","src":" parent.frame.a "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"solidT"}},{"name":"to","value":{"kind":"code","src":" parent.frame.solid "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"scale"}},{"name":"to","value":{"kind":"code","src":" parent.frame.zoom "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"blurT"}},{"name":"to","value":{"kind":"code","src":" parent.frame.blur "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"grayT"}},{"name":"to","value":{"kind":"code","src":" parent.frame.gray "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"hueT"}},{"name":"to","value":{"kind":"code","src":" parent.frame.hue "}}]},{"tag":"View","name":"solid","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"cornerRadius","value":{"kind":"code","src":" parent.cornerRadius ","deps":["parent.cornerRadius"],"expr":"L0"}},{"name":"visible","value":{"kind":"code","src":" this.opacity > 0.01 ","deps":["this.opacity"],"expr":"L0 K0.01 >"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").tones[0] ","deps":["this.$provided(\"theme\")"]}},{"name":"opacity","value":{"kind":"code","src":" parent.paintT * parent.solidT ","deps":["parent.paintT","parent.solidT"],"expr":"L0 L1 *"}}]},{"tag":"DragSurface","name":"handle"},{"tag":"View","name":"pieces","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"datapath","value":{"kind":"code","src":" this.$root.cast.value ","$nullsUndefined":true,"deps":["this.$root.cast.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"Piece","attrs":[{"name":"datapath","value":{"kind":"path","path":"k","many":true},"route":"cursor"}]}]},{"tag":"Outline","attrs":[{"name":"visible","value":{"kind":"code","src":" this.$root.outlines && parent.paintT > 0.5 ","deps":["this.$root.outlines","parent.paintT"],"expr":"L0 L1 K0.5 > L0 ?"}}]}]},{"tag":"Text","name":"words","attrs":[{"name":"wrap","value":{"kind":"value","value":false}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"text","value":{"kind":"code","src":" this.$root.choices.value.words ","deps":["this.$root.choices.value.words"],"expr":"L0"}},{"name":"x","value":{"kind":"code","src":" this.g.x ?? 150 "}},{"name":"y","value":{"kind":"code","src":" this.g.y ?? 180 "}},{"name":"fontSize","value":{"kind":"code","src":" this.g.size ?? 32 "}}],"decls":[{"name":"g","type":"Geo","def":{"kind":"code","src":" this.$root.director.geo(\"content\") "}}],"children":[{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"opacity"}},{"name":"to","value":{"kind":"code","src":" this.$root.scene.wordsA "}}]},{"tag":"Outline"}]},{"tag":"View","name":"glass","attrs":[{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"width","value":{"kind":"code","src":" this.g.w ?? 260 "}},{"name":"height","value":{"kind":"code","src":" this.g.h ?? 120 "}},{"name":"cornerRadius","value":{"kind":"code","src":" this.g.r ?? 20 "}},{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":140}},{"name":"opacity","value":{"kind":"value","value":0}},{"name":"visible","value":{"kind":"code","src":" this.opacity > 0.01 ","deps":["this.opacity"],"expr":"L0 K0.01 >"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").glassFill ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, this.$provided(\"theme\").glassStrokeColor) ","deps":["this.$provided(\"theme\")"]}},{"name":"backdrop","value":{"kind":"code","src":" this.frostT > 0.01 ? VisualFilter.frost(14 * this.frostT, 1.5) : null ","$nullsUndefined":true,"deps":["this.frostT"]}}],"decls":[{"name":"g","type":"Geo","def":{"kind":"code","src":" this.$root.director.geo(\"frost\") "}},{"name":"frostT","type":"number","def":{"kind":"value","value":0}}],"children":[{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"frostT"}},{"name":"to","value":{"kind":"code","src":" this.$root.scene.frost "}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"opacity"}},{"name":"to","value":{"kind":"code","src":" this.$root.scene.glass "}}]}]},{"tag":"View","name":"grip","attrs":[{"name":"visible","value":{"kind":"code","src":" this.$root.resizing ","deps":["this.$root.resizing"],"expr":"L0"}},{"name":"width","value":{"kind":"value","value":12}},{"name":"height","value":{"kind":"value","value":40}},{"name":"cornerRadius","value":{"kind":"value","value":6}},{"name":"cursor","value":{"kind":"value","value":"ew-resize"}},{"name":"x","value":{"kind":"code","src":" classroot.p.x + classroot.p.width - 6 ","deps":["classroot.p.x","classroot.p.width"],"expr":"L0 L1 + K6 -"}},{"name":"y","value":{"kind":"code","src":" classroot.p.y + classroot.p.height / 2 - 20 ","deps":["classroot.p.y","classroot.p.height"],"expr":"L0 L1 K2 / + K20 -"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").noteInk ","deps":["this.$provided(\"theme\")"]}}],"decls":[{"name":"from","type":"number","def":{"kind":"value","value":0}}],"methods":[{"name":"onDragStart","params":[{"name":"e","type":"PointerEvent"}],"body":"this.from=this.$root.widthNow;this.$root.dragging=true"},{"name":"onDrag","params":[{"name":"e","type":"PointerEvent"}],"body":"this.$root.setWidth(this.from+e.deltaX*(this.$root.stepId==\"relation\"?1:2))"},{"name":"onDragEnd","params":[{"name":"e","type":"DragEndEvent"}],"body":"this.$root.dragging=false"}]},{"tag":"View","name":"notes","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"datapath","value":{"kind":"code","src":" this.$root.notesShown.value ","$nullsUndefined":true,"deps":["this.$root.notesShown.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"NoteView","attrs":[{"name":"datapath","value":{"kind":"path","path":"notes","many":true},"route":"cursor"},{"name":"classFor","value":{"kind":"code","src":" ({ hdim: \"WidthNote\", vdim: \"HeightNote\", vdimr: \"HeightNote\", arrow: \"PointerNote\", ray: \"PointerNote\", frame: \"FrameNote\",\n                dot: \"DotNote\", tag: \"TagNote\", warn: \"TagNote\", code: \"TagNote\", label: \"LabelNote\" })[this.$data([\"kind\"]) ?? \"label\"] ?? \"LabelNote\" ","deps":[":kind"]}}]}]}]}},{"name":"SimpleLayout","base":"Layout","body":{"tag":"SimpleLayout","decls":[{"name":"axis","type":"LayoutAxis","def":{"kind":"value","value":"y"}},{"name":"spacing","type":"number","def":{"kind":"value","value":0}},{"name":"align","type":"CrossAlign","def":{"kind":"value","value":"none"}}],"methods":[{"name":"place","body":"const axis=this.axis;const size=axis==\"x\"?\"width\":\"height\";const kids=this.laid();const weight=c=>{const f=c.flexes;return f===true?1:typeof f==\"number\"&&f>0?f:0};const shrinking=c=>weight(c)==0&&c.shrinks===true;const flexing=c=>weight(c)>0||shrinking(c);const minKey=axis==\"x\"?\"minWidth\":\"minHeight\";const maxKey=axis==\"x\"?\"maxWidth\":\"maxHeight\";const clamp=(c,v)=>{const hi=c[maxKey];const lo=c[minKey];const capped=hi>0?Math.min(v,hi):v;return Math.max(capped,lo)};const given=kids.map(c=>0);let flexN=0;let shrinkN=0;let visN=0;let fixed=0;kids.forEach((c,i)=>{if(!c.visible)return;visN=visN+1;if(weight(c)>0){flexN=flexN+1;given[i]=clamp(c,0)}else if(shrinking(c)){shrinkN=shrinkN+1;given[i]=clamp(c,c[axis==\"x\"?\"contentWidth\":\"contentHeight\"])}else fixed=fixed+c.footprint()[size]});let runLength=0;if(flexN+shrinkN>0){let at=0;kids.forEach((c,i)=>{if(!c.visible)return;const n=flexing(c)?given[i]:c.footprint()[size];runLength=Math.max(runLength,at+n);at=at+n+this.spacing})}if(flexN+shrinkN>0){fixed=fixed+this.spacing*Math.max(0,visN-1);const own=flexN>0?this.contentExtent(size):this.viewExtent(size);const room=flexN==0&&own<=0?Infinity:own;let used=fixed;kids.forEach((c,i)=>{used=used+given[i]});const held=kids.map(c=>false);if(used>room){let over=used-room;for(let round=0;round<=kids.length;round=round+1){let basis=0;kids.forEach((c,i)=>{if(c.visible&&shrinking(c)&&!held[i])basis=basis+given[i]});if(basis<=0)break;let again=false;kids.forEach((c,i)=>{if(!c.visible||!shrinking(c)||held[i])return;const lo=c[minKey];if(given[i]-over*given[i]/basis<lo){over=over-(given[i]-lo);given[i]=lo;held[i]=true;again=true}});if(!again){kids.forEach((c,i)=>{if(c.visible&&shrinking(c)&&!held[i])given[i]=given[i]-over*given[i]/basis});break}}}else if(flexN>0){let free=room-fixed;kids.forEach((c,i)=>{if(c.visible&&shrinking(c))free=free-given[i]});for(let round=0;round<=kids.length;round=round+1){let total=0;kids.forEach((c,i)=>{if(c.visible&&weight(c)>0&&!held[i])total=total+weight(c)});if(total<=0)break;const each=Math.max(0,free)/total;let off=0;kids.forEach((c,i)=>{if(!c.visible||weight(c)==0||held[i])return;const want=each*weight(c);given[i]=clamp(c,want);off=off+given[i]-want});if(Math.abs(off)<.001)break;kids.forEach((c,i)=>{if(!c.visible||weight(c)==0||held[i])return;const want=each*weight(c);if(off>0&&given[i]>want||off<0&&given[i]<want){held[i]=true;free=free-given[i]}})}}}const al=this.align;const cross=axis==\"x\"?\"y\":\"x\";const crossSize=axis==\"x\"?\"height\":\"width\";const centerShift=c=>c[axis==\"x\"?\"centerY\":\"centerX\"]-c[crossSize]/2;const crossOf=c=>{if(flexing(c))return{lead:0,extent:c[crossSize]};const fc=c.footprint();return{lead:axis==\"x\"?fc.y:fc.x,extent:fc[crossSize]}};let line=0;let lineBase=0;const natural=axis==\"x\"?\"contentHeight\":\"contentWidth\";const extentOf=c=>al==\"stretch\"&&this.sizedByContent(c,crossSize)?c[natural]:crossOf(c).extent;if(al!=\"none\"){if(al==\"baseline\"&&axis!=\"x\")this.refuseStackBaseline();const banded=al==\"stretch\"&&!this.sizedByChildren(crossSize);for(const c of kids){if(!c.visible)continue;if(!banded)line=Math.max(line,extentOf(c));const b=c.baseline;if(al==\"baseline\"&&typeof b==\"number\")lineBase=Math.max(lineBase,b)}if(al==\"center\"||al==\"end\")line=Math.max(line,this.viewExtent(crossSize));else if(al==\"stretch\"&&!this.sizedByChildren(crossSize))line=this.viewExtent(crossSize)}let pos=0;const boxes=kids.map((c,i)=>{const flex=c.visible&&flexing(c);const held=!c.visible&&flexing(c);const f=flex?null:c.footprint();const lead=f==null?0:axis==\"x\"?f.x:f.y;const box=axis==\"x\"?{x:pos-lead}:{y:pos-lead};if(flex)box[axis==\"x\"?\"w\":\"h\"]=given[i];else if(held)box[axis==\"x\"?\"w\":\"h\"]=axis==\"x\"?c.width:c.height;if(al!=\"none\"){const co=crossOf(c);const leadC=co.lead;let off=0;if(al==\"center\")off=(line-co.extent)/2-centerShift(c);else if(al==\"end\")off=line-co.extent;else if(al==\"baseline\"&&axis==\"x\"){const b=c.baseline;if(typeof b==\"number\")off=lineBase-b;else if(c.visible)this.refuseBaseline(c)}box[cross]=off-(al==\"baseline\"?0:leadC);if(al==\"stretch\")box.stretch=axis==\"x\"?{h:line}:{w:line}}if(c.visible)pos=pos+(flex?given[i]:f[size])+this.spacing;return box});if(flexN+shrinkN==0)return boxes;return axis==\"x\"?{boxes,contentWidth:runLength}:{boxes,contentHeight:runLength}"}]}},{"name":"Control","base":"View","body":{"tag":"Control","attrs":[{"name":"selectable","value":{"kind":"value","value":false},"route":"provision"},{"name":"focusable","value":{"kind":"code","src":" !this.disabled ","deps":["this.disabled"],"expr":"L0 n"}},{"name":"accessibilityRole","value":{"kind":"value","value":"button"}},{"name":"accessibilityExpanded","value":{"kind":"code","src":" this.menu != null ? this.menuOpen : null ","$nullsUndefined":true,"deps":["this.menu","this.menuOpen"],"expr":"L0 N ! L1 N ?"}},{"name":"keyBindings","value":{"kind":"code","src":" [\n        ({ key: \"Enter\", command: \"_keyPress\" }), ({ key: \"Space\", command: \"_keyPress\" }),\n        ({ key: \"ArrowDown\", command: \"_keyMenu\" }),\n        ({ key: \"ArrowRight\", command: \"_keyAdjust\", args: [1] }), ({ key: \"ArrowUp\", command: \"_keyAdjust\", args: [1] }),\n        ({ key: \"ArrowLeft\", command: \"_keyAdjust\", args: [-1] }), ({ key: \"ArrowDown\", command: \"_keyAdjust\", args: [-1] }) ] "}}],"decls":[{"name":"disabled","type":"boolean","def":{"kind":"code","src":" this.$provided(\"disabled\", false) ","deps":["this.$provided(\"disabled\")"]}},{"name":"focusVisible","type":"boolean","def":{"kind":"value","value":false}},{"name":"iconLeft","type":"string","def":{"kind":"value","value":""}},{"name":"iconRight","type":"string","def":{"kind":"value","value":""}},{"name":"menu","type":"View?","def":{"kind":"value","value":null}},{"name":"menuOpen","type":"boolean","def":{"kind":"code","src":" this.menu != null\n                       && (this.menu).shown === true\n                       && (this.menu).opener === this "}},{"name":"_rightIcon","type":"string","def":{"kind":"code","src":" this.iconRight != \"\" ? this.iconRight : this.menu != null ? \"ChevronIcon\" : \"\" ","deps":["this.iconRight","this.menu"]}},{"name":"command","type":"string","def":{"kind":"value","value":""}},{"name":"_commandChrome","type":"boolean","def":{"kind":"code","src":" this.command != \"\" ","deps":["this.command"]}},{"name":"flash","type":"boolean","def":{"kind":"value","value":false}},{"name":"flashMs","type":"number","def":{"kind":"value","value":220}}],"methods":[{"name":"openMenu","body":"if(this.menu==null||this.disabled)return;this.menu.showFor(this)"},{"name":"press","body":"if(this.menu!=null)this.openMenu();else if(this.command!=\"\")Commands.run(this.command)"},{"name":"focusShape","body":"return null"},{"name":"flashPress","body":"this.flash=true;this.afterDelay(this.flashMs,()=>{this.flash=false})"},{"name":"onFocus","body":"this.focusVisible=Focus.byKeyboard()"},{"name":"onBlur","body":"this.focusVisible=false"},{"name":"onPointerDown","params":[{"name":"e","type":"PointerEvent","nullable":true}],"body":"if(this.disabled)return;this.focusVisible=false;if(this.command==\"\")Focus.focus(this);if(this.menu!=null)this.openMenu()"},{"name":"_keyPress","params":[{"name":"e","type":"KeyEvent"}],"returns":"boolean","returnsNullable":false,"body":"if(this.disabled||e.repeat||!this.focused)return false;this.press();return!(e.key==\"Enter\"&&this.link!=\"\")"},{"name":"_keyMenu","params":[{"name":"e","type":"KeyEvent"}],"returns":"boolean","returnsNullable":false,"body":"if(this.disabled||e.repeat||!this.focused||this.menu==null)return false;this.openMenu();return true"},{"name":"_keyAdjust","params":[{"name":"d","type":"number"},{"name":"e","type":"KeyEvent"}],"returns":"boolean","returnsNullable":false,"body":"if(this.disabled||!this.focused)return false;if(this.accessibilityRole!=\"slider\"&&!(this.accessibilityRole==\"spinButton\"&&(e.key==\"ArrowUp\"||e.key==\"ArrowDown\")))return false;const step=this[d>0?\"accessibilityIncrement\":\"accessibilityDecrement\"];step.call(this);return true"},{"name":"onClick","params":[{"name":"e","type":"PointerEvent","nullable":true}],"body":"if(!this.disabled)this.press()"}]}},{"name":"IconHost","base":"View","body":{"tag":"IconHost","attrs":[{"name":"width","value":{"kind":"code","src":" classroot.kind == \"\" ? 0 : this.iconSize ","deps":["classroot.kind","this.iconSize"]}},{"name":"height","value":{"kind":"code","src":" this.iconSize ","deps":["this.iconSize"],"expr":"L0"}},{"name":"visible","value":{"kind":"code","src":" classroot.kind != \"\" ","deps":["classroot.kind"]}},{"name":"textColor","value":{"kind":"code","src":" classroot.ink ","deps":["classroot.ink"],"expr":"L0"},"route":"provision"}],"decls":[{"name":"kind","type":"string","def":{"kind":"value","value":""}},{"name":"iconSize","type":"number","def":{"kind":"code","src":" this.$provided(\"iconSize\", 16) ","deps":["this.$provided(\"iconSize\")"]}},{"name":"ink","type":"Color","def":{"kind":"code","src":" this.$provided(\"theme\", SanFrancisco).text ","deps":["this.$provided(\"theme\")"]}}],"methods":[{"name":"onInit","body":"if(this.kind!=\"\")this.createView(this.kind,{})"}]}},{"name":"Icon","base":"View","body":{"tag":"Icon","attrs":[{"name":"width","value":{"kind":"code","src":" this.iconSize ","deps":["this.iconSize"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.width ","deps":["this.width"],"expr":"L0"}}],"decls":[{"name":"_isIcon","type":"boolean","def":{"kind":"value","value":true}},{"name":"iconSize","type":"number","def":{"kind":"code","src":" this.$provided(\"iconSize\", 16) ","deps":["this.$provided(\"iconSize\")"]}},{"name":"textColor","type":"Color","def":{"kind":"code","src":" this.$provided(\"textColor\", 0x000000) ","deps":["this.$provided(\"textColor\")"]}},{"name":"ink","type":"Color","def":{"kind":"code","src":" this.textColor ","deps":["this.textColor"],"expr":"L0"}},{"name":"weight","type":"number","def":{"kind":"value","value":1.6}},{"name":"unit","type":"number","def":{"kind":"code","src":" this.width / 16 ","deps":["this.width"],"expr":"L0 K16 /"}}]}},{"name":"SunIcon","base":"Icon","body":{"tag":"SunIcon","decls":[{"name":"rays","type":"number","def":{"kind":"value","value":8}},{"name":"solid","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.fillStyle=this.ink;d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.beginPath();d.arc(8,8,classroot.solid?3.5:3.15,0,Math.PI*2,false);if(classroot.solid)d.fill();else d.stroke();for(let i=0;i<classroot.rays;i++){const a=i/classroot.rays*Math.PI*2;const c=Math.cos(a),s=Math.sin(a);d.beginPath();d.moveTo(8+c*5.3,8+s*5.3);d.lineTo(8+c*6.9,8+s*6.9);d.stroke()}"}]}},{"name":"MoonIcon","base":"Icon","body":{"tag":"MoonIcon","decls":[{"name":"solid","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.beginPath();d.arc(8,8,5.5,.389,4.323,false);d.arc(11,5,5.5,3.531,1.181,true);d.closePath();if(classroot.solid){d.fillStyle=this.ink;d.fill()}else{d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineJoin=\"round\";d.stroke()}"}]}},{"name":"AutoIcon","base":"Icon","body":{"tag":"AutoIcon","methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.fillStyle=this.ink;d.lineWidth=this.weight/this.unit;d.beginPath();d.arc(8,8,5.4,Math.PI*.5,Math.PI*1.5,false);d.closePath();d.fill();d.beginPath();d.arc(8,8,5.4,0,Math.PI*2,false);d.stroke()"}]}},{"name":"AppearanceSwitch","base":"Control","body":{"tag":"AppearanceSwitch","attrs":[{"name":"width","value":{"kind":"code","src":" this.$provided(\"theme\").appearanceSwitchSize ","deps":["this.$provided(\"theme\")"]}},{"name":"height","value":{"kind":"code","src":" this.width ","deps":["this.width"],"expr":"L0"}},{"name":"cornerRadius","value":{"kind":"code","src":" Math.min(this.$provided(\"theme\").controlCornerRadius, this.height / 2) ","deps":["this.$provided(\"theme\")","this.height"]}},{"name":"accessibilityRole","value":{"kind":"value","value":"switch"}},{"name":"accessibilityLabel","value":{"kind":"value","value":"Dark appearance"}},{"name":"accessibilityChecked","value":{"kind":"code","src":" this.dark ","$nullsUndefined":true,"deps":["this.dark"],"expr":"L0"}},{"name":"tooltipLabel","value":{"kind":"code","src":" this.dark ? \"Switch to light\" : \"Switch to dark\" ","deps":["this.dark"]}},{"name":"fill","value":{"kind":"code","src":" this.pressed ? this.$provided(\"theme\").controlPressed : this.hovered ? this.$provided(\"theme\").controlHovered : null ","deps":["this.pressed","this.$provided(\"theme\")","this.hovered"]}}],"decls":[{"name":"dark","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"commit","params":[{"name":"v","type":"boolean"}],"body":"this.dark=v"},{"name":"press","body":"this.commit(!this.dark)"}],"children":[{"tag":"SunIcon","name":"_sun","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"iconSize","value":{"kind":"value","value":16}},{"name":"visible","value":{"kind":"code","src":" !classroot.dark ","deps":["classroot.dark"],"expr":"L0 n"}},{"name":"ink","value":{"kind":"code","src":" classroot.hovered ? this.$provided(\"theme\").text : this.$provided(\"theme\").textMuted ","deps":["classroot.hovered","this.$provided(\"theme\")"]}}]},{"tag":"MoonIcon","name":"_moon","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"iconSize","value":{"kind":"value","value":16}},{"name":"visible","value":{"kind":"code","src":" classroot.dark ","deps":["classroot.dark"],"expr":"L0"}},{"name":"ink","value":{"kind":"code","src":" classroot.hovered ? this.$provided(\"theme\").text : this.$provided(\"theme\").textMuted ","deps":["classroot.hovered","this.$provided(\"theme\")"]}}]}]}},{"name":"ResponsiveLayout","base":"Layout","body":{"tag":"ResponsiveLayout","decls":[{"name":"plan","type":"array","def":{"kind":"code","src":" [] "}},{"name":"gap","type":"number","def":{"kind":"value","value":10}},{"name":"align","type":"CrossAlign","def":{"kind":"value","value":"start"}}],"methods":[{"name":"place","body":"const view=this.view;const W=this.contentExtent(\"width\");const kids=this.laid();const plans=Array.isArray(this.plan)?this.plan:[];let tier=null;for(const t of plans){const f=t.from??0;if(W>=f&&(tier==null||f>(tier.from??0)))tier=t}if(tier==null)for(const t of plans){if(tier==null||(t.from??0)<(tier.from??0))tier=t}if(tier==null)tier={flow:\"row\"};const stack=tier.flow==\"stack\";const gap=typeof tier.gap==\"number\"?tier.gap:this.gap;const share=tier.share!=null&&typeof tier.share==\"object\"?tier.share:{};const where=\" (the plan from \"+(tier.from??0)+\", on \"+view.constructor.name+\")\";const al=tier.align!=null?tier.align:this.align;if(al!=\"start\"&&al!=\"center\"&&al!=\"end\"&&al!=\"baseline\"&&al!=\"stretch\"){throw new Error(\"align is \"+JSON.stringify(al)+where+' \\u2014 a ResponsiveLayout places both axes of its children, so it always says where they sit across the flow: \"start\", \"center\", \"end\", \"baseline\" or \"stretch\"')}const shares=new Map;let total=0;for(const name of Object.keys(share)){const c=view[name];if(c==null||kids.indexOf(c)<0){throw new Error(\"the plan names '\"+name+\"', but \"+view.constructor.name+\" has no laid child named '\"+name+\"'\")}const v=share[name];if(v===\"auto\")continue;if(typeof v!=\"number\"||!isFinite(v)||v<0||v>100){throw new Error(\"the share for '\"+name+\"' is \"+JSON.stringify(v)+where+' \\u2014 a share is a number from 0 to 100 (and 0 drops the child), or the word \"auto\" to keep the child at its natural size')}shares.set(c,v);total=total+v}if(!stack&&total>100+1e-6){throw new Error(\"the row's shares add up to \"+Math.round(total*100)/100+\"%\"+where+' \\u2014 the shares of a row divide one run and cannot claim more than 100% of it; a child that should keep its natural size is named \"auto\" or left out of the share')}const offsets=new Map;const offset=tier.offset!=null&&typeof tier.offset==\"object\"?tier.offset:{};for(const name of Object.keys(offset)){const c=view[name];if(c==null||kids.indexOf(c)<0){throw new Error(\"the plan's offset names '\"+name+\"', but \"+view.constructor.name+\" has no laid child named '\"+name+\"'\")}const v=offset[name];if(typeof v!=\"number\"||!isFinite(v)){throw new Error(\"the offset for '\"+name+\"' is \"+JSON.stringify(v)+where+\" \\u2014 an offset is a number of pixels across the flow, from where align places the child\")}offsets.set(c,v)}const hidden=c=>shares.get(c)===0;const weight=c=>{const f=c.flexes;return hidden(c)?0:f===true?1:typeof f==\"number\"&&f>0?f:0};const shrinking=c=>weight(c)==0&&!hidden(c)&&c.shrinks===true&&!(shares.has(c)&&!stack);const flexing=c=>weight(c)>0||shrinking(c);const flowSize=stack?\"Height\":\"Width\";const clamp=(c,v)=>{const hi=c[\"max\"+flowSize];return Math.max(hi>0?Math.min(v,hi):v,c[\"min\"+flowSize],0)};let visN=0;for(const c of kids)if(c.visible&&!hidden(c))visN=visN+1;const avail=W-gap*Math.max(0,visN-1);const given=kids.map(c=>c.visible&&shrinking(c)?clamp(c,stack?c.contentHeight:c.contentWidth):0);let naturalRun=0;if(!stack){kids.forEach((c,i)=>{if(!c.visible||hidden(c)||weight(c)>0||shares.has(c))return;naturalRun=naturalRun+(shrinking(c)?given[i]:c.footprint().width)})}const base=Math.max(0,avail-naturalRun);const shareW=c=>(stack?W:base)*shares.get(c)/100;let rigid=0;let flexN=0;let shrinkN=0;kids.forEach((c,i)=>{if(!c.visible||hidden(c))return;if(weight(c)>0){flexN=flexN+1;given[i]=clamp(c,0);return}if(shrinking(c)){shrinkN=shrinkN+1;return}rigid=rigid+(stack?c.footprint().height:shares.has(c)?shareW(c):c.footprint().width)});if(flexN+shrinkN>0){const tall=!stack?0:flexN>0?this.contentExtent(\"height\"):this.viewExtent(\"height\");const room=!stack?avail:flexN==0&&tall<=0?Infinity:tall-gap*Math.max(0,visN-1);let used=rigid;kids.forEach((c,i)=>{if(c.visible)used=used+given[i]});const held=kids.map(c=>false);if(used>room){let over=used-room;for(let round=0;round<=kids.length;round=round+1){let basis=0;kids.forEach((c,i)=>{if(c.visible&&shrinking(c)&&!held[i])basis=basis+given[i]});if(basis<=0)break;let again=false;kids.forEach((c,i)=>{if(!c.visible||!shrinking(c)||held[i])return;const lo=c[\"min\"+flowSize];if(given[i]-over*given[i]/basis<lo){over=over-(given[i]-lo);given[i]=lo;held[i]=true;again=true}});if(!again){kids.forEach((c,i)=>{if(c.visible&&shrinking(c)&&!held[i])given[i]=given[i]-over*given[i]/basis});break}}}else if(flexN>0){let free=room-rigid;kids.forEach((c,i)=>{if(c.visible&&shrinking(c))free=free-given[i]});for(let round=0;round<=kids.length;round=round+1){let total2=0;kids.forEach((c,i)=>{if(c.visible&&weight(c)>0&&!held[i])total2=total2+weight(c)});if(total2<=0)break;const each=Math.max(0,free)/total2;let off=0;kids.forEach((c,i)=>{if(!c.visible||weight(c)==0||held[i])return;given[i]=clamp(c,each*weight(c));off=off+given[i]-each*weight(c)});if(Math.abs(off)<.001)break;kids.forEach((c,i)=>{if(!c.visible||weight(c)==0||held[i])return;const want=each*weight(c);if(off>0&&given[i]>want||off<0&&given[i]<want){held[i]=true;free=free-given[i]}})}}}const cross=stack?\"x\":\"y\";const crossSize=stack?\"width\":\"height\";const allocated=c=>flexing(c)||shares.has(c);const crossExt=c=>!allocated(c)?c.footprint()[crossSize]:stack?shares.has(c)?shareW(c):c.width:c.height;const crossLead=c=>allocated(c)?0:stack?c.footprint().x:c.footprint().y;if(al==\"baseline\"&&stack)this.refuseStackBaseline();const onBaseline=al==\"baseline\"&&!stack;let line=0;let lineBase=0;const naturalCross=stack?\"contentWidth\":\"contentHeight\";const stretches=c=>al==\"stretch\"&&!(stack&&shares.has(c))&&this.sizedByContent(c,crossSize);const banded=al==\"stretch\"&&!this.sizedByChildren(crossSize);for(const c of kids){if(!c.visible||hidden(c))continue;if(!banded)line=Math.max(line,stretches(c)?c[naturalCross]:crossExt(c));const b=c.baseline;if(onBaseline&&typeof b==\"number\")lineBase=Math.max(lineBase,b)}if(al==\"center\"||al==\"end\")line=Math.max(line,this.viewExtent(crossSize));else if(al==\"stretch\"&&!this.sizedByChildren(crossSize))line=this.viewExtent(crossSize);const across=c=>{let o=0;if(al==\"center\")o=(line-crossExt(c))/2;else if(al==\"end\")o=line-crossExt(c);else if(onBaseline){const b=c.baseline;if(typeof b==\"number\")o=lineBase-b;else if(c.visible)this.refuseBaseline(c)}return o-(onBaseline?0:crossLead(c))+(offsets.has(c)?offsets.get(c):0)};let pos=0;const boxes=kids.map((c,i)=>{if(hidden(c)){return stack?{x:0,y:pos,vis:false,stretch:{w:c.width}}:{x:pos,y:0,vis:false,stretch:{w:c.width}}}const natural=!flexing(c)&&!(stack?false:shares.has(c));const f=natural?c.footprint():null;const lead=f==null?0:stack?f.y:f.x;const box=stack?{y:pos-lead}:{x:pos-lead};box[cross]=across(c);if(shares.has(c))box.w=shareW(c);if(flexing(c))box[stack?\"h\":\"w\"]=c.visible?given[i]:stack?c.height:c.width;if(al==\"stretch\")box.stretch=stack?{w:line}:{h:line};const adv=flexing(c)?given[i]:stack?f.height:shares.has(c)?shareW(c):f.width;if(c.visible)pos=pos+adv+gap;return box});return{boxes,contentWidth:null}"}]}},{"name":"Spacer","base":"View","body":{"tag":"Spacer","attrs":[{"name":"flexes","value":{"kind":"value","value":true}},{"name":"width","value":{"kind":"value","value":0}},{"name":"height","value":{"kind":"value","value":0}}],"decls":[{"name":"baseline","type":"number","def":{"kind":"value","value":0}}]}},{"name":"ValueControl","base":"Control","body":{"tag":"ValueControl","attrs":[{"name":"accessibilityLabel","value":{"kind":"code","src":" this.$provided(\"fieldLabel\", \"\") ","deps":["this.$provided(\"fieldLabel\")"]}},{"name":"accessibilityError","value":{"kind":"code","src":" this.error ","deps":["this.error"],"expr":"L0"}},{"name":"accessibilityRequired","value":{"kind":"code","src":" this.required !== false && this.required !== \"\" ","deps":["this.required"]}}],"decls":[{"name":"name","type":"string","def":{"kind":"value","value":""}},{"name":"required","type":"boolean | string","def":{"kind":"value","value":false}},{"name":"judged","type":"boolean","def":{"kind":"value","value":false}},{"name":"fieldValue","type":"any","def":{"kind":"value","value":null}},{"name":"empty","type":"boolean","def":{"kind":"code","src":" this.blank(this.shown) ","deps":["this.shown","this.shown.length"]}},{"name":"refused","type":"string","def":{"kind":"value","value":""}},{"name":"_refusedValue","type":"any","def":{"kind":"value","value":null}},{"name":"commitOn","type":"\"each\" | \"end\"","def":{"kind":"value","value":"each"}},{"name":"editing","type":"boolean","def":{"kind":"value","value":false}},{"name":"_draft","type":"any","def":{"kind":"value","value":null}},{"name":"_spanning","type":"boolean","def":{"kind":"value","value":false}},{"name":"_answering","type":"boolean","def":{"kind":"value","value":false}},{"name":"shown","type":"any","def":{"kind":"code","src":" this.editing ? this._draft : this.fieldValue ","deps":["this.editing","this._draft","this.fieldValue"],"expr":"L0 L1 L2 ?"}},{"name":"_refusing","type":"boolean","def":{"kind":"code","src":" this.refused != \"\" && this.shown === this._refusedValue ","deps":["this.refused","this.shown","this._refusedValue"]}},{"name":"_missing","type":"boolean","def":{"kind":"code","src":" this.required !== false && this.required !== \"\" && this.empty ","deps":["this.required","this.empty"]}},{"name":"_requiredSays","type":"string","def":{"kind":"code","src":" typeof this.required == \"string\" ? this.required : \"Required\" ","deps":["this.required"]}},{"name":"problem","type":"string","def":{"kind":"code","src":" this._refusing ? this.refused : this._missing ? this._requiredSays : this.validate(this.shown) ","deps":["this._refusing","this.refused","this._missing","this._requiredSays","this.shown"]}},{"name":"valid","type":"boolean","def":{"kind":"code","src":" this.problem == \"\" ","deps":["this.problem"]}},{"name":"error","type":"string","def":{"kind":"code","src":" this.judged ? this.problem : \"\" ","deps":["this.judged","this.problem"]}},{"name":"form","type":"any","def":{"kind":"code","src":" this.$provided(\"_form\", null) ","deps":["this.$provided(\"_form\")"]}},{"name":"_form","type":"any","def":{"kind":"value","value":null}},{"name":"_field","type":"any","def":{"kind":"value","value":null}},{"name":"_inField","type":"any","def":{"kind":"code","src":" this.$provided(\"_field\", null) ","deps":["this.$provided(\"_field\")"]}}],"methods":[{"name":"blank","params":[{"name":"v","type":"any"}],"returns":"boolean","returnsNullable":false,"body":"if(v==null||v===\"\"||v===false)return true;return Array.isArray(v)&&v.length==0"},{"name":"validate","params":[{"name":"v","type":"any"}],"returns":"string","returnsNullable":false,"body":"return\"\""},{"name":"admit","params":[{"name":"v","type":"any"}],"returns":"any","returnsNullable":false,"body":"return v"},{"name":"commit","params":[{"name":"v","type":"any"}],"body":""},{"name":"edit","params":[{"name":"v","type":"any"}],"body":"const a=this.admit(v);if(a===null&&v!==null||a===this.shown&&v!==this.shown)return;this._take(a)"},{"name":"beginEdit","body":"if(this.editing)return;this._spanning=true;this._draft=this.fieldValue;this.editing=true"},{"name":"endEdit","body":"if(!this.editing)return;const d=this._draft;this._spanning=false;this.editing=false;if(this.commitOn==\"end\")this._commitNow(d)"},{"name":"cancelEdit","body":"this._spanning=false;this.editing=false"},{"name":"_take","params":[{"name":"v","type":"any"}],"body":"if(!this._spanning){this._commitNow(v);return}this._draft=v;if(this.commitOn!=\"end\")this._commitNow(v)"},{"name":"_commitNow","params":[{"name":"v","type":"any"}],"body":"const before=this.fieldValue;this._answering=true;this.commit(v);this.afterSettle(()=>{if(this.fieldValue===before)this._answering=false})"},{"name":"refuse","params":[{"name":"message","type":"string"}],"body":"this._refusedValue=this.shown;this.refused=message"},{"name":"judge","body":"this.judged=true"},{"name":"focusField","body":"Focus.focus(this)"},{"name":"onRetire","body":"this._member.retire()"}],"children":[{"tag":"Node","name":"_member","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"f"},{"kind":"string","value":"fld"},{"kind":"string","value":"here"},{"kind":"string","value":"v"}]},"route":"list"}],"decls":[{"name":"f","type":"any","def":{"kind":"code","src":" classroot.form ","deps":["classroot.form"],"expr":"L0"}},{"name":"fld","type":"any","def":{"kind":"code","src":" classroot._inField ","deps":["classroot._inField"],"expr":"L0"}},{"name":"here","type":"boolean","def":{"kind":"code","src":" classroot.focused ","deps":["classroot.focused"],"expr":"L0"}},{"name":"v","type":"any","def":{"kind":"code","src":" classroot.fieldValue ","deps":["classroot.fieldValue"],"expr":"L0"}},{"name":"_joined","type":"any","def":{"kind":"value","value":null}},{"name":"_held","type":"any","def":{"kind":"value","value":null}}],"methods":[{"name":"sync","body":"if(this._joined!==this.f){if(this._joined!=null)this._joined._leave(classroot);this._joined=this.f;if(this.f!=null)this.f._join(classroot)}if(this._held!==this.fld){if(this._held!=null)this._held._release(classroot);this._held=this.fld;if(this.fld!=null)this.fld._hold(classroot)}"},{"name":"onInit","body":"this.sync()"},{"name":"onChange","params":[{"name":"e","type":"ChangeEvent"}],"body":"this.sync();if(e.changed.some(c=>c.name==\"v\")){if(classroot._answering)classroot._answering=false;else if(classroot.editing)classroot.cancelEdit()}if(e.changed.some(c=>c.name==\"here\")&&!this.here&&classroot.accessibilityExpanded!==true){classroot.endEdit();classroot.judged=true}"},{"name":"retire","body":"classroot.endEdit();if(this._joined!=null)this._joined._leave(classroot);if(this._held!=null)this._held._release(classroot);this._joined=null;this._held=null"}]}]}},{"name":"TextLabel","base":"Text","body":{"tag":"TextLabel","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"centerY","value":{"kind":"code","src":" this.baseline - this.capHeight / 2 ","deps":["this.baseline","this.capHeight"],"expr":"L0 L1 K2 / -"}}]}},{"name":"Switch","base":"ValueControl","body":{"tag":"Switch","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"switch"}},{"name":"accessibilityChecked","value":{"kind":"code","src":" this.checked ","$nullsUndefined":true,"deps":["this.checked"],"expr":"L0"}},{"name":"accessibilityLabel","value":{"kind":"code","src":" this.$provided(\"fieldLabel\", \"\") ","deps":["this.$provided(\"fieldLabel\")"]}},{"name":"width","value":{"kind":"code","src":" (this.label == \"\" ? 0 : this._cap.width + 12) + this._track.width ","deps":["this.label","this._cap.width","this._track.width"]}},{"name":"height","value":{"kind":"code","src":" this.$provided(\"theme\").switchHeight ","deps":["this.$provided(\"theme\")"]}},{"name":"fieldValue","value":{"kind":"code","src":" this.checked ","deps":["this.checked"],"expr":"L0"}},{"name":"claim","value":{"kind":"value","value":"x"}},{"name":"opacity","value":{"kind":"code","src":" this.disabled ? (this.$provided(\"theme\").disabledOpacity) : 1 ","deps":["this.disabled","this.$provided(\"theme\")"]}}],"decls":[{"name":"label","type":"string","def":{"kind":"value","value":""}},{"name":"baseline","type":"number","def":{"kind":"code","src":" this._cap.y + this._cap.baseline ","deps":["this._cap.y","this._cap.baseline"],"expr":"L0 L1 +"}},{"name":"checked","type":"boolean","def":{"kind":"value","value":false}},{"name":"dragging","type":"boolean","def":{"kind":"value","value":false}},{"name":"_dragged","type":"boolean","def":{"kind":"value","value":false}},{"name":"_dx","type":"number","def":{"kind":"value","value":0}},{"name":"_grab","type":"number","def":{"kind":"value","value":0}}],"methods":[{"name":"focusShape","body":"return{x:this._track.x,y:this._track.y,w:this._track.width,h:this._track.height,rad:this._track.cornerRadius}"},{"name":"commit","params":[{"name":"v","type":"boolean"}],"body":"this.checked=v"},{"name":"press","body":"this.edit(!this.checked)"},{"name":"_restX","params":[{"name":"on","type":"boolean"}],"returns":"number","returnsNullable":false,"body":"return on?this._track.width-this._track._thumb.width-2:2"},{"name":"_dragX","returns":"number","returnsNullable":false,"body":"return Math.max(2,Math.min(this._track.width-this._track._thumb.width-2,this._grab+this._dx))"},{"name":"onPointerDown","params":[{"name":"e","type":"PointerEvent"}],"body":"if(this.disabled)return;this.focusVisible=false;Focus.focus(this);this.dragging=true;this._dragged=false;this._dx=0;this._grab=this._restX(this.checked)"},{"name":"onPointerUp","body":"this.dragging=false"},{"name":"onDragStart","params":[{"name":"e","type":"PointerEvent"}],"body":"if(!this.disabled){this._dragged=true;this._dx=e.deltaX}"},{"name":"onDrag","params":[{"name":"e","type":"PointerEvent"}],"body":"this._dx=e.deltaX"},{"name":"onDragEnd","params":[{"name":"e","type":"DragEndEvent"}],"body":"if(this._dragged&&!e.canceled){const on=this._dragX()+this._track._thumb.width/2>this._track.width/2;if(on!=this.checked)this.edit(on)}this.dragging=false;this._dragged=false"}],"children":[{"tag":"TextLabel","name":"_cap","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"visible","value":{"kind":"code","src":" classroot.label != \"\" ","deps":["classroot.label"]}},{"name":"text","value":{"kind":"code","src":" classroot.label ","deps":["classroot.label"],"expr":"L0"}}]},{"tag":"View","name":"_track","attrs":[{"name":"x","value":{"kind":"code","src":" classroot.width - this.width ","deps":["classroot.width","this.width"],"expr":"L0 L1 -"}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"width","value":{"kind":"code","src":" this.$provided(\"theme\").switchWidth ","deps":["this.$provided(\"theme\")"]}},{"name":"height","value":{"kind":"code","src":" classroot.height ","deps":["classroot.height"],"expr":"L0"}},{"name":"cornerRadius","value":{"kind":"code","src":" this.height / 2 ","deps":["this.height"],"expr":"L0 K2 /"}},{"name":"fill","value":{"kind":"code","src":" classroot.checked ? this.$provided(\"theme\").accent : classroot.hovered || classroot.pressed ? this.$provided(\"theme\").controlSelected : ((this.$provided(\"theme\").trackFill ?? this.$provided(\"theme\").control)) ","deps":["classroot.checked","this.$provided(\"theme\")","classroot.hovered","classroot.pressed"]}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, classroot.checked ? this.$provided(\"theme\").accent : this.$provided(\"theme\").line) ","deps":["classroot.checked","this.$provided(\"theme\")"]}}],"children":[{"tag":"View","name":"_thumb","attrs":[{"name":"cornerRadius","value":{"kind":"code","src":" this.width / 2 ","deps":["this.width"],"expr":"L0 K2 /"}},{"name":"width","value":{"kind":"code","src":" classroot.checked || this.$provided(\"theme\").switchThumbOffSize == null ? parent.height - 4 : this.$provided(\"theme\").switchThumbOffSize ","deps":["classroot.checked","this.$provided(\"theme\")","parent.height"]}},{"name":"height","value":{"kind":"code","src":" this.width ","deps":["this.width"],"expr":"L0"}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").switchThumbFill ?? this.$provided(\"theme\").surface ","deps":["this.$provided(\"theme\")"]}}],"children":[{"tag":"Spring","name":"slide","attrs":[{"name":"attribute","value":{"kind":"value","value":"x"}},{"name":"to","value":{"kind":"code","src":" classroot._dragged ? classroot._dragX() : classroot._restX(classroot.checked) ","deps":["classroot._dragged","classroot.checked","classroot._track.width","classroot._track._thumb.width","classroot._grab","classroot._dx"]}},{"name":"stiffness","value":{"kind":"value","value":300}},{"name":"damping","value":{"kind":"value","value":26}}]}]}]}]}},{"name":"Floating","base":"View","body":{"tag":"Floating","attrs":[{"name":"ignoreLayout","value":{"kind":"value","value":true}},{"name":"pointerEvents","value":{"kind":"code","src":" this.shown ? \"auto\" : \"none\" ","deps":["this.shown"]}},{"name":"visible","value":{"kind":"code","src":" this.present ","deps":["this.present"],"expr":"L0"}},{"name":"paintsIn","value":{"kind":"code","src":" this.host ","$nullsUndefined":true,"deps":["this.host"],"expr":"L0"},"route":"class"},{"name":"scale","value":{"kind":"code","src":" this._baseScale ","deps":["this._baseScale"],"expr":"L0"}},{"name":"rotation","value":{"kind":"code","src":" this._baseRotation ","deps":["this._baseRotation"],"expr":"L0"}},{"name":"outsidePress","value":{"kind":"code","src":" this.shown ? this.pressPolicy : \"none\" ","deps":["this.shown","this.pressPolicy"]}},{"name":"scrollBelow","value":{"kind":"code","src":" this.shown ? this.scrollPolicy : \"none\" ","deps":["this.shown","this.scrollPolicy"]}},{"name":"keyBindings","value":{"kind":"code","src":" [ ({ key: \"Escape\", command: \"_keyEscape\" }) ] "}}],"decls":[{"name":"_form","type":"any","def":{"kind":"value","value":null}},{"name":"_field","type":"any","def":{"kind":"value","value":null}},{"name":"_sendHold","type":"any","def":{"kind":"code","src":" this._sendHolder ","deps":["this._sendHolder"],"expr":"L0"}},{"name":"_notice","type":"boolean","def":{"kind":"value","value":false}},{"name":"shown","type":"boolean","def":{"kind":"value","value":false}},{"name":"present","type":"boolean","def":{"kind":"value","value":false}},{"name":"openT","type":"number","def":{"kind":"value","value":0}},{"name":"host","type":"View?","def":{"kind":"value","value":null}},{"name":"_hostW","type":"number","def":{"kind":"code","src":" this.host != null ? this.host.width : this.$root.hostWidth > 0 ? this.$root.hostWidth : this.$root.width "}},{"name":"_hostH","type":"number","def":{"kind":"code","src":" this.host != null ? this.host.height : this.$root.hostHeight > 0 ? this.$root.hostHeight : this.$root.height "}},{"name":"opener","type":"View?","def":{"kind":"value","value":null}},{"name":"pressPolicy","type":"\"dismiss\" | \"dismissAndDeliver\" | \"block\" | \"ignore\"","def":{"kind":"value","value":"dismiss"}},{"name":"scrollPolicy","type":"\"block\" | \"allow\" | \"dismiss\"","def":{"kind":"value","value":"block"}},{"name":"takesFocus","type":"boolean","def":{"kind":"value","value":false}},{"name":"_savedFocus","type":"View?","def":{"kind":"value","value":null}},{"name":"_savedParent","type":"View?","def":{"kind":"value","value":null}},{"name":"_savedAt","type":"number","def":{"kind":"value","value":-1}},{"name":"_savedRing","type":"boolean","def":{"kind":"value","value":false}},{"name":"_hostedLayer","type":"boolean","def":{"kind":"value","value":false}},{"name":"_sharesProgram","type":"boolean","def":{"kind":"value","value":true}},{"name":"_baseScale","type":"number","def":{"kind":"value","value":1}},{"name":"_baseRotation","type":"number","def":{"kind":"value","value":0}},{"name":"_live","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"_waitsOnSend","returns":"boolean","returnsNullable":false,"body":"return this._sendHolder.waits()"},{"name":"_strata","returns":"OverlayStrata","returnsNullable":false,"body":"let s=null;for(const c of this.$root.children){if(c._isOverlayStrata===true)s=c}if(s==null)return this.$root.createView(\"OverlayStrata\",{});s.raise();return s"},{"name":"_layerFor","params":[{"name":"s","type":"OverlayStrata"}],"returns":"View","returnsNullable":false,"body":"if(this._notice)return s.notice;const own=this.$provided(\"overlays\",null);this._hostedLayer=false;if(own!=null)return own;const hosts=this.$root.hostProvided(\"overlays\",null);if(hosts==null)return s.overlays;this._hostedLayer=true;return hosts"},{"name":"_takeProgramTransform","body":"if(!this._hostedLayer||!this._sharesProgram||this.host==null){this._baseScale=1;this._baseRotation=0;return}const t=this.$root.transformTo(this.host);this._baseScale=t.scale;this._baseRotation=t.rotation*180/Math.PI"},{"name":"commit","params":[{"name":"open","type":"boolean"}],"body":"this.shown=open"},{"name":"_sync","body":"if(this.shown&&!this._live){this._live=true;this._opening()}else if(!this.shown&&this._live){this._live=false;this._closing()}"},{"name":"show","body":"if(!this.shown)this.commit(true);this._sync()"},{"name":"_opening","body":"const s=this._strata();this.host=this._layerFor(s);this._takeProgramTransform();this.present=true;s.opened(this);if(this.pressPolicy!=\"ignore\")Keyboard.navClaim(this,true);if(this.takesFocus){this._savedFocus=Focus.getFocus();this._savedParent=this._savedFocus!=null?this._savedFocus.parent:null;this._savedAt=this._savedParent!=null?this._savedParent.childViews.indexOf(this._savedFocus):-1;this._savedRing=this._savedFocus!=null&&Focus.byKeyboard();this.afterSettle(()=>this.focusFirst())}"},{"name":"showFor","params":[{"name":"v","type":"View"}],"body":"this.opener=v;this.show()"},{"name":"focusFirst","body":"if(!Focus.focusIn(this))this._holdFocusItself()"},{"name":"_holdFocusItself","body":"this.focusable=true;Focus.focus(this)"},{"name":"close","body":"if(this.shown)this.commit(false);this._sync()"},{"name":"_closing","body":"this._strata().closedIt(this);Keyboard.navClaim(this,false);if(this._savedFocus!=null||this.restoresFocusTo!=null)this.afterDelay(0,()=>this.afterDelay(0,()=>{const f=Focus.getFocus();let inside=false;for(let p=f;p!=null;p=p.parent)if(p==this)inside=true;if(f==null||inside||Focus.holds(this))Focus._giveBack(this);else{this._savedFocus=null;this._savedParent=null}}));this.closed()"},{"name":"closed","body":""},{"name":"onRetire","body":"if(!this._live)return;this._live=false;for(const c of this.$root.children){if(c._isOverlayStrata===true)c.closedIt(this)}Keyboard.navClaim(this,false)"},{"name":"isTop","returns":"boolean","returnsNullable":false,"body":"return this._strata().top()==this"},{"name":"anchorBox","params":[{"name":"v","type":"View","nullable":true}],"returns":"object","returnsNullable":false,"body":"if(v==null)return{x:0,y:0,w:0,h:0};const o=this.toLayer(v,0,0);const k=this.host!=null?v.transformTo(this.host).scale:1;return{x:o.x,y:o.y,w:v.width*k,h:v.height*k}"},{"name":"toLayer","params":[{"name":"v","type":"View"},{"name":"px","type":"number"},{"name":"py","type":"number"}],"returns":"object","returnsNullable":false,"body":"return this._through(v.transformTo(this.host!=null?this.host:this._screen()),px,py)"},{"name":"_screen","returns":"View","returnsNullable":false,"body":"if(this.host==null)return this.$root;let n=this.host;while(n.parent!=null)n=n.parent;return n"},{"name":"_toScreen","params":[{"name":"v","type":"View"},{"name":"px","type":"number"},{"name":"py","type":"number"}],"returns":"object","returnsNullable":false,"body":"return this._through(v.transformTo(this._screen()),px,py)"},{"name":"_through","params":[{"name":"t","type":"object"},{"name":"px","type":"number"},{"name":"py","type":"number"}],"returns":"object","returnsNullable":false,"body":"const a=t.rotation;return{x:t.x+t.scale*(px*Math.cos(a)-py*Math.sin(a)),y:t.y+t.scale*(px*Math.sin(a)+py*Math.cos(a))}"},{"name":"keepOnApp","params":[{"name":"x","type":"number"},{"name":"y","type":"number"},{"name":"w","type":"number"},{"name":"h","type":"number"}],"returns":"object","returnsNullable":false,"body":"const scr=this._screen();if(this.host==null)return{x:Math.max(4,Math.min(scr.width-w-4,x)),y:Math.max(4,Math.min(scr.height-h-4,y))};const out=this.host.transformTo(scr);const cs=[this._through(out,x,y),this._through(out,x+w,y),this._through(out,x,y+h),this._through(out,x+w,y+h)];const minX=Math.min(...cs.map(c=>c.x));const maxX=Math.max(...cs.map(c=>c.x));const minY=Math.min(...cs.map(c=>c.y));const maxY=Math.max(...cs.map(c=>c.y));const dx=maxX>scr.width-4?scr.width-4-maxX:0;const dy=maxY>scr.height-4?scr.height-4-maxY:0;const sx=minX+dx<4?4-minX:dx;const sy=minY+dy<4?4-minY:dy;if(sx==0&&sy==0)return{x,y};const back=scr.transformTo(this.host);const p0=this._through(back,cs[0].x,cs[0].y);const p1=this._through(back,cs[0].x+sx,cs[0].y+sy);return{x:x+p1.x-p0.x,y:y+p1.y-p0.y}"},{"name":"onOutsidePress","body":"if(!this._waitsOnSend())this.close()"},{"name":"escape","body":"this.close()"},{"name":"_keyEscape","params":[{"name":"e","type":"KeyEvent"}],"returns":"boolean","returnsNullable":false,"body":"if(!this.shown)return false;if(this._waitsOnSend())return true;this.escape();return true"}],"children":[{"tag":"SendHold","name":"_sendHolder","attrs":[{"name":"open","value":{"kind":"code","src":" classroot.shown ","deps":["classroot.shown"],"expr":"L0"}}]},{"tag":"Spring","name":"_motion","attrs":[{"name":"attribute","value":{"kind":"value","value":"openT"}},{"name":"to","value":{"kind":"code","src":" classroot.shown ? 1 : 0 ","deps":["classroot.shown"],"expr":"L0 K1 K0 ?"}},{"name":"stiffness","value":{"kind":"value","value":520}},{"name":"damping","value":{"kind":"value","value":40}},{"name":"epsilon","value":{"kind":"value","value":0.01}}],"methods":[{"name":"onStop","body":"if(!classroot.shown)classroot.present=false"}]},{"tag":"Node","name":"_watch","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"open"}]},"route":"list"}],"decls":[{"name":"open","type":"boolean","def":{"kind":"code","src":" classroot.shown ","deps":["classroot.shown"],"expr":"L0"}}],"methods":[{"name":"onInit","body":"if(this.open)this.afterSettle(()=>classroot._sync())"},{"name":"onChange","body":"classroot._sync()"}]}]}},{"name":"SendHold","base":"Node","body":{"tag":"SendHold","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"open"}]},"route":"list"}],"decls":[{"name":"open","type":"boolean","def":{"kind":"value","value":false}},{"name":"holds","type":"any[]","def":{"kind":"value","value":[]}},{"name":"held","type":"boolean","def":{"kind":"code","src":" this.holds.length > 0 ","deps":["this.holds.length"],"expr":"L0 K0 >"}},{"name":"_told","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"hold","params":[{"name":"by","type":"any"},{"name":"on","type":"boolean"}],"body":"const was=this.holds.includes(by);if(on&&!was)this.holds=[...this.holds,by];else if(!on&&was)this.holds=this.holds.filter(h=>h!==by);if(this.holds.length==0)this._told=false"},{"name":"waits","returns":"boolean","returnsNullable":false,"body":"if(!this.held)return false;if(!this._told){this._told=true;Accessibility.announce(\"Still sending\")}return true"},{"name":"onChange","params":[{"name":"e","type":"ChangeEvent"}],"body":"if(!this.open){this.holds=[];this._told=false}"}]}},{"name":"Sheet","base":"Floating","body":{"tag":"Sheet","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"dialog"}},{"name":"_sharesProgram","value":{"kind":"value","value":false}},{"name":"pressPolicy","value":{"kind":"value","value":"dismiss"}},{"name":"scrollPolicy","value":{"kind":"value","value":"block"}},{"name":"takesFocus","value":{"kind":"value","value":true}},{"name":"focusScope","value":{"kind":"value","value":"modal"}},{"name":"defaultPlacement","value":{"kind":"value","value":"_body"}},{"name":"width","value":{"kind":"code","src":" this.presentation == \"bottom\" ? this._hostW : Math.min(this.sheetWidth, this._hostW - this._presentationMargin) ","deps":["this.presentation","this._hostW","this.sheetWidth","this._presentationMargin"]}},{"name":"height","value":{"kind":"code","src":" this.presentation == \"end\" || this.presentation == \"start\" ? this._hostH : Math.min(this._body.contentHeight + (this.presentation == \"bottom\" ? 20 : 0), this.presentation == \"bottom\" ? this._footY - 24 : this._hostH - 48) ","deps":["this.presentation","this._hostH","this._body.contentHeight","this._footY"]}},{"name":"x","value":{"kind":"code","src":" this.presentation == \"end\" ? this._hostW - this.width * this.openT\n        : this.presentation == \"start\" ? this.width * (this.openT - 1) - this._dragX\n        : this._restX ","deps":["this.presentation","this._hostW","this.width","this.openT","this._dragX","this._restX"]}},{"name":"y","value":{"kind":"code","src":" this.presentation == \"bottom\" ? this._footY - this.height * this.openT + this._dragY\n        : this.presentation == \"center\" ? (this._hostH - this.height) / 2 + 16 * (1 - this.openT) : 0 ","deps":["this.presentation","this._footY","this.height","this.openT","this._dragY","this._hostH"]}},{"name":"opacity","value":{"kind":"code","src":" this.presentation == \"center\" ? this.openT : 1 ","deps":["this.presentation","this.openT"]}},{"name":"cornerRadius","value":{"kind":"code","src":" this.presentation == \"bottom\" ? [(this.$provided(\"theme\").sheetCornerRadius), (this.$provided(\"theme\").sheetCornerRadius), 0, 0] : this.presentation == \"end\" || this.presentation == \"start\" ? 0 : (this.$provided(\"theme\").sheetCornerRadius) - 2 ","deps":["this.presentation","this.$provided(\"theme\")"]}}],"decls":[{"name":"edge","type":"\"bottom\" | \"end\" | \"start\"","def":{"kind":"value","value":"bottom"}},{"name":"narrow","type":"boolean","def":{"kind":"code","src":" this._hostW < 600 ","deps":["this._hostW"],"expr":"L0 K600 <"}},{"name":"_widePresentation","type":"string","def":{"kind":"code","src":" this.edge == \"end\" ? \"end\" : \"center\" ","deps":["this.edge"]}},{"name":"presentation","type":"string","def":{"kind":"code","src":" this.edge == \"start\" ? \"start\" : this.narrow ? \"bottom\" : this._widePresentation ","deps":["this.edge","this.narrow","this._widePresentation"]}},{"name":"sheetWidth","type":"number","def":{"kind":"code","src":" this.presentation == \"end\" ? 420 : this.presentation == \"start\" ? 320 : 520 ","deps":["this.presentation"]}},{"name":"_dragY","type":"number","def":{"kind":"value","value":0}},{"name":"_dragX","type":"number","def":{"kind":"value","value":0}},{"name":"_keyboardH","type":"number","def":{"kind":"code","src":" this._hostedLayer ? 0 : this.$root.keyboardHeight ","deps":["this._hostedLayer","this.$root.keyboardHeight"],"expr":"L0 K0 L1 ?"}},{"name":"_footY","type":"number","def":{"kind":"code","src":" this._hostH - this._keyboardH ","deps":["this._hostH","this._keyboardH"],"expr":"L0 L1 -"}},{"name":"_presentationMargin","type":"number","def":{"kind":"code","src":" ({ center: 48, start: 56 })[this.presentation] ?? 0 ","deps":["this.presentation"]}},{"name":"_restX","type":"number","def":{"kind":"code","src":" this.presentation == \"bottom\" ? 0 : (this._hostW - this.width) / 2 ","deps":["this.presentation","this._hostW","this.width"]}}],"children":[{"tag":"Node","name":"_dragReset","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"open"}]},"route":"list"}],"decls":[{"name":"open","type":"boolean","def":{"kind":"code","src":" classroot.shown ","deps":["classroot.shown"],"expr":"L0"}}],"methods":[{"name":"onChange","body":"if(!this.open){classroot._dragY=0;classroot._dragX=0}"}]},{"tag":"View","name":"_scrim","attrs":[{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"x","value":{"kind":"code","src":" -classroot.x ","deps":["classroot.x"],"expr":"L0 ~"}},{"name":"y","value":{"kind":"code","src":" -classroot.y ","deps":["classroot.y"],"expr":"L0 ~"}},{"name":"width","value":{"kind":"code","src":" classroot._hostW ","deps":["classroot._hostW"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" classroot._hostH ","deps":["classroot._hostH"],"expr":"L0"}},{"name":"opacity","value":{"kind":"code","src":" (this.$provided(\"theme\").scrimOpacity) * classroot.openT ","deps":["this.$provided(\"theme\")","classroot.openT"]}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"const c=classroot;d.fillStyle=this.$provided(\"theme\").scrimFill;d.beginPath();d.rect(0,0,d.w,d.h);const r=c.cornerRadius;d.roundRect(c.x,c.y,c.width,c.height,typeof r==\"number\"?r:[...r]);d.fill(\"evenodd\")"}]},{"tag":"View","name":"_panel","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"code","src":" parent.height + (classroot.presentation == \"bottom\" ? 40 + classroot._keyboardH : 0) ","deps":["parent.height","classroot.presentation","classroot._keyboardH"]}},{"name":"cornerRadius","value":{"kind":"code","src":" classroot.cornerRadius ","deps":["classroot.cornerRadius"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" classroot.fill == null ? this.$provided(\"theme\").surface : null ","deps":["classroot.fill","this.$provided(\"theme\")"]}},{"name":"shadow","value":{"kind":"code","src":" this.$provided(\"theme\").sheetShadow ","$nullsUndefined":true,"deps":["this.$provided(\"theme\")"]}}],"children":[{"tag":"View","name":"_foot","attrs":[{"name":"y","value":{"kind":"code","src":" classroot.height ","deps":["classroot.height"],"expr":"L0"}},{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"code","src":" parent.height - classroot.height ","deps":["parent.height","classroot.height"],"expr":"L0 L1 -"}},{"name":"visible","value":{"kind":"code","src":" classroot.fill != null ","deps":["classroot.fill"],"expr":"L0 N !"}},{"name":"fill","value":{"kind":"code","src":" classroot.fill ","deps":["classroot.fill"],"expr":"L0"}}]}]},{"tag":"View","name":"_handle","attrs":[{"name":"visible","value":{"kind":"code","src":" classroot.presentation == \"bottom\" ","deps":["classroot.presentation"]}},{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":20}},{"name":"claim","value":{"kind":"value","value":"y"}}],"methods":[{"name":"onDrag","params":[{"name":"e","type":"PointerEvent"}],"body":"classroot._dragY=Math.max(0,e.deltaY)"},{"name":"onDragEnd","params":[{"name":"e","type":"DragEndEvent"}],"body":"if(!e.canceled&&classroot._dragY>classroot.height/4&&!classroot._waitsOnSend())classroot.close();else classroot._dragY=0"}],"children":[{"tag":"View","name":"bar","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":7}},{"name":"width","value":{"kind":"value","value":36}},{"name":"height","value":{"kind":"value","value":5}},{"name":"cornerRadius","value":{"kind":"value","value":3}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").line ","deps":["this.$provided(\"theme\")"]}}]}]},{"tag":"View","name":"_body","attrs":[{"name":"y","value":{"kind":"code","src":" classroot.presentation == \"bottom\" ? 20 : 0 ","deps":["classroot.presentation"]}},{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"code","src":" classroot.height - this.y ","deps":["classroot.height","this.y"],"expr":"L0 L1 -"}},{"name":"scrolls","value":{"kind":"value","value":"y"}},{"name":"padding","value":{"kind":"code","src":" classroot.presentation == \"bottom\" ? [4, 18, 24, 18] : 24 ","deps":["classroot.presentation"]}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}},{"name":"spacing","value":{"kind":"value","value":12}}],"classSlot":"Layout"}]},{"tag":"View","name":"_grip","attrs":[{"name":"visible","value":{"kind":"code","src":" classroot.presentation == \"start\" ","deps":["classroot.presentation"]}},{"name":"x","value":{"kind":"code","src":" classroot.width - 24 ","deps":["classroot.width"],"expr":"L0 K24 -"}},{"name":"y","value":{"kind":"value","value":0}},{"name":"width","value":{"kind":"value","value":24}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"claim","value":{"kind":"value","value":"x"}}],"methods":[{"name":"onDrag","params":[{"name":"e","type":"PointerEvent"}],"body":"classroot._dragX=Math.max(0,-e.deltaX)"},{"name":"onDragEnd","params":[{"name":"e","type":"DragEndEvent"}],"body":"if(!e.canceled&&classroot._dragX>classroot.width/4&&!classroot._waitsOnSend())classroot.close();else classroot._dragX=0"}]}]}},{"name":"Segmented","base":"ValueControl","body":{"tag":"Segmented","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"radioGroup"}},{"name":"fieldValue","value":{"kind":"code","src":" this.value ","deps":["this.value"],"expr":"L0"}},{"name":"focusScope","value":{"kind":"value","value":"stop"}},{"name":"focusable","value":{"kind":"value","value":false}},{"name":"height","value":{"kind":"code","src":" this.$provided(\"theme\").segmentedHeight ","deps":["this.$provided(\"theme\")"]}},{"name":"cornerRadius","value":{"kind":"code","src":" this._rad ","deps":["this._rad"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").trackFill ?? this.$provided(\"theme\").control ","deps":["this.$provided(\"theme\")"]}},{"name":"opacity","value":{"kind":"code","src":" this.disabled ? (this.$provided(\"theme\").disabledOpacity) : 1 ","deps":["this.disabled","this.$provided(\"theme\")"]}},{"name":"width","value":{"kind":"code","src":" Math.max(this._total, this.segmentMinWidth) + 4 ","deps":["this._total","this.segmentMinWidth"],"expr":"L0 L1 M K4 +"}},{"name":"datapath","value":{"kind":"code","src":" this._segmentRows.value ","$nullsUndefined":true,"deps":["this._segmentRows.value"],"expr":"L0"},"route":"cursor"}],"decls":[{"name":"_isSegmented","type":"boolean","def":{"kind":"value","value":true}},{"name":"items","type":"array","def":{"kind":"list","items":[]},"route":"list"},{"name":"value","type":"object","def":{"kind":"value","value":null}},{"name":"_rad","type":"number","def":{"kind":"code","src":" this.$provided(\"theme\").segmentedCornerRadius ","deps":["this.$provided(\"theme\")"]}},{"name":"segmentWidths","type":"\"equal\" | \"proportional\"","def":{"kind":"value","value":"equal"}},{"name":"segmentMinWidth","type":"number","def":{"kind":"value","value":44}},{"name":"_count","type":"number","def":{"kind":"code","src":" Math.max(1, ((this.items ?? [])).length) ","deps":["this.items"]}},{"name":"_inset","type":"number","def":{"kind":"code","src":" this.$provided(\"theme\").segmentedLabelInset ","deps":["this.$provided(\"theme\")"]}},{"name":"_needs","type":"array","def":{"kind":"code","src":"this.items??[]).map(r=>Math.max(this.segmentMinWidth,2*this._inset+Math.ceil(r.icon!=null?this.$provided(\"iconSize\",16):measureText(\"\"+(r.label??\"\"),this.providedTextStyle({fontSize:this.$provided(\"theme\").segmentedFontSize,fontWeight:\"medium\"})).width))"}},{"name":"_wants","type":"array","def":{"kind":"code","src":" this.segmentWidths == \"equal\" ? this._needs.map(() => Math.max(...this._needs)) : this._needs ","deps":["this.segmentWidths","this._needs"]}},{"name":"_total","type":"number","def":{"kind":"code","src":" this._wants.reduce((a, b) => a + b, 0) ","deps":["this._wants"]}},{"name":"_widths","type":"array","def":{"kind":"code","src":" this._wants.map((w) => w * (this.width - 4) / Math.max(1, this._total)) ","deps":["this.width","this._total","this._wants"]}},{"name":"_lefts","type":"array","def":{"kind":"code","src":" this._widths.reduce((a, w) => [...a, a[a.length - 1] + w], [2]) "}},{"name":"_idx","type":"number","def":{"kind":"code","src":"this.items??[]).findIndex(c=>c.id===this.value"}},{"name":"_lane","type":"number","def":{"kind":"value","value":0}}],"methods":[{"name":"focusEntry","returns":"View","returnsNullable":true,"body":"const ss=this.segs();return ss[Math.max(0,this._idx)]??null"},{"name":"_at","params":[{"name":"a","type":"array"},{"name":"lane","type":"number"}],"returns":"number","returnsNullable":false,"body":"const i=Math.max(0,Math.min(a.length-1,Math.floor(lane)));return a[i]+((a[i+1]??a[i])-a[i])*(lane-i)"},{"name":"commit","params":[{"name":"v","type":"object"}],"body":"this.value=v"},{"name":"pick","params":[{"name":"v","type":"object"}],"body":"this.edit(v)"},{"name":"segs","returns":"array","returnsNullable":false,"body":"const out=[];for(const c of this.children){if(c._isSegment===true)out.push(c)}return out"}],"children":[{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"_lane"}},{"name":"to","value":{"kind":"code","src":" classroot._idx < 0 ? 0 : classroot._idx ","deps":["classroot._idx"],"expr":"L0 K0 < K0 L0 ?"}},{"name":"stiffness","value":{"kind":"value","value":260}},{"name":"damping","value":{"kind":"value","value":30}},{"name":"mass","value":{"kind":"value","value":0.9}},{"name":"epsilon","value":{"kind":"value","value":0.002}}]},{"tag":"View","name":"_pill","attrs":[{"name":"y","value":{"kind":"value","value":2}},{"name":"height","value":{"kind":"code","src":" parent.height - 4 ","deps":["parent.height"],"expr":"L0 K4 -"}},{"name":"cornerRadius","value":{"kind":"code","src":" Math.max(0, (parent)._rad - 2) ","deps":["parent._rad"],"expr":"K0 L0 K2 - M"}},{"name":"x","value":{"kind":"code","src":" (parent)._at((parent)._lefts, (parent)._lane) "}},{"name":"width","value":{"kind":"code","src":" (parent)._at((parent)._widths, (parent)._lane) "}},{"name":"visible","value":{"kind":"code","src":" (parent)._idx >= 0 ","deps":["parent._idx"],"expr":"L0 K0 g"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").segmentedSelectedFill ?? this.$provided(\"theme\").surface ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, this.$provided(\"theme\").line) ","deps":["this.$provided(\"theme\")"]}}]},{"tag":"View","name":"_rules","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"visible","value":{"kind":"code","src":" this.$provided(\"theme\").segmentDividerColor != null ","deps":["this.$provided(\"theme\")"]}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"const s=parent;d.fillStyle=this.$provided(\"theme\").segmentDividerColor??this.$provided(\"theme\").line;for(let i=1;i<s._count;i++){const near=s._idx<0?1:Math.abs(s._lane+.5-i);const a=Math.max(0,Math.min(1,(near-.5)*2));if(a<=0)continue;d.globalAlpha=a;d.fillRect((s._lefts[i]??0)-.5,7,1,this.height-14)}"}]},{"tag":"Dataset","name":"_segmentRows","attrs":[{"name":"contents","value":{"kind":"code","src":" { rows: ((classroot.items ?? [])).map((c, i) => ({ ...c, i: i })) } ","deps":["classroot.items"]}}]},{"tag":"SegmentedItem","attrs":[{"name":"datapath","value":{"kind":"path","path":"rows","many":true},"route":"cursor"}]}]}},{"name":"SegmentedItem","base":"Control","body":{"tag":"SegmentedItem","attrs":[{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"width","value":{"kind":"code","src":" ((parent)._widths ?? [])[this.$data([\"i\"]) ?? 0] ?? 0 "}},{"name":"x","value":{"kind":"code","src":" ((parent)._lefts ?? [])[this.$data([\"i\"]) ?? 0] ?? 2 "}},{"name":"accessibilityRole","value":{"kind":"value","value":"radio"}},{"name":"accessibilityChecked","value":{"kind":"code","src":" this.on ","$nullsUndefined":true,"deps":["this.on"],"expr":"L0"}},{"name":"accessibilityLabel","value":{"kind":"code","src":" \"\" + (this.$data([\"label\"]) ?? \"\") ","deps":[":label"]}},{"name":"disabled","value":{"kind":"code","src":" (parent).disabled "}},{"name":"link","value":{"kind":"code","src":" !this.disabled && classroot.location != \"\" ? \"#\" + classroot.location : \"\" ","deps":["this.disabled","classroot.location"]}},{"name":"replace","value":{"kind":"code","src":" (parent).replace ","deps":["parent.replace"],"expr":"L0"}}],"decls":[{"name":"_isSegment","type":"boolean","def":{"kind":"value","value":true}},{"name":"on","type":"boolean","def":{"kind":"code","src":" (parent).value === this.$data([\"id\"]) ","deps":["parent.value",":id"],"expr":"L0 L1 ="}},{"name":"ink","type":"Color","def":{"kind":"code","src":" this.on ? this.$provided(\"theme\").segmentedSelectedTextColor ?? this.$provided(\"theme\").text\n        : this.hovered ? this.$provided(\"theme\").text : this.$provided(\"theme\").textMuted ","deps":["this.on","this.$provided(\"theme\")","this.hovered"]}},{"name":"location","type":"string","def":{"kind":"code","src":" \"\" + (this.$data([\"location\"]) ?? \"\") ","deps":[":location"]}}],"methods":[{"name":"press","body":"if(!this.disabled)this.parent.pick(this.$data([\"id\"]))"},{"name":"onClick","body":"this.press()"},{"name":"onKeyDown","params":[{"name":"e","type":"KeyEvent"}],"body":"if(e.key==\"Enter\"||e.key==\" \"){this.press();return}$base.onKeyDown(e)","usesSuper":true},{"name":"focusShape","body":"return{x:2,y:2,w:this.width-4,h:this.height-4,rad:Math.max(0,this.parent._rad-2)}"}],"children":[{"tag":"View","name":"_bg","attrs":[{"name":"x","value":{"kind":"value","value":2}},{"name":"y","value":{"kind":"value","value":2}},{"name":"width","value":{"kind":"code","src":" parent.width - 4 ","deps":["parent.width"],"expr":"L0 K4 -"}},{"name":"height","value":{"kind":"code","src":" parent.height - 4 ","deps":["parent.height"],"expr":"L0 K4 -"}},{"name":"cornerRadius","value":{"kind":"code","src":" Math.max(0, (parent.parent)._rad - 2) "}},{"name":"fill","value":{"kind":"code","src":" parent.on ? null : this.stateFill ","deps":["parent.on","this.stateFill"],"expr":"L0 N L1 ?"}}],"decls":[{"name":"stateFill","type":"Color?","def":{"kind":"code","src":" parent.pressed ? this.$provided(\"theme\").controlPressed : parent.hovered ? this.$provided(\"theme\").controlHovered : null ","$nullsUndefined":true,"deps":["parent.pressed","this.$provided(\"theme\")","parent.hovered"]}}]},{"tag":"TextLabel","name":"_t","attrs":[{"name":"wrap","value":{"kind":"value","value":false}},{"name":"maxLines","value":{"kind":"value","value":1}},{"name":"fontSize","value":{"kind":"code","src":" this.$provided(\"theme\").segmentedFontSize ","deps":["this.$provided(\"theme\")"]}},{"name":"fontWeight","value":{"kind":"value","value":"medium"}},{"name":"x","value":{"kind":"code","src":" (parent.parent)._inset ?? 0 "}},{"name":"width","value":{"kind":"code","src":" Math.max(0, parent.width - 2 * ((parent.parent)._inset ?? 0)) "}},{"name":"textAlign","value":{"kind":"value","value":"center"}},{"name":"visible","value":{"kind":"code","src":" this.$data([\"label\"]) != null && this.$data([\"icon\"]) == null ","deps":[":label",":icon"],"expr":"L0 N ! L1 N = L0 N ! ?"}},{"name":"textColor","value":{"kind":"code","src":" parent.ink ","deps":["parent.ink"],"expr":"L0"}},{"name":"text","value":{"kind":"code","src":" \"\" + (this.$data([\"label\"]) ?? \"\") ","deps":[":label"]}}]},{"tag":"IconHost","name":"_ico","attrs":[{"name":"kind","value":{"kind":"code","src":" \"\" + (this.$data([\"icon\"]) ?? \"\") ","deps":[":icon"]}},{"name":"ink","value":{"kind":"code","src":" parent.ink ","deps":["parent.ink"],"expr":"L0"}},{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}}]}]}},{"name":"Slider","base":"ValueControl","body":{"tag":"Slider","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"slider"}},{"name":"accessibilityLabel","value":{"kind":"code","src":" this.$provided(\"fieldLabel\", \"\") ","deps":["this.$provided(\"fieldLabel\")"]}},{"name":"accessibilityValue","value":{"kind":"code","src":" this.shown ","$nullsUndefined":true,"deps":["this.shown"],"expr":"L0"}},{"name":"accessibilityMin","value":{"kind":"code","src":" this.min ","$nullsUndefined":true,"deps":["this.min"],"expr":"L0"}},{"name":"accessibilityMax","value":{"kind":"code","src":" this.max ","$nullsUndefined":true,"deps":["this.max"],"expr":"L0"}},{"name":"accessibilityStep","value":{"kind":"code","src":" this.step ","$nullsUndefined":true,"deps":["this.step"],"expr":"L0"}},{"name":"width","value":{"kind":"value","value":220}},{"name":"height","value":{"kind":"value","value":28}},{"name":"fieldValue","value":{"kind":"code","src":" this.value ","deps":["this.value"],"expr":"L0"}},{"name":"opacity","value":{"kind":"code","src":" this.disabled ? (this.$provided(\"theme\").disabledOpacity) : 1 ","deps":["this.disabled","this.$provided(\"theme\")"]}}],"decls":[{"name":"value","type":"number","def":{"kind":"value","value":0}},{"name":"min","type":"number","def":{"kind":"value","value":0}},{"name":"max","type":"number","def":{"kind":"value","value":100}},{"name":"step","type":"number","def":{"kind":"value","value":1}},{"name":"frac","type":"number","def":{"kind":"code","src":" Math.max(0, Math.min(1, (this.shown - this.min) / ((this.max - this.min) || 1))) ","deps":["this.shown","this.min","this.max"],"expr":"K0 K1 L0 L1 - L2 L1 - L2 L1 - K1 ? / m M"}},{"name":"_v0","type":"number","def":{"kind":"value","value":0}},{"name":"dragging","type":"boolean","def":{"kind":"value","value":false}}],"methods":[{"name":"focusShape","body":"return{x:this._thumb.x,y:this._thumb.y,w:this._thumb.width,h:this._thumb.height,rad:this._thumb.width/2}"},{"name":"commit","params":[{"name":"v","type":"number"}],"body":"this.value=v"},{"name":"quant","params":[{"name":"v","type":"number"}],"returns":"number","returnsNullable":false,"body":"const q=Math.round((v-this.min)/this.step)*this.step+this.min;return Math.max(this.min,Math.min(this.max,q))"},{"name":"onPointerDown","params":[{"name":"e","type":"PointerEvent"}],"body":"if(this.disabled)return;this.dragging=true;this.focusVisible=false;Focus.focus(this);this._v0=this.quant(this.min+(this.max-this.min)*((e.x-9)/(this.width-18)));this.beginEdit();this.edit(this._v0)"},{"name":"onPointerUp","body":"if(this.dragging){this.dragging=false;this.endEdit()}"},{"name":"onDrag","params":[{"name":"e","type":"PointerEvent"}],"body":"if(this.dragging)this.edit(this.quant(this._v0+e.deltaX/(this.width-18)*(this.max-this.min)))"},{"name":"accessibilityIncrement","body":"if(!this.disabled)this.edit(this.quant(this.shown+this.step))"},{"name":"accessibilityDecrement","body":"if(!this.disabled)this.edit(this.quant(this.shown-this.step))"},{"name":"onKeyDown","params":[{"name":"e","type":"KeyEvent"}],"body":"const page=Math.max(this.step,(this.max-this.min)/10);if(this.disabled||e.key!=\"Home\"&&e.key!=\"End\"&&e.key!=\"PageUp\"&&e.key!=\"PageDown\"){$base.onKeyDown(e);return}this.edit(this.quant(e.key==\"Home\"?this.min:e.key==\"End\"?this.max:this.shown+(e.key==\"PageUp\"?page:-page)))","usesSuper":true},{"name":"barStyle","body":"return this.$provided(\"theme\").sliderHandleStyle==\"bar\""},{"name":"dotStyle","body":"return this.$provided(\"theme\").sliderHandleStyle==\"dot\""}],"children":[{"tag":"View","name":"_track","attrs":[{"name":"height","value":{"kind":"code","src":" this.$provided(\"theme\").sliderTrackHeight ","deps":["this.$provided(\"theme\")"]}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"cornerRadius","value":{"kind":"code","src":" this.height / 2 ","deps":["this.height"],"expr":"L0 K2 /"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").trackFill ?? this.$provided(\"theme\").control ","deps":["this.$provided(\"theme\")"]}},{"name":"x","value":{"kind":"code","src":" classroot.barStyle() ? classroot._thumb.x + classroot._thumb.width + 5 : 0 ","deps":["classroot._thumb.x","classroot._thumb.width","classroot.$provided(\"theme\")"]}},{"name":"width","value":{"kind":"code","src":" classroot.barStyle() ? Math.max(0, classroot.width - this.x) : classroot.width ","deps":["classroot.width","this.x","classroot.$provided(\"theme\")"]}}]},{"tag":"View","name":"_bar","attrs":[{"name":"height","value":{"kind":"code","src":" classroot._track.height ","deps":["classroot._track.height"],"expr":"L0"}},{"name":"y","value":{"kind":"code","src":" classroot._track.y ","deps":["classroot._track.y"],"expr":"L0"}},{"name":"cornerRadius","value":{"kind":"code","src":" this.height / 2 ","deps":["this.height"],"expr":"L0 K2 /"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").accent ","deps":["this.$provided(\"theme\")"]}},{"name":"width","value":{"kind":"code","src":" classroot.barStyle() ? Math.max(0, classroot._thumb.x - 5) : 9 + (classroot.width - 18) * classroot.frac ","deps":["classroot._thumb.x","classroot.width","classroot.frac","classroot.$provided(\"theme\")"]}}]},{"tag":"View","name":"_thumb","attrs":[{"name":"width","value":{"kind":"code","src":" classroot.barStyle() ? 5 : classroot.dotStyle() ? 20 : 18 ","deps":["classroot.$provided(\"theme\")"]}},{"name":"height","value":{"kind":"code","src":" classroot.barStyle() ? 24 : classroot.dotStyle() ? 20 : 18 ","deps":["classroot.$provided(\"theme\")"]}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"cornerRadius","value":{"kind":"code","src":" this.width / 2 ","deps":["this.width"],"expr":"L0 K2 /"}},{"name":"x","value":{"kind":"code","src":"classroot.width-18)*classroot.frac+(classroot.barStyle()?6:classroot.dotStyle()?-1:0","deps":["classroot.width","classroot.frac","classroot.$provided(\"theme\")"]}},{"name":"fill","value":{"kind":"code","src":" classroot.barStyle() ? this.$provided(\"theme\").accent : (this.$provided(\"theme\").sliderThumbFill ?? this.$provided(\"theme\").surface) ","deps":["this.$provided(\"theme\")","classroot.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" classroot.barStyle() ? Stroke(0, this.$provided(\"theme\").accent) : Stroke(1, classroot.hovered || classroot.pressed || classroot.dragging ? this.$provided(\"theme\").accent : this.$provided(\"theme\").line) ","deps":["this.$provided(\"theme\")","classroot.hovered","classroot.pressed","classroot.dragging","classroot.$provided(\"theme\")"]}}],"children":[{"tag":"View","name":"dot","attrs":[{"name":"visible","value":{"kind":"code","src":" classroot.dotStyle() ","deps":["classroot.$provided(\"theme\")"]}},{"name":"width","value":{"kind":"code","src":" classroot.hovered || classroot.pressed || classroot.dragging ? 14 : 12 ","deps":["classroot.hovered","classroot.pressed","classroot.dragging"],"expr":"L0 L1 | L2 | K14 K12 ?"}},{"name":"height","value":{"kind":"code","src":" this.width ","deps":["this.width"],"expr":"L0"}},{"name":"cornerRadius","value":{"kind":"code","src":" this.width / 2 ","deps":["this.width"],"expr":"L0 K2 /"}},{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").accent ","deps":["this.$provided(\"theme\")"]}}]}]}]}},{"name":"Button","base":"Control","body":{"tag":"Button","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"button"}},{"name":"height","value":{"kind":"code","src":" this.$root.touchFirst ? Math.max(44, this.$provided(\"theme\").buttonHeight) : this.$provided(\"theme\").buttonHeight ","deps":["this.$root.touchFirst","this.$provided(\"theme\")"]}},{"name":"cornerRadius","value":{"kind":"code","src":" this.$provided(\"theme\").buttonCornerRadius != null ? Math.min(this.$provided(\"theme\").buttonCornerRadius, this.height / 2) : this.$provided(\"theme\").controlCornerRadius ","deps":["this.$provided(\"theme\")","this.height"]}},{"name":"iconSize","value":{"kind":"value","value":18},"route":"provision"},{"name":"textColor","value":{"kind":"code","src":" this.ink ","deps":["this.ink"],"expr":"L0"},"route":"provision"},{"name":"width","value":{"kind":"code","src":" this._natural + this._sides ","deps":["this._natural","this._sides"],"expr":"L0 L1 +"}},{"name":"opacity","value":{"kind":"code","src":" this.disabled ? (this.$provided(\"theme\").disabledOpacity) : 1 ","deps":["this.disabled","this.$provided(\"theme\")"]}},{"name":"fill","value":{"kind":"code","src":" this.primary ? this._primaryFill : this.menuOpen ? this.$provided(\"theme\").controlSelected : this._plainFill ","deps":["this.primary","this._primaryFill","this.menuOpen","this.$provided(\"theme\")","this._plainFill"]}},{"name":"stroke","value":{"kind":"code","src":" !this.primary && this.$provided(\"theme\").buttonStrokeColor != null ? Stroke(1, this.$provided(\"theme\").buttonStrokeColor) : null ","deps":["this.primary","this.$provided(\"theme\")"]}}],"decls":[{"name":"baseline","type":"number","def":{"kind":"code","src":" this._run.y + this._run.cap.y + this._run.cap.baseline ","deps":["this._run.y","this._run.cap.y","this._run.cap.baseline"],"expr":"L0 L1 + L2 +"}},{"name":"label","type":"string","def":{"kind":"value","value":""}},{"name":"primary","type":"boolean","def":{"kind":"value","value":false}},{"name":"gap","type":"number","def":{"kind":"value","value":8}},{"name":"padH","type":"number","def":{"kind":"value","value":16}},{"name":"ink","type":"Color","def":{"kind":"code","src":" this.primary ? this.$provided(\"theme\").accentTextColor : this.$provided(\"theme\").text ","deps":["this.primary","this.$provided(\"theme\")"]}},{"name":"_natural","type":"number","def":{"kind":"code","src":" this._run.contentWidth ","deps":["this._run.contentWidth"],"expr":"L0"}},{"name":"_sides","type":"number","def":{"kind":"code","src":" this.padH * 2 + (typeof this.padding == \"number\"\n        ? 2 * Math.max(0, this.padding)\n        : Math.max(0, this.padding[1]) + Math.max(0, this.padding[3])) ","deps":["this.padH","this.padding","this.padding[1]","this.padding[3]"]}},{"name":"_primaryFill","type":"Color","def":{"kind":"code","src":" this.pressed || this.menuOpen ? this.$provided(\"theme\").accentPressed : this.hovered ? this.$provided(\"theme\").accentHovered : this.$provided(\"theme\").accent ","deps":["this.pressed","this.menuOpen","this.$provided(\"theme\")","this.hovered"]}},{"name":"_plainFill","type":"Color","def":{"kind":"code","src":" this.pressed ? this.$provided(\"theme\").controlPressed : this.hovered ? this.$provided(\"theme\").controlHovered : this.$provided(\"theme\").control ","deps":["this.pressed","this.$provided(\"theme\")","this.hovered"]}}],"methods":[{"name":"onClick","body":"if(this.command!=\"\")Commands.run(this.command)"},{"name":"press","body":"this.flashPress();if(this.menu!=null)this.openMenu();this.onClick()"}],"children":[{"tag":"View","name":"_run","attrs":[{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"width","value":{"kind":"code","src":" Math.min(classroot._natural, Math.max(0, classroot.width - classroot._sides)) ","deps":["classroot._natural","classroot.width","classroot._sides"],"expr":"L0 K0 L1 L2 - M m"}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"code","src":" classroot.gap ","deps":["classroot.gap"],"expr":"L0"}}],"classSlot":"Layout"},{"tag":"IconHost","name":"ico","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"kind","value":{"kind":"code","src":" classroot.iconLeft ","deps":["classroot.iconLeft"],"expr":"L0"}},{"name":"ink","value":{"kind":"code","src":" classroot.ink ","deps":["classroot.ink"],"expr":"L0"}}]},{"tag":"TextLabel","name":"cap","attrs":[{"name":"maxLines","value":{"kind":"value","value":1}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"shrinks","value":{"kind":"value","value":true}},{"name":"visible","value":{"kind":"code","src":" classroot.label != \"\" ","deps":["classroot.label"]}},{"name":"text","value":{"kind":"code","src":" classroot.label ","deps":["classroot.label"],"expr":"L0"}}]},{"tag":"IconHost","name":"trail","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"kind","value":{"kind":"code","src":" classroot._rightIcon ","deps":["classroot._rightIcon"],"expr":"L0"}},{"name":"ink","value":{"kind":"code","src":" classroot.ink ","deps":["classroot.ink"],"expr":"L0"}}]}]}]}},{"name":"ChevronIcon","base":"Icon","body":{"tag":"ChevronIcon","decls":[{"name":"dir","type":"string","def":{"kind":"value","value":"down"}},{"name":"angle","type":"number","def":{"kind":"code","src":" ({ up: Math.PI, left: Math.PI / 2, right: -Math.PI / 2 })[classroot.dir] ?? 0 ","deps":["classroot.dir"]}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.lineJoin=\"round\";d.save();d.translate(8,8);d.rotate(this.angle);d.beginPath();d.moveTo(-3.5,-1.75);d.lineTo(0,1.75);d.lineTo(3.5,-1.75);d.stroke();d.restore()"}]}},{"name":"ArrowIcon","base":"Icon","body":{"tag":"ArrowIcon","decls":[{"name":"dir","type":"string","def":{"kind":"value","value":"up"}},{"name":"angle","type":"number","def":{"kind":"code","src":" ({ down: Math.PI, left: -Math.PI / 2, right: Math.PI / 2 })[classroot.dir] ?? 0 ","deps":["classroot.dir"]}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.lineJoin=\"round\";d.save();d.translate(8,8);d.rotate(this.angle);d.beginPath();d.moveTo(0,5.2);d.lineTo(0,-5.2);d.moveTo(-3.6,-1.6);d.lineTo(0,-5.2);d.lineTo(3.6,-1.6);d.stroke();d.restore()"}]}},{"name":"CheckIcon","base":"Icon","body":{"tag":"CheckIcon","methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.lineJoin=\"round\";d.beginPath();d.moveTo(3,8.5);d.lineTo(6.5,12);d.lineTo(13,4.5);d.stroke()"}]}},{"name":"CloseIcon","base":"Icon","body":{"tag":"CloseIcon","attrs":[{"name":"accessibilityLabel","value":{"kind":"value","value":"Close"}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.beginPath();d.moveTo(4.5,4.5);d.lineTo(11.5,11.5);d.moveTo(11.5,4.5);d.lineTo(4.5,11.5);d.stroke()"}]}},{"name":"PlusIcon","base":"Icon","body":{"tag":"PlusIcon","attrs":[{"name":"accessibilityLabel","value":{"kind":"value","value":"Add"}}],"methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.beginPath();d.moveTo(8,3.5);d.lineTo(8,12.5);d.moveTo(3.5,8);d.lineTo(12.5,8);d.stroke()"}]}},{"name":"MinusIcon","base":"Icon","body":{"tag":"MinusIcon","methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.beginPath();d.moveTo(3.5,8);d.lineTo(12.5,8);d.stroke()"}]}},{"name":"LightbulbIcon","base":"Icon","body":{"tag":"LightbulbIcon","methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.fillStyle=this.ink;d.beginPath();d.moveTo(3.4,4.235);d.bezierCurveTo(3.4,6.876,4.982,7.529,5.422,12.115);d.bezierCurveTo(5.449,12.363,5.587,12.521,5.848,12.521);d.lineTo(10.152,12.521);d.bezierCurveTo(10.42,12.521,10.558,12.363,10.585,12.115);d.bezierCurveTo(11.025,7.529,12.6,6.876,12.6,4.235);d.bezierCurveTo(12.6,1.863,10.572,0,8,0);d.bezierCurveTo(5.428,0,3.4,1.863,3.4,4.235);d.closePath();d.moveTo(4.438,4.235);d.bezierCurveTo(4.438,2.379,6.068,1.038,8,1.038);d.bezierCurveTo(9.932,1.038,11.562,2.379,11.562,4.235);d.bezierCurveTo(11.562,6.209,10.255,6.676,9.636,11.483);d.lineTo(6.37,11.483);d.bezierCurveTo(5.745,6.676,4.438,6.209,4.438,4.235);d.closePath();d.moveTo(5.827,14.006);d.lineTo(10.18,14.006);d.bezierCurveTo(10.407,14.006,10.578,13.827,10.578,13.6);d.bezierCurveTo(10.578,13.38,10.407,13.202,10.18,13.202);d.lineTo(5.827,13.202);d.bezierCurveTo(5.6,13.202,5.422,13.38,5.422,13.6);d.bezierCurveTo(5.422,13.827,5.6,14.006,5.827,14.006);d.closePath();d.moveTo(8,16);d.bezierCurveTo(9.066,16,9.953,15.477,10.021,14.687);d.lineTo(5.985,14.687);d.bezierCurveTo(6.034,15.477,6.927,16,8,16);d.closePath();d.fill()"}]}},{"name":"OverlayStrata","base":"View","body":{"tag":"OverlayStrata","attrs":[{"name":"ignoreLayout","value":{"kind":"value","value":true}},{"name":"ignoreScroll","value":{"kind":"value","value":true}},{"name":"width","value":{"kind":"code","src":" this.parent == this.$root && this.$root.hostWidth > 0 ? Math.min(this.$root.width, this.$root.hostWidth) : (this.parent).width ","deps":["this.parent","this.$root.hostWidth","this.$root.width","this.parent.width"],"expr":"L0 L%this.$root = L1 K0 > & L2 L1 m L3 ?"}},{"name":"height","value":{"kind":"code","src":" this.parent == this.$root && this.$root.hostHeight > 0 ? Math.min(this.$root.height, this.$root.hostHeight) : (this.parent).height ","deps":["this.parent","this.$root.hostHeight","this.$root.height","this.parent.height"],"expr":"L0 L%this.$root = L1 K0 > & L2 L1 m L3 ?"}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}}],"decls":[{"name":"_isOverlayStrata","type":"boolean","def":{"kind":"value","value":true}},{"name":"stack","type":"array","def":{"kind":"list","items":[]},"route":"list"},{"name":"handled","type":"object","def":{"kind":"value","value":null}}],"methods":[{"name":"opened","params":[{"name":"v","type":"View"}],"body":"this.stack=this.stack.filter(s=>s!=v).concat([v])"},{"name":"closedIt","params":[{"name":"v","type":"View"}],"body":"this.stack=this.stack.filter(s=>s!=v)"},{"name":"top","returns":"View","returnsNullable":true,"body":"const c=Keyboard._claimant();return this.stack.indexOf(c)>=0?c:null"}],"children":[{"tag":"View","name":"overlays","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}}]},{"tag":"View","name":"notice","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}}]}]}},{"name":"FocusRing","base":"View","body":{"tag":"FocusRing","attrs":[{"name":"opacity","value":{"kind":"value","value":0}},{"name":"ignoreLayout","value":{"kind":"value","value":true}},{"name":"visible","value":{"kind":"code","src":" this.opacity > 0.02 && (!this.overlayUp || this._focusInOverlay) ","deps":["this.opacity","this.overlayUp","this._focusInOverlay"],"expr":"L0 K0.02 > L1 n L1 n L2 ? L0 K0.02 > ?"}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"selectable","value":{"kind":"value","value":false},"route":"provision"}],"decls":[{"name":"overlayUp","type":"boolean","def":{"kind":"value","value":false}},{"name":"_focusInOverlay","type":"boolean","def":{"kind":"value","value":false}},{"name":"_tx","type":"number","def":{"kind":"value","value":0}},{"name":"_ty","type":"number","def":{"kind":"value","value":0}},{"name":"_tw","type":"number","def":{"kind":"value","value":0}},{"name":"_th","type":"number","def":{"kind":"value","value":0}},{"name":"_trad","type":"number","def":{"kind":"value","value":8}},{"name":"_trot","type":"number","def":{"kind":"value","value":0}},{"name":"_rad","type":"number","def":{"kind":"value","value":8}},{"name":"shown","type":"boolean","def":{"kind":"value","value":false}},{"name":"placed","type":"boolean","def":{"kind":"value","value":false}},{"name":"_theme","type":"any","def":{"kind":"value","value":null}},{"name":"idle","type":"boolean","def":{"kind":"value","value":false}},{"name":"_gen","type":"number","def":{"kind":"value","value":0}}],"methods":[{"name":"ringTheme","returns":"any","returnsNullable":false,"body":"return this._theme??this.$provided(\"theme\")"},{"name":"ringRole","body":"const r=this.$provided(\"theme\").focusRingStyle;return r==false?\"off\":r==true||r==null?\"both\":r"},{"name":"restRole","body":"const r=this.ringRole();return r==\"both\"||r==\"rest\""},{"name":"travelRole","body":"const r=this.ringRole();return r==\"both\"||r==\"travel\""},{"name":"snapTo","body":"this.x=this._tx;this.y=this._ty;this.width=this._tw;this.height=this._th;this._rad=this._trad;this.rotation=this._trot"},{"name":"_restack","params":[{"name":"v","type":"View"}],"body":"if(classroot.paintsIn!=null)return;let top=null;let pinned=false;for(let n=v;n!=null&&n!=this.$root;n=n.paintsIn!=null?n.paintsIn:n.parent){if(n.ignoreScroll)pinned=true;top=n}let chrome=null;if(!pinned&&!this.overlayUp&&top!=null){let after=false;for(const k of this.$root.childViews){if(k==top){after=true;continue}if(after&&k!=classroot&&k.ignoreScroll&&k.visible&&k.pointerEvents!=\"none\"&&k.height<this.$root.height/2){chrome=k;break}}}classroot.raise(chrome)"},{"name":"_noteOverlayFocus","body":"const c=Keyboard._claimant();const f=Focus.getFocus();let n=f;while(n!=null&&n!=c)n=n.parent;this._focusInOverlay=c!=null&&n==c&&f!=c"},{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"const Q=Math.PI/2;const dist=Math.abs(this.x-this._tx)+Math.abs(this.y-this._ty)+Math.abs(this.width-this._tw)+Math.abs(this.height-this._th);const lw=this.$provided(\"theme\").focusRingWidth;let L=0,T=0,R=this.width,B=this.height;if(Math.abs(this.rotation)<.01){const sc=classroot.paintsIn!=null?classroot.paintsIn:this.$root;const m=lw/2;L=Math.max(0,Math.min(sc.scrollX+m,this._tx)-this.x);T=Math.max(0,Math.min(sc.scrollY+m,this._ty)-this.y);R=Math.min(this.width,Math.max(sc.scrollX+sc.width-m,this._tx+this._tw)-this.x);B=Math.min(this.height,Math.max(sc.scrollY+sc.height-m,this._ty+this._th)-this.y);if(R-L<1||B-T<1)return}const w=R-L,h=B-T;const small=Math.min(w,h)<40;const cov=this.$provided(\"theme\").focusSights==true&&!small?Math.max(.22,1-dist/16):1;const iw=this.$provided(\"theme\").focusRingInnerWidth;const pass=(ins,lwp,color)=>{const r=Math.max(1,Math.min(this._rad-ins,Math.min(w,h)/2-ins));const ax=Math.max(0,((w-2*ins)/2-r)*cov);const ay=Math.max(0,((h-2*ins)/2-r)*cov);d.strokeStyle=color;d.lineWidth=lwp;d.beginPath();const x0=L+ins,y0=T+ins,x1=R-ins,y1=B-ins;d.moveTo(x0+r+ax,y0);d.lineTo(x0+r,y0);d.arc(x0+r,y0+r,r,-Q,Math.PI,true);d.lineTo(x0,y0+r+ay);d.moveTo(x1-r-ax,y0);d.lineTo(x1-r,y0);d.arc(x1-r,y0+r,r,-Q,0);d.lineTo(x1,y0+r+ay);d.moveTo(x1,y1-r-ay);d.lineTo(x1,y1-r);d.arc(x1-r,y1-r,r,0,Q);d.lineTo(x1-r-ax,y1);d.moveTo(x0+r+ax,y1);d.lineTo(x0+r,y1);d.arc(x0+r,y1-r,r,Q,Math.PI);d.lineTo(x0,y1-r-ay);d.stroke()};const t=this.ringTheme();pass(0,lw,t.focusRingColor??t.accent);if(iw>0)pass((lw+iw)/2,iw,t.focusRingInnerColor??t.surface)"}],"children":[{"tag":"KeyListener","name":"_claims","methods":[{"name":"onNavClaim","params":[{"name":"on","type":"boolean"}],"body":"classroot.overlayUp=on;classroot._noteOverlayFocus()"}]},{"tag":"Node","name":"_focus","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"g"}]},"route":"list"}],"decls":[{"name":"g","type":"object","def":{"kind":"code","src":" this.$root.focusGeometry ","deps":["this.$root.focusGeometry"],"expr":"L0"}}],"methods":[{"name":"onChange","body":"if(this.g==null)return;const g=this.g;if(g.root!=this.$root)return;const prev=this._lastTarget;const prevHome=this._lastHome;const hadHome=this._hasHome===true;const px=classroot.x;const py=classroot.y;classroot.paintsIn=g.scroller==this.$root?null:g.scroller;const homed=g.scroller!=this.$root;const gx=g.homeX;const gy=g.homeY;if(hadHome&&prevHome!=g.scroller){const toRoot=prevHome==null||prevHome==this.$root?{x:px,y:py}:(()=>{const o=prevHome.rootOrigin();return{x:o.x+px-prevHome.scrollX,y:o.y+py-prevHome.scrollY}})();const dst=!homed||g.scroller==this.$root?toRoot:(()=>{const o=g.scroller.rootOrigin();return{x:toRoot.x-o.x+g.scroller.scrollX,y:toRoot.y-o.y+g.scroller.scrollY}})();classroot.x=dst.x;classroot.y=dst.y}const gap=this.$provided(\"theme\").focusRingGap;const lw=this.$provided(\"theme\").focusRingWidth;const iw=this.$provided(\"theme\").focusRingInnerWidth;const outside=gap+iw+lw/2;const sc=homed&&g.scroller!=this.$root?g.scroller:null;const gw=g.homeW;const gh=g.homeH;const turned=g.homeRot!=0;const cutY=!turned&&sc!=null&&sc.scrolls!=\"y\"&&(gy-outside<0||gy+gh+outside>sc.height);const cutX=!turned&&sc!=null&&sc.scrolls!=\"x\"&&(gx-outside<0||gx+gw+outside>sc.width);const off=cutX||cutY?-(lw/2+1):outside;const ca=Math.cos(g.homeRot*Math.PI/180),sa=Math.sin(g.homeRot*Math.PI/180);const nx=gx-off*ca+off*sa,ny=gy-off*sa-off*ca;const moved=Math.abs(nx-classroot._tx)+Math.abs(ny-classroot._ty)+Math.abs(gw+2*off-classroot._tw)+Math.abs(gh+2*off-classroot._th)>.5;classroot._tx=nx;classroot._ty=ny;classroot._tw=gw+2*off;classroot._th=gh+2*off;classroot._trad=g.homeRad+off;classroot._trot=g.homeRot;classroot._theme=g.theme;this._lastTarget=g.view;this._lastHome=g.scroller;this._hasHome=true;if(classroot.shown)classroot._restack(g.view);if(prev==g.view&&moved)classroot.snapTo()"}]},{"tag":"Node","name":"_focusMove","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"at"},{"kind":"string","value":"byKeys"}]},"route":"list"}],"decls":[{"name":"at","type":"View?","def":{"kind":"code","src":" this.$root.focusedView ","$nullsUndefined":true,"deps":["this.$root.focusedView"],"expr":"L0"}},{"name":"byKeys","type":"boolean","def":{"kind":"code","src":" Focus.byKeyboard() "}}],"methods":[{"name":"onChange","body":"classroot._noteOverlayFocus();const v=this.at;if(v==null){classroot.shown=false;return}let n=v;for(;n!=null&&n.parent!=null;n=n.parent){}if(n!=this.$root){classroot.shown=false;return}if(v.focusable==\"quiet\"){classroot.shown=false;classroot.placed=false;return}if(!Focus.byKeyboard()){classroot.shown=false;classroot.snapTo();classroot.placed=true;return}if(classroot.ringRole()==\"off\"){classroot.shown=false;return}if(!classroot.placed||this.$provided(\"theme\").focusAnimate==false||!classroot.travelRole())classroot.snapTo();classroot.placed=true;classroot.shown=true;classroot._restack(v);if(classroot.restRole()){classroot.idle=false;return}classroot._gen=classroot._gen+1;const g2=classroot._gen;classroot.idle=false;this.afterDelay(1e3,()=>{if(classroot._gen==g2)classroot.idle=true})"}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"x"}},{"name":"to","value":{"kind":"code","src":" classroot._tx ","deps":["classroot._tx"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":16}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"y"}},{"name":"to","value":{"kind":"code","src":" classroot._ty ","deps":["classroot._ty"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":16}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"width"}},{"name":"to","value":{"kind":"code","src":" classroot._tw ","deps":["classroot._tw"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":18}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"height"}},{"name":"to","value":{"kind":"code","src":" classroot._th ","deps":["classroot._th"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":18}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"_rad"}},{"name":"to","value":{"kind":"code","src":" classroot._trad ","deps":["classroot._trad"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":20}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"rotation"}},{"name":"to","value":{"kind":"code","src":" classroot._trot ","deps":["classroot._trot"],"expr":"L0"}},{"name":"stiffness","value":{"kind":"value","value":220}},{"name":"damping","value":{"kind":"value","value":20}}]},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"opacity"}},{"name":"to","value":{"kind":"code","src":" classroot.shown && !classroot.idle ? 0.9 : 0 ","deps":["classroot.shown","classroot.idle"],"expr":"L0 L1 n & K0.9 K0 ?"}},{"name":"stiffness","value":{"kind":"value","value":90}},{"name":"damping","value":{"kind":"value","value":20}}]}]}},{"name":"Tooltip","base":"Floating","body":{"tag":"Tooltip","attrs":[{"name":"pressPolicy","value":{"kind":"value","value":"ignore"}},{"name":"scrollPolicy","value":{"kind":"value","value":"dismiss"}},{"name":"visible","value":{"kind":"code","src":" this.shown && this.label != \"\" ","deps":["this.shown","this.label"]}},{"name":"width","value":{"kind":"code","src":" this._t.width + 16 ","deps":["this._t.width"],"expr":"L0 K16 +"}},{"name":"height","value":{"kind":"code","src":" this._t.height + 10 ","deps":["this._t.height"],"expr":"L0 K10 +"}},{"name":"x","value":{"kind":"code","src":" Math.max(4, Math.min(this.$root.width - this.width - 4,\n            this.placement == \"pointer\" ? this._px + 10 : this._ex + (this._ew - this.width) / 2)) ","deps":["this.$root.width","this.width","this.placement","this._px","this._ex","this._ew"]}},{"name":"y","value":{"kind":"code","src":" this.placement == \"pointer\" ? this._pointerY : this.placement == \"above\" ? this._aboveY : this._belowY ","deps":["this.placement","this._pointerY","this._aboveY","this._belowY"]}},{"name":"cornerRadius","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipCornerRadius ","deps":["this.$provided(\"theme\")"]}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipFill ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipStrokeColor != null ? Stroke(1, this.$provided(\"theme\").tooltipStrokeColor) : null ","deps":["this.$provided(\"theme\")"]}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"selectable","value":{"kind":"value","value":false},"route":"provision"}],"decls":[{"name":"label","type":"string","def":{"kind":"value","value":""}},{"name":"_ex","type":"number","def":{"kind":"value","value":0}},{"name":"_ey","type":"number","def":{"kind":"value","value":0}},{"name":"_ew","type":"number","def":{"kind":"value","value":0}},{"name":"_eh","type":"number","def":{"kind":"value","value":0}},{"name":"_px","type":"number","def":{"kind":"value","value":0}},{"name":"_py","type":"number","def":{"kind":"value","value":0}},{"name":"placement","type":"string","def":{"kind":"code","src":" this.$provided(\"theme\").tooltipPlacement ","deps":["this.$provided(\"theme\")"]}},{"name":"_pointerY","type":"number","def":{"kind":"code","src":" this._py + 18 + this.height > this.$root.height ? this._py - this.height - 8 : this._py + 18 ","deps":["this._py","this.height","this.$root.height"],"expr":"L0 K18 + L1 + L2 > L0 L1 - K8 - L0 K18 + ?"}},{"name":"_aboveY","type":"number","def":{"kind":"code","src":" this._ey - this.height - 7 < 0 ? this._ey + this._eh + 7 : this._ey - this.height - 7 ","deps":["this._ey","this.height","this._eh"],"expr":"L0 L1 - K7 - K0 < L0 L2 + K7 + L0 L1 - K7 - ?"}},{"name":"_belowY","type":"number","def":{"kind":"code","src":" this._ey + this._eh + 7 + this.height > this.$root.height ? this._ey - this.height - 7 : this._ey + this._eh + 7 ","deps":["this._ey","this._eh","this.height","this.$root.height"],"expr":"L0 L1 + K7 + L2 + L3 > L0 L2 - K7 - L0 L1 + K7 + ?"}}],"children":[{"tag":"Node","name":"_tips","attrs":[{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"req"}]},"route":"list"}],"decls":[{"name":"req","type":"object","def":{"kind":"code","src":" this.$root.tooltipRequest ","deps":["this.$root.tooltipRequest"],"expr":"L0"}}],"methods":[{"name":"onChange","body":"const e=this.req;if(e==null||e.root!=this.$root){classroot.close();return}classroot._ex=e.x;classroot._ey=e.y;classroot._ew=e.w;classroot._eh=e.h;classroot._px=this.$root.pointerX;classroot._py=this.$root.pointerY;classroot.label=e.text;classroot.show()"}]},{"tag":"Text","name":"_t","attrs":[{"name":"x","value":{"kind":"value","value":8}},{"name":"y","value":{"kind":"value","value":5}},{"name":"fontSize","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipFontSize ","deps":["this.$provided(\"theme\")"]}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").tooltipTextColor ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" classroot.label ","deps":["classroot.label"],"expr":"L0"}}]}]}},{"name":"ShortcutsPanel","base":"View","body":{"tag":"ShortcutsPanel","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"width","value":{"kind":"value","value":340}},{"name":"ignoreLayout","value":{"kind":"value","value":true}},{"name":"visible","value":{"kind":"code","src":" this.shown ","deps":["this.shown"],"expr":"L0"}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":8},{"kind":"number","value":18},{"kind":"number","value":14},{"kind":"number","value":18}]},"route":"corners"},{"name":"cornerRadius","value":{"kind":"value","value":14}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").surface ","deps":["this.$provided(\"theme\")"]}},{"name":"shadow","value":{"kind":"value","value":{"fn":"shadow","dx":0,"dy":16,"blur":50,"color":4294967385}}},{"name":"accessibilityRole","value":{"kind":"value","value":"region"}},{"name":"accessibilityLabel","value":{"kind":"value","value":"Keyboard shortcuts"}},{"name":"datapath","value":{"kind":"code","src":" this._rows.value ","$nullsUndefined":true,"deps":["this._rows.value"],"expr":"L0"},"route":"cursor"}],"decls":[{"name":"active","type":"boolean","def":{"kind":"value","value":true}},{"name":"shown","type":"boolean","def":{"kind":"value","value":false}},{"name":"list","type":"array","def":{"kind":"list","items":[]},"route":"list"}],"methods":[{"name":"grouped","params":[{"name":"list","type":"array"}],"returns":"array","returnsNullable":false,"body":"const groups=[];for(const r of list)if(groups.indexOf(\"\"+(r.group??\"\"))<0)groups.push(\"\"+(r.group??\"\"));const out=[];for(const g of groups){out.push({kind:\"head\",text:g==\"\"?\"Shortcuts\":g});for(const r of list)if(\"\"+(r.group??\"\")==g)out.push({kind:\"line\",label:r.label,key:r.keyLabel??r.key,enabled:r.enabled})}return out"}],"children":[{"tag":"Dataset","name":"_rows","attrs":[{"name":"contents","value":{"kind":"code","src":" { rows: classroot.grouped(classroot.list) } ","deps":["classroot.list"]}}]},{"tag":"KeyListener","name":"_hold","methods":[{"name":"onCommandHeld","params":[{"name":"on","type":"boolean"}],"body":"const p=classroot;if(on&&p.active){p.list=Keyboard.shortcutsInForce();p.shown=p.list.length>0}else p.shown=false"}]},{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}}],"classSlot":"Layout"},{"tag":"ShortcutsPanelRow","attrs":[{"name":"datapath","value":{"kind":"path","path":"rows","many":true},"route":"cursor"},{"name":"classFor","value":{"kind":"code","src":" this.$data([\"kind\"]) == \"head\" ? \"ShortcutsPanelHead\" : \"ShortcutsPanelLine\" ","deps":[":kind"]}}]}]}},{"name":"ShortcutsPanelRow","base":"View","body":{"tag":"ShortcutsPanelRow","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}}]}},{"name":"ShortcutsPanelLine","base":"ShortcutsPanelRow","body":{"tag":"ShortcutsPanelLine","attrs":[{"name":"height","value":{"kind":"value","value":24}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":12}}],"classSlot":"Layout"},{"tag":"Text","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"shrinks","value":{"kind":"value","value":true}},{"name":"maxLines","value":{"kind":"value","value":1}},{"name":"fontSize","value":{"kind":"value","value":13}},{"name":"text","value":{"kind":"code","src":" \"\" + this.$data([\"label\"]) ","deps":[":label"]}},{"name":"textColor","value":{"kind":"code","src":" this.$data([\"enabled\"]) == false ? this.$provided(\"theme\").textFaint : this.$provided(\"theme\").text ","deps":[":enabled","this.$provided(\"theme\")"]}}]},{"tag":"Spacer"},{"tag":"Text","attrs":[{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"fontSize","value":{"kind":"value","value":13}},{"name":"text","value":{"kind":"code","src":" \"\" + this.$data([\"key\"]) ","deps":[":key"]}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}}]}]}},{"name":"ShortcutsPanelHead","base":"ShortcutsPanelRow","body":{"tag":"ShortcutsPanelHead","attrs":[{"name":"height","value":{"kind":"value","value":28}}],"children":[{"tag":"Text","attrs":[{"name":"y","value":{"kind":"code","src":" parent.height - this.height - 3 ","deps":["parent.height","this.height"],"expr":"L0 L1 - K3 -"}},{"name":"fontSize","value":{"kind":"value","value":11}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"text","value":{"kind":"code","src":" \"\" + this.$data([\"text\"]) ","deps":[":text"]}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}}]}]}},{"name":"Records","base":"Dataset","body":{"tag":"Records","attrs":[{"name":"schema","value":{"kind":"schema","shape":[{"name":"rows","array":true,"optional":false,"type":null,"ref":"Item"}]},"slotType":{"kind":"dataschema"}}],"methods":[{"name":"all","returns":"Item[]","returnsNullable":false,"body":"return this.read([\"rows\"])??[]"},{"name":"nextLabel","returns":"string","returnsNullable":true,"body":"return this.$root.labels.find(l=>!this.all().some(r=>r.label==l))??null"},{"name":"can","params":[{"name":"verb","type":"string"}],"returns":"boolean","returnsNullable":false,"body":"switch(verb){case\"insert\":return this.nextLabel()!=null;case\"remove\":return this.all().length>1;default:return this.all().length>=3}"},{"name":"run","params":[{"name":"verb","type":"string"}],"body":"const label=this.nextLabel();if(!this.can(verb))return;if(verb==\"insert\"&&label!=null){const id=this.all().reduce((m,r)=>Math.max(m,r.id),0)+1;this.insert([\"rows\"],0,{id,label,status:\"doing\"})}if(verb==\"remove\")this.removeAt([\"rows\"],0);if(verb==\"move\")this.move([\"rows\"],0,2)"}]}},{"name":"Listing","base":"Node","body":{"tag":"Listing","methods":[{"name":"lines","params":[{"name":"id","type":"string"}],"returns":"SourceLine[]","returnsNullable":false,"body":"const s=this.$root.steps.find(x=>x.id==id);if(s==null)return[];const seen=new Map;const out=[];for(const t of s.code){const filled=t.replace(/\\{\\{(\\w+)\\}\\}/g,(_m,k)=>this.slot(id,k));const whole=/^\\{\\{\\w+\\}\\}$/.test(t);for(const line of filled.split(\"\\n\")){const key=whole?line.replace(/,$/,\"\"):t;const n=(seen.get(key)??0)+1;seen.set(key,n);out.push({id:key+\"#\"+n,text:line})}}return out"},{"name":"slot","params":[{"name":"id","type":"string"},{"name":"key","type":"string"}],"returns":"string","returnsNullable":false,"body":"const c=this.$root.choices.value;const g=this.$root.director.geo(id);const drag=this.$root.steps.find(s=>s.id==id)?.drag??false;switch(key){case\"x\":return\"\"+((g.x??0)+(drag?c.dx:0));case\"y\":return\"\"+((g.y??0)+(drag?c.dy:0));case\"w\":{const k=this.$root.widthKnob(id);return\"\"+(k!=null?this.$root.widthOf(k.name):g.w??0)}case\"words\":return c.words;case\"first\":return this.child(c.swapped?\"b\":\"a\",g)+\",\";case\"second\":return this.child(c.swapped?\"a\":\"b\",g);case\"clipLine\":return this.clipLine(c.clip);case\"size\":return\"\"+c.size;case\"open\":return\"\"+c.open;case\"axis\":return c.axis;case\"align\":return c.align;case\"padding\":return\"\"+c.padding;case\"fill\":return c.fill==\"color\"?\"steelblue\":'{ Gradient.linear(\"135deg\", 0x3B82F6, 0x8B5CF6) }';case\"stroke\":return c.sides==\"all\"?\"{ Stroke(4, 0x3B82F6) }\":\"{ [null, null, Stroke(4, 0x3B82F6), null] }\";case\"corners\":return this.cornersText(c.corners);case\"dy\":return\"\"+Math.round(2+14*c.lift);case\"blur\":return\"\"+Math.round(4+36*c.lift);case\"presence\":return this.presenceText(c.presence);case\"done\":return c.done.toFixed(2);case\"turn\":return\"\"+c.turn;case\"px\":return c.pivot==\"middle\"?\"\"+(g.w??0)/2:\"0\";case\"py\":return c.pivot==\"middle\"?\"\"+(g.h??0)/2:\"0\";case\"halfW\":return\"\"+(g.w??0)/2;case\"halfH\":return\"\"+(g.h??0)/2;case\"scaleBy\":return c.scaleBy.toFixed(1);case\"filter\":return this.filterText(c.filter);case\"frost\":return c.frost?\"{ VisualFilter.frost(14) }\":\"null\";case\"panelFill\":return this.$root.paint.panel;case\"boxFill\":return this.$root.paint.box;case\"label\":return c.label;case\"status\":return c.status;default:{const v=g[key]??this.$root.director.chipGeo[key];return v==null?\"\":\"\"+v}}"},{"name":"child","params":[{"name":"name","type":"string"},{"name":"g","type":"Geo"}],"returns":"string","returnsNullable":false,"body":"const a=name==\"a\";const box=a?[g.ax,g.ay,g.aw,g.ah]:[g.bx,g.by,g.bw,g.bh];return`    ${name}: View [ x = ${box[0]}, y = ${box[1]}, width = ${box[2]}, height = ${box[3]},\n        fill = ${a?\"steelblue\":\"teal\"} ]`"},{"name":"clipLine","params":[{"name":"m","type":"string"}],"returns":"string","returnsNullable":false,"body":"if(m==\"none\")return\"    // no clip: children paint past the edge\";if(m==\"box\")return\"    clip = true,\";return'    clip = \"'+this.$root.director.clipShape(360,280).split(\" L \").slice(0,3).join(\" L \")+' \\u2026\",'"},{"name":"cornersText","params":[{"name":"m","type":"string"}],"returns":"string","returnsNullable":false,"body":"if(m==\"four\")return\"[48, 0, 48, 0]\";return m==\"pill\"?\"80\":\"24\""},{"name":"presenceText","params":[{"name":"m","type":"string"}],"returns":"string","returnsNullable":false,"body":"switch(m){case\"faded\":return\"opacity = 0.25\";case\"clear\":return\"opacity = 0\";case\"hidden\":return\"visible = false\";default:return\"opacity = 1\"}"},{"name":"filterText","params":[{"name":"m","type":"string"}],"returns":"string","returnsNullable":false,"body":"switch(m){case\"blur\":return\"{ VisualFilter.blur(4) }\";case\"grayscale\":return\"{ VisualFilter.grayscale(1) }\";case\"hue\":return\"{ VisualFilter.hueRotate(120) }\";default:return\"null\"}"},{"name":"merged","params":[{"name":"prev","type":"SourceLine[]"},{"name":"cur","type":"SourceLine[]"},{"name":"before","type":"SourceLine[]"}],"returns":"CodeRow[]","returnsNullable":false,"body":"const has=new Set(cur.map(r=>r.id));const had=new Set(before.map(r=>r.id));const builds=cur.some(r=>had.has(r.id)&&/\\w/.test(r.text));const out=cur.map(r=>({id:r.id,text:r.text,gone:false,fresh:builds&&!had.has(r.id)}));let anchor=-1;prev.forEach(r=>{if(has.has(r.id)){anchor=out.findIndex(o=>o.id==r.id);return}anchor=anchor+1;out.splice(anchor,0,{id:r.id,text:r.text,gone:true,fresh:false})});return out"}]}},{"name":"CodeLine","base":"View","body":{"tag":"CodeLine","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"clip","value":{"kind":"value","value":true}},{"name":"height","value":{"kind":"value","value":0}},{"name":"opacity","value":{"kind":"value","value":0}},{"name":"visible","value":{"kind":"code","src":" this.height > 0.5 || !classroot.gone ","deps":["this.height","classroot.gone"],"expr":"L0 K0.5 > L0 K0.5 > L1 n ?"}}],"decls":[{"name":"gone","type":"boolean","def":{"kind":"code","src":" this.$data([\"gone\"]) ?? false ","deps":[":gone"],"expr":"L0 K0 Q"}},{"name":"fresh","type":"boolean","def":{"kind":"code","src":" this.$data([\"fresh\"]) ?? false ","deps":[":fresh"],"expr":"L0 K0 Q"}},{"name":"litT","type":"number","def":{"kind":"value","value":0}}],"children":[{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"height"}},{"name":"to","value":{"kind":"code","src":" classroot.gone ? 0 : 22 ","deps":["classroot.gone"],"expr":"L0 K0 K22 ?"}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"opacity"}},{"name":"to","value":{"kind":"code","src":" classroot.gone ? 0 : 1 ","deps":["classroot.gone"],"expr":"L0 K0 K1 ?"}}]},{"tag":"Glide","attrs":[{"name":"attribute","value":{"kind":"value","value":"litT"}},{"name":"to","value":{"kind":"code","src":" classroot.fresh && !classroot.gone ? 1 : 0 ","deps":["classroot.fresh","classroot.gone"],"expr":"L0 L1 n & K1 K0 ?"}}]},{"tag":"View","name":"lit","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").codeFreshFill ","deps":["this.$provided(\"theme\")"]}},{"name":"opacity","value":{"kind":"code","src":" classroot.litT ","deps":["classroot.litT"],"expr":"L0"}}]},{"tag":"View","name":"bar","attrs":[{"name":"width","value":{"kind":"value","value":3}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").noteInk ","deps":["this.$provided(\"theme\")"]}},{"name":"opacity","value":{"kind":"code","src":" classroot.litT ","deps":["classroot.litT"],"expr":"L0"}}]},{"tag":"HTMLText","attrs":[{"name":"x","value":{"kind":"value","value":16}},{"name":"y","value":{"kind":"value","value":4}},{"name":"fontSize","value":{"kind":"value","value":12}},{"name":"fontFamily","value":{"kind":"code","src":" this.$root.monoFace ","deps":["this.$root.monoFace"],"expr":"L0"}},{"name":"bodyColor","value":{"kind":"code","src":" this.$provided(\"theme\").codeTextColor ","deps":["this.$provided(\"theme\")"]}},{"name":"html","value":{"kind":"code","src":" colored(this.$data([\"text\"]) ?? \"\") ","deps":[":text"]}}]}]}},{"name":"ChoiceSegments","base":"View","body":{"tag":"ChoiceSegments","decls":[{"name":"choice","type":"string","def":{"kind":"code","src":" this.$data([\"name\"]) ?? \"\" ","deps":[":name"]}},{"name":"options","type":"Choice[]","def":{"kind":"code","src":" this.$data([\"items\"]) ?? [] ","deps":[":items"]}}],"children":[{"tag":"View","attrs":[{"name":"datapath","value":{"kind":"code","src":" this.$root.choices.value ","$nullsUndefined":true,"deps":["this.$root.choices.value"],"expr":"L0"},"route":"cursor"}],"decls":[{"name":"picked","type":"string","def":{"kind":"code","src":" \"\" + this.$data([classroot.choice]) ","deps":["classroot.choice",":"]}}],"methods":[{"name":"pick","params":[{"name":"v","type":"string"}],"body":"this.$cell([classroot.choice]).value=v"}],"children":[{"tag":"Segmented","attrs":[{"name":"segmentWidths","value":{"kind":"value","value":"proportional"}},{"name":"items","value":{"kind":"code","src":" classroot.options ","deps":["classroot.options"],"expr":"L0"}},{"name":"value","value":{"kind":"code","src":" parent.picked ","deps":["parent.picked"],"expr":"L0"}}],"methods":[{"name":"commit","params":[{"name":"v","type":"string"}],"body":"parent.pick(v)"}]}]}]}},{"name":"ChoiceSlider","base":"View","body":{"tag":"ChoiceSlider","decls":[{"name":"choice","type":"string","def":{"kind":"code","src":" this.$data([\"name\"]) ?? \"\" ","deps":[":name"]}},{"name":"min","type":"number","def":{"kind":"code","src":" this.$data([\"min\"]) ?? 0 ","deps":[":min"],"expr":"L0 K0 Q"}},{"name":"max","type":"number","def":{"kind":"code","src":" this.$data([\"max\"]) ?? 1 ","deps":[":max"],"expr":"L0 K1 Q"}},{"name":"step","type":"number","def":{"kind":"code","src":" this.$data([\"step\"]) ?? 0.1 ","deps":[":step"],"expr":"L0 K0.1 Q"}},{"name":"label","type":"string","def":{"kind":"code","src":" this.$data([\"label\"]) ?? \"\" ","deps":[":label"]}}],"children":[{"tag":"Slider","attrs":[{"name":"width","value":{"kind":"value","value":160}},{"name":"height","value":{"kind":"code","src":" this.$root.target ","deps":["this.$root.target"],"expr":"L0"}},{"name":"datapath","value":{"kind":"code","src":" this.$root.choices.value ","$nullsUndefined":true,"deps":["this.$root.choices.value"],"expr":"L0"},"route":"cursor"},{"name":"min","value":{"kind":"code","src":" parent.min ","deps":["parent.min"],"expr":"L0"}},{"name":"max","value":{"kind":"code","src":" parent.max ","deps":["parent.max"],"expr":"L0"}},{"name":"step","value":{"kind":"code","src":" parent.step ","deps":["parent.step"],"expr":"L0"}},{"name":"accessibilityLabel","value":{"kind":"code","src":" parent.label ","deps":["parent.label"],"expr":"L0"}},{"name":"value","value":{"kind":"code","src":" this.$data([classroot.choice]) ","deps":["classroot.choice",":"]},"shorthand":true,"place":"{ :@[(classroot.choice)] }"}],"methods":[{"name":"commit","params":[{"name":"v","type":"any"}],"body":"this.$cell([classroot.choice]).value=v"}]}]}},{"name":"ChoiceToggle","base":"View","body":{"tag":"ChoiceToggle","decls":[{"name":"choice","type":"string","def":{"kind":"code","src":" this.$data([\"name\"]) ?? \"\" ","deps":[":name"]}},{"name":"label","type":"string","def":{"kind":"code","src":" this.$data([\"label\"]) ?? \"\" ","deps":[":label"]}},{"name":"labelOn","type":"string","def":{"kind":"code","src":" this.$data([\"labelOn\"]) ?? this.$data([\"label\"]) ?? \"\" ","deps":[":labelOn",":label"]}}],"children":[{"tag":"Button","attrs":[{"name":"datapath","value":{"kind":"code","src":" this.$root.choices.value ","$nullsUndefined":true,"deps":["this.$root.choices.value"],"expr":"L0"},"route":"cursor"},{"name":"accessibilityPressed","value":{"kind":"code","src":" this.on ","$nullsUndefined":true,"deps":["this.on"],"expr":"L0"}},{"name":"label","value":{"kind":"code","src":" this.on ? classroot.labelOn : classroot.label ","deps":["this.on","classroot.labelOn","classroot.label"],"expr":"L0 L1 L2 ?"}}],"decls":[{"name":"on","type":"boolean","def":{"kind":"code","src":" this.$data([classroot.choice]) == true ","deps":["classroot.choice",":"]}}],"methods":[{"name":"onClick","body":"this.$cell([classroot.choice]).value=!this.on"}]}]}},{"name":"RecordVerb","base":"Button","body":{"tag":"RecordVerb","attrs":[{"name":"label","value":{"kind":"code","src":" this.$data([\"label\"]) ?? \"\" ","deps":[":label"]}},{"name":"disabled","value":{"kind":"code","src":" !this.$root.records.can(classroot.verb) "}}],"decls":[{"name":"verb","type":"string","def":{"kind":"code","src":" this.$data([\"name\"]) ?? \"\" ","deps":[":name"]}}],"methods":[{"name":"onClick","body":"this.$root.records.run(this.verb)"}]}},{"name":"ListIcon","base":"Icon","body":{"tag":"ListIcon","methods":[{"name":"draw","params":[{"name":"d","type":"DrawContext"}],"body":"d.scale(this.unit,this.unit);d.strokeStyle=this.ink;d.lineWidth=this.weight/this.unit;d.lineCap=\"round\";d.beginPath();for(const y of[4,8,12]){d.moveTo(2.5,y);d.lineTo(3,y);d.moveTo(6,y);d.lineTo(13.5,y)}d.stroke()"}]}},{"name":"IconButton","base":"Control","body":{"tag":"IconButton","attrs":[{"name":"width","value":{"kind":"code","src":" this.$root.target ","deps":["this.$root.target"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.$root.target ","deps":["this.$root.target"],"expr":"L0"}},{"name":"cornerRadius","value":{"kind":"value","value":8}},{"name":"accessibilityLabel","value":{"kind":"code","src":" this.tooltipLabel ","deps":["this.tooltipLabel"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" this.pressed ? this.$provided(\"theme\").quietFillPressed : this.hovered ? this.$provided(\"theme\").quietFillHovered : null ","deps":["this.pressed","this.$provided(\"theme\")","this.hovered"]}}],"decls":[{"name":"ink","type":"Color","def":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}}]}},{"name":"ContentsButton","base":"IconButton","body":{"tag":"ContentsButton","attrs":[{"name":"tooltipLabel","value":{"kind":"value","value":"Contents"}}],"children":[{"tag":"ListIcon","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"iconSize","value":{"kind":"value","value":16}},{"name":"ink","value":{"kind":"code","src":" classroot.ink ","deps":["classroot.ink"],"expr":"L0"}}]}]}},{"name":"BackLink","base":"Control","body":{"tag":"BackLink","attrs":[{"name":"height","value":{"kind":"code","src":" this.$root.touchFirst ? 44 : 40 ","deps":["this.$root.touchFirst"],"expr":"L0 K44 K40 ?"}},{"name":"cornerRadius","value":{"kind":"code","src":" this.height / 2 ","deps":["this.height"],"expr":"L0 K2 /"}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":0},{"kind":"number","value":18},{"kind":"number","value":0},{"kind":"number","value":14}]},"route":"corners"},{"name":"accessibilityLabel","value":{"kind":"code","src":" \"Back: \" + (this.$root.steps[this.$root.index - 1]?.title ?? \"\") "}},{"name":"tooltipLabel","value":{"kind":"code","src":" this.$root.steps[this.$root.index - 1]?.title ?? \"\" "}},{"name":"fill","value":{"kind":"code","src":" this.pressed ? this.$provided(\"theme\").quietFillPressed : this.hovered ? this.$provided(\"theme\").quietFillHovered : null ","deps":["this.pressed","this.$provided(\"theme\")","this.hovered"]}}],"children":[{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" classroot.disabled ","deps":["classroot.disabled"],"expr":"L0"}},{"name":"opacity","value":{"kind":"value","value":0},"route":"override"}]},{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":6}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"ChevronIcon","attrs":[{"name":"dir","value":{"kind":"value","value":"left"}},{"name":"iconSize","value":{"kind":"value","value":16}},{"name":"ink","value":{"kind":"code","src":" this.$provided(\"theme\").accent ","deps":["this.$provided(\"theme\")"]}}]},{"tag":"Text","attrs":[{"name":"fontSize","value":{"kind":"value","value":14}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").accent ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"value","value":"Back"}}]}]}},{"name":"NextPill","base":"Control","body":{"tag":"NextPill","attrs":[{"name":"height","value":{"kind":"code","src":" this.$root.touchFirst ? 44 : 40 ","deps":["this.$root.touchFirst"],"expr":"L0 K44 K40 ?"}},{"name":"cornerRadius","value":{"kind":"code","src":" this.height / 2 ","deps":["this.height"],"expr":"L0 K2 /"}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":0},{"kind":"number","value":14},{"kind":"number","value":0},{"kind":"number","value":18}]},"route":"corners"},{"name":"accessibilityLabel","value":{"kind":"code","src":" \"Next: \" + classroot.title ","deps":["classroot.title"]}},{"name":"fill","value":{"kind":"code","src":" this.pressed ? this.$provided(\"theme\").accentPressed : this.hovered ? this.$provided(\"theme\").accentHovered : this.$provided(\"theme\").accent ","deps":["this.pressed","this.$provided(\"theme\")","this.hovered"]}}],"decls":[{"name":"title","type":"string","def":{"kind":"value","value":""}}],"children":[{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" classroot.disabled ","deps":["classroot.disabled"],"expr":"L0"}},{"name":"opacity","value":{"kind":"code","src":" this.$provided(\"theme\").disabledOpacity ","deps":["this.$provided(\"theme\")"]},"route":"override"}]},{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":6}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"Text","attrs":[{"name":"fontSize","value":{"kind":"value","value":14}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").accentTextColor ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$root.compact ? \"Next\" : \"Next: \" + classroot.title ","deps":["this.$root.compact","classroot.title"]}}]},{"tag":"ChevronIcon","attrs":[{"name":"dir","value":{"kind":"value","value":"right"}},{"name":"iconSize","value":{"kind":"value","value":16}},{"name":"ink","value":{"kind":"code","src":" this.$provided(\"theme\").accentTextColor ","deps":["this.$provided(\"theme\")"]}}]}]}},{"name":"Tick","base":"Control","body":{"tag":"Tick","attrs":[{"name":"flexes","value":{"kind":"value","value":true}},{"name":"height","value":{"kind":"value","value":24}},{"name":"focusable","value":{"kind":"value","value":false}},{"name":"disabled","value":{"kind":"code","src":" this.$root.touchFirst ","deps":["this.$root.touchFirst"],"expr":"L0"}},{"name":"link","value":{"kind":"code","src":" \"#\" + classroot.id ","deps":["classroot.id"]}},{"name":"tooltipLabel","value":{"kind":"code","src":" this.$data([\"title\"]) ?? \"\" ","deps":[":title"]}}],"decls":[{"name":"id","type":"string","def":{"kind":"code","src":" this.$data([\"id\"]) ?? \"\" ","deps":[":id"]}},{"name":"here","type":"boolean","def":{"kind":"code","src":" this.$root.stepId == classroot.id ","deps":["this.$root.stepId","classroot.id"],"expr":"L0 L1 ="}},{"name":"read","type":"boolean","def":{"kind":"code","src":" classroot.rowIndex < this.$root.index ","deps":["classroot.rowIndex","this.$root.index"],"expr":"L0 L1 <"}},{"name":"further","type":"boolean","def":{"kind":"code","src":" this.$data([\"core\"]) == null ","deps":[":core"],"expr":"L0 N ="}},{"name":"startsFurther","type":"boolean","def":{"kind":"code","src":" classroot.further && this.$root.steps[classroot.rowIndex - 1]?.core != null "}}],"children":[{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" classroot.startsFurther ","deps":["classroot.startsFurther"],"expr":"L0"}},{"name":"padding","value":{"kind":"value","value":[0,0,0,14]},"route":"override"}]},{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" classroot.further && !classroot.here ","deps":["classroot.further","classroot.here"],"expr":"L0 L1 n L0 ?"}},{"name":"opacity","value":{"kind":"value","value":0.6},"route":"override"}]},{"tag":"View","name":"bar","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"cornerRadius","value":{"kind":"value","value":2}},{"name":"height","value":{"kind":"code","src":" classroot.here ? 6 : classroot.hovered ? 5 : 3 ","deps":["classroot.here","classroot.hovered"],"expr":"L0 K6 L1 K5 K3 ? ?"}},{"name":"fill","value":{"kind":"code","src":" classroot.here ? this.$provided(\"theme\").accent : classroot.read ? this.$provided(\"theme\").tickVisitedFill : this.$provided(\"theme\").tickFill ","deps":["classroot.here","this.$provided(\"theme\")","classroot.read"]}}]}]}},{"name":"Progress","base":"View","body":{"tag":"Progress","attrs":[{"name":"datapath","value":{"kind":"code","src":" this.$root.route.value ","$nullsUndefined":true,"deps":["this.$root.route.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}},{"name":"spacing","value":{"kind":"value","value":2}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"View","name":"ticks","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"visible","value":{"kind":"code","src":" !this.$root.narrow ","deps":["this.$root.narrow"],"expr":"L0 n"}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":2}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"Tick","attrs":[{"name":"datapath","value":{"kind":"path","path":"steps","many":true},"route":"cursor"}]}]},{"tag":"Text","attrs":[{"name":"visible","value":{"kind":"code","src":" this.$root.wide ","deps":["this.$root.wide"],"expr":"L0"}},{"name":"fontSize","value":{"kind":"value","value":12}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textFaint ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$root.whereIs(this.$root.index) "}}]}]}},{"name":"RailStep","base":"View","body":{"tag":"RailStep","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}}],"decls":[{"name":"id","type":"string","def":{"kind":"code","src":" this.$data([\"id\"]) ?? \"\" ","deps":[":id"]}},{"name":"here","type":"boolean","def":{"kind":"code","src":" this.$root.stepId == classroot.id ","deps":["this.$root.stepId","classroot.id"],"expr":"L0 L1 ="}},{"name":"inCore","type":"boolean","def":{"kind":"code","src":" this.$data([\"core\"]) != null ","deps":[":core"],"expr":"L0 N !"}},{"name":"startsRoute","type":"boolean","def":{"kind":"code","src":" this.rowIndex == 0 || (!classroot.inCore && this.$root.steps[this.rowIndex - 1]?.core != null) "}},{"name":"startsPart","type":"boolean","def":{"kind":"code","src":" !classroot.inCore && (classroot.startsRoute || this.$root.steps[this.rowIndex - 1]?.part != this.$data([\"part\"])) "}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}}],"classSlot":"Layout"},{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" classroot.startsRoute ","deps":["classroot.startsRoute"],"expr":"L0"}}],"children":[{"tag":"Text","attrs":[{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":18},{"kind":"number","value":12},{"kind":"number","value":4},{"kind":"number","value":12}]},"route":"corners"},{"name":"fontSize","value":{"kind":"value","value":13}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"text","value":{"kind":"code","src":" classroot.inCore ? \"Declare in 10 minutes\" : \"Going further\" ","deps":["classroot.inCore"]}}]}],"existsOf":true},{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" classroot.startsPart ","deps":["classroot.startsPart"],"expr":"L0"}}],"children":[{"tag":"Text","attrs":[{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":10},{"kind":"number","value":12},{"kind":"number","value":6},{"kind":"number","value":12}]},"route":"corners"},{"name":"fontSize","value":{"kind":"value","value":11}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"letterSpacing","value":{"kind":"value","value":0.8}},{"name":"textTransform","value":{"kind":"value","value":"uppercase"}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textFaint ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$root.partName(this.$data([\"part\"]) ?? \"\") "}}]}],"existsOf":true},{"tag":"View","name":"row","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":32}},{"name":"cornerRadius","value":{"kind":"value","value":8}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":0},{"kind":"number","value":12},{"kind":"number","value":0},{"kind":"number","value":12}]},"route":"corners"},{"name":"link","value":{"kind":"code","src":" \"#\" + classroot.id ","deps":["classroot.id"]}},{"name":"fill","value":{"kind":"code","src":" this.hovered ? this.$provided(\"theme\").background : null ","deps":["this.hovered","this.$provided(\"theme\")"]}}],"methods":[{"name":"onClick","body":"this.$root.contentsOpen=false"}],"children":[{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" classroot.here ","deps":["classroot.here"],"expr":"L0"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").railCurrentFill ","deps":["this.$provided(\"theme\")"]},"route":"override"}]},{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":10}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"Text","attrs":[{"name":"width","value":{"kind":"value","value":18}},{"name":"fontSize","value":{"kind":"value","value":12}},{"name":"fontFamily","value":{"kind":"code","src":" this.$root.monoFace ","deps":["this.$root.monoFace"],"expr":"L0"}},{"name":"textAlign","value":{"kind":"value","value":"end"}},{"name":"textColor","value":{"kind":"code","src":" classroot.here ? this.$provided(\"theme\").railCurrentTextColor : this.$provided(\"theme\").textFaint ","deps":["classroot.here","this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" \"\" + (classroot.rowIndex + 1) ","deps":["classroot.rowIndex"]}}]},{"tag":"Text","attrs":[{"name":"flexes","value":{"kind":"value","value":true}},{"name":"fontSize","value":{"kind":"value","value":14}},{"name":"wrap","value":{"kind":"value","value":false}},{"name":"maxLines","value":{"kind":"value","value":1}},{"name":"fontWeight","value":{"kind":"code","src":" classroot.here ? \"semibold\" : \"regular\" ","deps":["classroot.here"]}},{"name":"textColor","value":{"kind":"code","src":" classroot.here ? this.$provided(\"theme\").railCurrentTextColor : this.$provided(\"theme\").text ","deps":["classroot.here","this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$data([\"title\"]) ?? \"\" ","deps":[":title"]}}]}]}]}},{"name":"Contents","base":"View","body":{"tag":"Contents","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"datapath","value":{"kind":"code","src":" this.$root.route.value ","$nullsUndefined":true,"deps":["this.$root.route.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}},{"name":"spacing","value":{"kind":"value","value":2}}],"classSlot":"Layout"},{"tag":"RailStep","attrs":[{"name":"datapath","value":{"kind":"path","path":"steps","many":true},"route":"cursor"}]}]}}],"shapes":[{"name":"Geo","fields":[{"name":"x","array":false,"optional":true,"type":"number"},{"name":"y","array":false,"optional":true,"type":"number"},{"name":"w","array":false,"optional":true,"type":"number"},{"name":"h","array":false,"optional":true,"type":"number"},{"name":"r","array":false,"optional":true,"type":"number"},{"name":"gap","array":false,"optional":true,"type":"number"},{"name":"ax","array":false,"optional":true,"type":"number"},{"name":"ay","array":false,"optional":true,"type":"number"},{"name":"aw","array":false,"optional":true,"type":"number"},{"name":"ah","array":false,"optional":true,"type":"number"},{"name":"bx","array":false,"optional":true,"type":"number"},{"name":"by","array":false,"optional":true,"type":"number"},{"name":"bw","array":false,"optional":true,"type":"number"},{"name":"bh","array":false,"optional":true,"type":"number"},{"name":"w0","array":false,"optional":true,"type":"number"},{"name":"w1","array":false,"optional":true,"type":"number"},{"name":"w2","array":false,"optional":true,"type":"number"},{"name":"inset","array":false,"optional":true,"type":"number"},{"name":"size","array":false,"optional":true,"type":"number"},{"name":"grow","array":false,"optional":true,"type":"number"},{"name":"pad","array":false,"optional":true,"type":"number"},{"name":"rowH","array":false,"optional":true,"type":"number"},{"name":"line","array":false,"optional":true,"type":"number"},{"name":"cell","array":false,"optional":true,"type":"number"}]},{"name":"ChipGeo","fields":[{"name":"chipH","array":false,"optional":false,"type":"number"},{"name":"chipR","array":false,"optional":false,"type":"number"},{"name":"padStart","array":false,"optional":false,"type":"number"},{"name":"padEnd","array":false,"optional":false,"type":"number"},{"name":"gap","array":false,"optional":false,"type":"number"},{"name":"dot","array":false,"optional":false,"type":"number"},{"name":"dotR","array":false,"optional":false,"type":"number"},{"name":"fontSize","array":false,"optional":false,"type":"number"}]},{"name":"Pose","fields":[{"name":"id","array":false,"optional":false,"type":"number"},{"name":"x","array":false,"optional":false,"type":"number"},{"name":"y","array":false,"optional":false,"type":"number"},{"name":"w","array":false,"optional":false,"type":"number"},{"name":"h","array":false,"optional":false,"type":"number"},{"name":"a","array":false,"optional":false,"type":"number"},{"name":"tone","array":false,"optional":false,"type":"number"},{"name":"chip","array":false,"optional":false,"type":"number"},{"name":"zoom","array":false,"optional":false,"type":"number"},{"name":"label","array":false,"optional":false,"type":"string"},{"name":"rc","array":true,"optional":false,"type":"number"},{"name":"grad","array":false,"optional":false,"type":"number"},{"name":"light","array":false,"optional":false,"type":"number"},{"name":"sw","array":false,"optional":false,"type":"number"},{"name":"sides","array":false,"optional":false,"type":"number"},{"name":"lift","array":false,"optional":false,"type":"number"},{"name":"rot","array":false,"optional":false,"type":"number"},{"name":"pivot","array":false,"optional":false,"type":"number"},{"name":"drawn","array":false,"optional":false,"type":"number"},{"name":"head","array":false,"optional":false,"type":"number"}]},{"name":"Frame","fields":[{"name":"x","array":false,"optional":false,"type":"number"},{"name":"y","array":false,"optional":false,"type":"number"},{"name":"w","array":false,"optional":false,"type":"number"},{"name":"h","array":false,"optional":false,"type":"number"},{"name":"a","array":false,"optional":false,"type":"number"},{"name":"solid","array":false,"optional":false,"type":"number"},{"name":"r","array":false,"optional":false,"type":"number"},{"name":"zoom","array":false,"optional":false,"type":"number"},{"name":"blur","array":false,"optional":false,"type":"number"},{"name":"gray","array":false,"optional":false,"type":"number"},{"name":"hue","array":false,"optional":false,"type":"number"}]},{"name":"Note","fields":[{"name":"id","array":false,"optional":false,"type":"string"},{"name":"kind","array":false,"optional":false,"type":"string","tokens":["label","tag","warn","code","dot","hdim","vdim","vdimr","frame","arrow","ray"]},{"name":"x","array":false,"optional":false,"type":"number"},{"name":"y","array":false,"optional":false,"type":"number"},{"name":"w","array":false,"optional":false,"type":"number"},{"name":"h","array":false,"optional":false,"type":"number"},{"name":"text","array":false,"optional":false,"type":"string"},{"name":"gone","array":false,"optional":true,"type":"boolean"}]},{"name":"Scene","fields":[{"name":"p","array":false,"optional":false,"type":null,"ref":"Frame"},{"name":"wordsA","array":false,"optional":false,"type":"number"},{"name":"k","array":true,"optional":false,"type":null,"ref":"Pose"},{"name":"glass","array":false,"optional":false,"type":"number"},{"name":"frost","array":false,"optional":false,"type":"number"},{"name":"notes","array":true,"optional":false,"type":null,"ref":"Note"}]},{"name":"Cast","fields":[{"name":"k","array":true,"optional":false,"type":null,"ref":"Pose"}]},{"name":"Part","fields":[{"name":"id","array":false,"optional":false,"type":"string"},{"name":"name","array":false,"optional":false,"type":"string"}]},{"name":"Choice","fields":[{"name":"id","array":false,"optional":false,"type":"string"},{"name":"label","array":false,"optional":false,"type":"string"}]},{"name":"Knob","fields":[{"name":"kind","array":false,"optional":false,"type":"string","tokens":["segmented","slider","toggle","verb"]},{"name":"name","array":false,"optional":false,"type":"string"},{"name":"label","array":false,"optional":false,"type":"string"},{"name":"labelOn","array":false,"optional":true,"type":"string"},{"name":"items","array":true,"optional":true,"type":null,"ref":"Choice"},{"name":"min","array":false,"optional":true,"type":"number"},{"name":"max","array":false,"optional":true,"type":"number"},{"name":"step","array":false,"optional":true,"type":"number"}]},{"name":"Step","fields":[{"name":"id","array":false,"optional":false,"type":"string"},{"name":"part","array":false,"optional":false,"type":"string"},{"name":"title","array":false,"optional":false,"type":"string"},{"name":"point","array":false,"optional":false,"type":"string"},{"name":"hint","array":false,"optional":false,"type":"string"},{"name":"code","array":true,"optional":false,"type":"string"},{"name":"geo","array":false,"optional":true,"type":null,"ref":"Geo"},{"name":"knobs","array":true,"optional":false,"type":null,"ref":"Knob"},{"name":"live","array":false,"optional":true,"type":"string","tokens":["press","toggle"]},{"name":"drag","array":false,"optional":true,"type":"boolean"},{"name":"core","array":false,"optional":true,"type":"number"}]},{"name":"Paint","fields":[{"name":"panel","array":false,"optional":false,"type":"string"},{"name":"box","array":false,"optional":false,"type":"string"}]},{"name":"Tour","fields":[{"name":"parts","array":true,"optional":false,"type":null,"ref":"Part"},{"name":"chip","array":false,"optional":false,"type":null,"ref":"ChipGeo"},{"name":"paint","array":false,"optional":false,"type":null,"fields":[{"name":"light","array":false,"optional":false,"type":null,"ref":"Paint"},{"name":"dark","array":false,"optional":false,"type":null,"ref":"Paint"}]},{"name":"steps","array":true,"optional":false,"type":null,"ref":"Step"}]},{"name":"Choices","fields":[{"name":"dx","array":false,"optional":false,"type":"number"},{"name":"dy","array":false,"optional":false,"type":"number"},{"name":"words","array":false,"optional":false,"type":"string"},{"name":"swapped","array":false,"optional":false,"type":"boolean"},{"name":"panelWidth","array":false,"optional":false,"type":"number"},{"name":"size","array":false,"optional":false,"type":"number"},{"name":"open","array":false,"optional":false,"type":"boolean"},{"name":"axis","array":false,"optional":false,"type":"string","tokens":["y","x"]},{"name":"align","array":false,"optional":false,"type":"string","tokens":["start","center","end"]},{"name":"rowWidth","array":false,"optional":false,"type":"number"},{"name":"padding","array":false,"optional":false,"type":"number"},{"name":"fill","array":false,"optional":false,"type":"string","tokens":["color","gradient"]},{"name":"sides","array":false,"optional":false,"type":"string","tokens":["all","bottom"]},{"name":"corners","array":false,"optional":false,"type":"string","tokens":["one","four","pill"]},{"name":"lift","array":false,"optional":false,"type":"number"},{"name":"presence","array":false,"optional":false,"type":"string","tokens":["shown","faded","clear","hidden"]},{"name":"done","array":false,"optional":false,"type":"number"},{"name":"clip","array":false,"optional":false,"type":"string","tokens":["none","box","shape"]},{"name":"scaleBy","array":false,"optional":false,"type":"number"},{"name":"turn","array":false,"optional":false,"type":"number"},{"name":"pivot","array":false,"optional":false,"type":"string","tokens":["middle","corner"]},{"name":"filter","array":false,"optional":false,"type":"string","tokens":["none","blur","grayscale","hue"]},{"name":"frost","array":false,"optional":false,"type":"boolean"},{"name":"label","array":false,"optional":false,"type":"string"},{"name":"status","array":false,"optional":false,"type":"string","tokens":["doing","done"]},{"name":"round","array":false,"optional":false,"type":"boolean"}]},{"name":"Item","fields":[{"name":"id","array":false,"optional":false,"type":"number"},{"name":"label","array":false,"optional":false,"type":"string"},{"name":"status","array":false,"optional":false,"type":"string","tokens":["doing","done"]}]},{"name":"SourceLine","fields":[{"name":"id","array":false,"optional":false,"type":"string"},{"name":"text","array":false,"optional":false,"type":"string"}]},{"name":"CodeRow","fields":[{"name":"id","array":false,"optional":false,"type":"string"},{"name":"text","array":false,"optional":false,"type":"string"},{"name":"gone","array":false,"optional":false,"type":"boolean"},{"name":"fresh","array":false,"optional":false,"type":"boolean"}]}],"themes":[{"name":"TourLight","body":{"tag":"TourLight","attrs":[{"name":"background","value":{"kind":"value","value":16053751}},{"name":"railFill","value":{"kind":"value","value":16777215}},{"name":"railStrokeColor","value":{"kind":"value","value":15132908}},{"name":"railCurrentFill","value":{"kind":"value","value":15659775}},{"name":"railCurrentTextColor","value":{"kind":"value","value":3821529}},{"name":"text","value":{"kind":"value","value":1909808}},{"name":"textMuted","value":{"kind":"value","value":6121075}},{"name":"textFaint","value":{"kind":"value","value":9081760}},{"name":"stageFill","value":{"kind":"value","value":16777215}},{"name":"stageStrokeColor","value":{"kind":"value","value":14935787}},{"name":"gridDotFill","value":{"kind":"value","value":14278116}},{"name":"containerStrokeColor","value":{"kind":"value","value":12173772}},{"name":"tones","value":{"kind":"value","value":[3900150,1357990,16096779,15485081,9133302,2278750]}},{"name":"chipFill","value":{"kind":"value","value":16777215}},{"name":"chipFillHovered","value":{"kind":"value","value":15659509}},{"name":"chipFillPressed","value":{"kind":"value","value":14476010}},{"name":"chipStrokeColor","value":{"kind":"value","value":13357787}},{"name":"chipTextColor","value":{"kind":"value","value":1909808}},{"name":"noteInk","value":{"kind":"value","value":8141549}},{"name":"noteTextColor","value":{"kind":"value","value":5972406}},{"name":"noteTagFill","value":{"kind":"value","value":15986431}},{"name":"noteWarnTextColor","value":{"kind":"value","value":11805464}},{"name":"noteWarnFill","value":{"kind":"value","value":16641258}},{"name":"glassFill","value":{"kind":"value","value":8589934438}},{"name":"glassStrokeColor","value":{"kind":"value","value":8589934512}},{"name":"cardFill","value":{"kind":"value","value":16777215}},{"name":"cardStrokeColor","value":{"kind":"value","value":14804459}},{"name":"hintTextColor","value":{"kind":"value","value":3821529}},{"name":"tickFill","value":{"kind":"value","value":14344167}},{"name":"tickVisitedFill","value":{"kind":"value","value":11121909}},{"name":"quietFillHovered","value":{"kind":"value","value":15330545}},{"name":"quietFillPressed","value":{"kind":"value","value":14672874}},{"name":"accent","value":{"kind":"value","value":3821529}},{"name":"accentHovered","value":{"kind":"value","value":3360452}},{"name":"accentPressed","value":{"kind":"value","value":2965166}},{"name":"controlSelected","value":{"kind":"value","value":14870527}},{"name":"control","value":{"kind":"value","value":16777215}},{"name":"controlHovered","value":{"kind":"value","value":15790839}},{"name":"controlPressed","value":{"kind":"value","value":15001840}},{"name":"buttonStrokeColor","value":{"kind":"value","value":13883618}},{"name":"trackFill","value":{"kind":"value","value":14804460}},{"name":"segmentedSelectedFill","value":{"kind":"value","value":16777215}},{"name":"segmentDividerColor","value":{"kind":"value","value":4294967296}},{"name":"switchWidth","value":{"kind":"value","value":36}},{"name":"switchHeight","value":{"kind":"value","value":20}},{"name":"switchThumbOffSize","value":{"kind":"value","value":16}},{"name":"segmentedHeight","value":{"kind":"value","value":32}},{"name":"segmentedCornerRadius","value":{"kind":"value","value":16}},{"name":"segmentedFontSize","value":{"kind":"value","value":13}},{"name":"segmentedSelectedTextColor","value":{"kind":"value","value":3821529}},{"name":"buttonHeight","value":{"kind":"value","value":32}},{"name":"buttonCornerRadius","value":{"kind":"value","value":16}},{"name":"codeFill","value":{"kind":"value","value":16251130}},{"name":"codeTextColor","value":{"kind":"value","value":2369839}},{"name":"codeFreshFill","value":{"kind":"value","value":15527934}}]}},{"name":"TourDark","body":{"tag":"TourDark","attrs":[{"name":"background","value":{"kind":"value","value":1119000}},{"name":"railFill","value":{"kind":"value","value":1514016}},{"name":"railStrokeColor","value":{"kind":"value","value":2501171}},{"name":"railCurrentFill","value":{"kind":"value","value":2304842}},{"name":"railCurrentTextColor","value":{"kind":"value","value":10859772}},{"name":"text","value":{"kind":"value","value":15264752}},{"name":"textMuted","value":{"kind":"value","value":10726328}},{"name":"textFaint","value":{"kind":"value","value":8029073}},{"name":"stageFill","value":{"kind":"value","value":1711396}},{"name":"stageStrokeColor","value":{"kind":"value","value":2764601}},{"name":"gridDotFill","value":{"kind":"value","value":3027773}},{"name":"containerStrokeColor","value":{"kind":"value","value":4871011}},{"name":"tones","value":{"kind":"value","value":[6333946,3003583,16498468,16020150,10980346,4906624]}},{"name":"chipFill","value":{"kind":"value","value":2369586}},{"name":"chipFillHovered","value":{"kind":"value","value":2896188}},{"name":"chipFillPressed","value":{"kind":"value","value":3554377}},{"name":"chipStrokeColor","value":{"kind":"value","value":4015186}},{"name":"chipTextColor","value":{"kind":"value","value":15264752}},{"name":"noteInk","value":{"kind":"value","value":10980346}},{"name":"noteTextColor","value":{"kind":"value","value":12891645}},{"name":"noteTagFill","value":{"kind":"value","value":2761538}},{"name":"noteWarnTextColor","value":{"kind":"value","value":16747136}},{"name":"noteWarnFill","value":{"kind":"value","value":3809055}},{"name":"glassFill","value":{"kind":"value","value":8589934374}},{"name":"glassStrokeColor","value":{"kind":"value","value":8589934400}},{"name":"cardFill","value":{"kind":"value","value":1514016}},{"name":"cardStrokeColor","value":{"kind":"value","value":2764601}},{"name":"hintTextColor","value":{"kind":"value","value":10859772}},{"name":"tickFill","value":{"kind":"value","value":3027773}},{"name":"tickVisitedFill","value":{"kind":"value","value":4937112}},{"name":"quietFillHovered","value":{"kind":"value","value":1974826}},{"name":"quietFillPressed","value":{"kind":"value","value":2501429}},{"name":"accent","value":{"kind":"value","value":5596126}},{"name":"accentHovered","value":{"kind":"value","value":6385894}},{"name":"accentPressed","value":{"kind":"value","value":7240940}},{"name":"controlSelected","value":{"kind":"value","value":2765913}},{"name":"control","value":{"kind":"value","value":2764602}},{"name":"controlHovered","value":{"kind":"value","value":3291205}},{"name":"controlPressed","value":{"kind":"value","value":3817808}},{"name":"buttonStrokeColor","value":{"kind":"value","value":3817808}},{"name":"trackFill","value":{"kind":"value","value":3225412}},{"name":"sliderThumbFill","value":{"kind":"value","value":14870271}},{"name":"segmentedSelectedFill","value":{"kind":"value","value":3883888}},{"name":"segmentDividerColor","value":{"kind":"value","value":4294967296}},{"name":"switchWidth","value":{"kind":"value","value":36}},{"name":"switchHeight","value":{"kind":"value","value":20}},{"name":"switchThumbOffSize","value":{"kind":"value","value":16}},{"name":"switchThumbFill","value":{"kind":"value","value":14870271}},{"name":"segmentedHeight","value":{"kind":"value","value":32}},{"name":"segmentedCornerRadius","value":{"kind":"value","value":16}},{"name":"segmentedFontSize","value":{"kind":"value","value":13}},{"name":"segmentedSelectedTextColor","value":{"kind":"value","value":14870271}},{"name":"buttonHeight","value":{"kind":"value","value":32}},{"name":"buttonCornerRadius","value":{"kind":"value","value":16}},{"name":"codeFill","value":{"kind":"value","value":1646119}},{"name":"codeTextColor","value":{"kind":"value","value":14212841}},{"name":"codeFreshFill","value":{"kind":"value","value":2504026}}]}},{"name":"QuietLight","body":{"tag":"QuietLight","attrs":[{"name":"accent","value":{"kind":"value","value":10726328}},{"name":"line","value":{"kind":"value","value":14015201}},{"name":"trackFill","value":{"kind":"value","value":15133166}},{"name":"switchWidth","value":{"kind":"value","value":32}},{"name":"switchHeight","value":{"kind":"value","value":18}},{"name":"switchThumbOffSize","value":{"kind":"value","value":14}}]}},{"name":"QuietDark","body":{"tag":"QuietDark","attrs":[{"name":"accent","value":{"kind":"value","value":6120819}},{"name":"line","value":{"kind":"value","value":3422789}},{"name":"trackFill","value":{"kind":"value","value":2764600}},{"name":"switchThumbFill","value":{"kind":"value","value":10726328}},{"name":"switchWidth","value":{"kind":"value","value":32}},{"name":"switchHeight","value":{"kind":"value","value":18}},{"name":"switchThumbOffSize","value":{"kind":"value","value":14}}]}}],"styles":[{"name":"Keyword","body":{"tag":"Keyword","attrs":[{"name":"textColor","value":{"kind":"value","value":8540383}}]}},{"name":"TypeName","body":{"tag":"TypeName","attrs":[{"name":"textColor","value":{"kind":"value","value":745407}}]}},{"name":"StringText","body":{"tag":"StringText","attrs":[{"name":"textColor","value":{"kind":"value","value":687429}}]}},{"name":"NumberText","body":{"tag":"NumberText","attrs":[{"name":"textColor","value":{"kind":"value","value":11752448}}]}},{"name":"Comment","body":{"tag":"Comment","attrs":[{"name":"textColor","value":{"kind":"value","value":7239553}},{"name":"italic","value":{"kind":"value","value":true}}]}},{"name":"Punctuation","body":{"tag":"Punctuation","attrs":[{"name":"textColor","value":{"kind":"value","value":7239553}}]}},{"name":"KeywordOnDark","body":{"tag":"KeywordOnDark","attrs":[{"name":"textColor","value":{"kind":"value","value":13079274}}]}},{"name":"TypeNameOnDark","body":{"tag":"TypeNameOnDark","attrs":[{"name":"textColor","value":{"kind":"value","value":8563455}}]}},{"name":"StringTextOnDark","body":{"tag":"StringTextOnDark","attrs":[{"name":"textColor","value":{"kind":"value","value":12839053}}]}},{"name":"NumberTextOnDark","body":{"tag":"NumberTextOnDark","attrs":[{"name":"textColor","value":{"kind":"value","value":16223340}}]}},{"name":"CommentOnDark","body":{"tag":"CommentOnDark","attrs":[{"name":"textColor","value":{"kind":"value","value":6910854}},{"name":"italic","value":{"kind":"value","value":true}}]}},{"name":"PunctuationOnDark","body":{"tag":"PunctuationOnDark","attrs":[{"name":"textColor","value":{"kind":"value","value":9035263}}]}}],"uses":["OverlayStrata"],"scripts":[{"src":" const STAGE_W = 600;\nconst STAGE_H = 400;\nconst ZOOM = 1.35;\n;function esc(s) {\n    return s.replace(/&/g, \"&amp;\").replace(/</g, \"&lt;\").replace(/>/g, \"&gt;\").replace(/ /g, \" \");\n}\nfunction colored(line) {\n    const re = /(\\/\\/.*$)|(\\x22(?:[^\\x22\\\\]|\\\\.)*\\x22)|(\\b(?:class|extends|const|return|let|true|false)\\b)|(\\b[A-Z][A-Za-z0-9]*\\b)|(0x[0-9A-Fa-f]+|#[0-9A-Fa-f]{6,8}\\b|\\b\\d+(?:\\.\\d+)?%?)|([\\[\\]{}])/g;\n    const kinds = [\"Comment\", \"StringText\", \"Keyword\", \"TypeName\", \"NumberText\", \"Punctuation\"];\n    let out = \"\", last = 0;\n    let m;\n    while ((m = re.exec(line)) != null) {\n        const kind = kinds[[m[1], m[2], m[3], m[4], m[5], m[6]].findIndex((g) => g !== undefined)];\n        out += esc(line.slice(last, m.index)) + \"<span class='\" + kind + \"'>\" + esc(m[0]) + \"</span>\";\n        last = re.lastIndex;\n    }\n    return out + esc(line.slice(last));\n}\nfunction requestedAppearance() {\n    const location = globalThis.location;\n    const m = location?.search.match(/[?&]appearance=(light|dark)\\b/);\n    return m != null ? m[1] : \"auto\";\n} /*$b*/ return { STAGE_W, STAGE_H, ZOOM, esc, colored, requestedAppearance }; ","compiled":true},{"src":" \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"}],"root":{"tag":"App","attrs":[{"name":"appName","value":{"kind":"value","value":"The Declare model"}},{"name":"minWidth","value":{"kind":"value","value":360}},{"name":"theme","value":{"kind":"code","src":" { ...(this.$root.isDark ? ({ ...SanFranciscoDark, ...TourDark }) : ({ ...SanFrancisco, ...TourLight })),\n        ...this.$root.fingerSizes } ","deps":["this.$root.isDark","this.$root.fingerSizes"]},"route":"provision"},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").background ","deps":["this.$provided(\"theme\")"]}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").text ","deps":["this.$provided(\"theme\")"]},"route":"provision"},{"name":"fontFamily","value":{"kind":"code","src":" this.$root.uiFace ","deps":["this.$root.uiFace"],"expr":"L0"},"route":"provision"},{"name":"textStyles","value":{"kind":"code","src":" this.$root.isDark\n        ? ({ Keyword: KeywordOnDark, TypeName: TypeNameOnDark, StringText: StringTextOnDark,\n            NumberText: NumberTextOnDark, Comment: CommentOnDark, Punctuation: PunctuationOnDark })\n        : ({ Keyword, TypeName, StringText, NumberText, Comment, Punctuation }) ","deps":["this.$root.isDark"]},"route":"provision"},{"name":"location","value":{"kind":"value","value":"view"}},{"name":"keyBindings","value":{"kind":"code","src":" [ ({ key: \"ArrowRight\", command: \"next\", label: \"Next screen\" }),\n        ({ key: \"ArrowLeft\", command: \"back\", label: \"Previous screen\" }) ] "}},{"name":"trackChanges","value":{"kind":"list","items":[{"kind":"string","value":"stepId"}]},"route":"list"},{"name":"scrolls","value":{"kind":"value","value":"none"}}],"decls":[{"name":"themeMode","type":"string","def":{"kind":"code","src":" requestedAppearance() "}},{"name":"isDark","type":"boolean","def":{"kind":"code","src":" this.$root.themeMode == \"auto\" ? this.$root.systemDark : this.$root.themeMode == \"dark\" ","deps":["this.$root.themeMode","this.$root.systemDark"]}},{"name":"target","type":"number","def":{"kind":"code","src":" this.$root.touchFirst ? 44 : 32 ","deps":["this.$root.touchFirst"],"expr":"L0 K44 K32 ?"}},{"name":"fingerSizes","type":"object","def":{"kind":"code","src":" this.$root.touchFirst\n        ? ({ segmentedHeight: 44, segmentedCornerRadius: 22, buttonHeight: 44, buttonCornerRadius: 22,\n            switchWidth: 51, switchHeight: 31, switchThumbOffSize: 27 }) : ({}) ","deps":["this.$root.touchFirst"]}},{"name":"uiFace","type":"string[]","def":{"kind":"list","items":[{"kind":"string","value":"-apple-system"},{"kind":"string","value":"system-ui"},{"kind":"string","value":"Segoe UI"},{"kind":"string","value":"Helvetica Neue"},{"kind":"string","value":"sans-serif"}]},"route":"list"},{"name":"monoFace","type":"string[]","def":{"kind":"list","items":[{"kind":"string","value":"ui-monospace"},{"kind":"string","value":"SFMono-Regular"},{"kind":"string","value":"Menlo"},{"kind":"string","value":"monospace"}]},"route":"list"},{"name":"steps","type":"Step[]","def":{"kind":"code","src":" [\n        ...(this.$root.tour.value?.steps ?? []).filter((s) => s.core != null).sort((a, b) => (a.core ?? 0) - (b.core ?? 0)),\n        ...(this.$root.tour.value?.steps ?? []).filter((s) => s.core == null) ] "}},{"name":"order","type":"string[]","def":{"kind":"code","src":" this.$root.steps.map((s) => s.id) "}},{"name":"coreCount","type":"number","def":{"kind":"code","src":" this.$root.steps.filter((s) => s.core != null).length "}},{"name":"paint","type":"Paint","def":{"kind":"code","src":" (this.$root.isDark ? this.$root.tour.value?.paint.dark : this.$root.tour.value?.paint.light) ?? ({ panel: \"whitesmoke\", box: \"white\" }) "}},{"name":"index","type":"number","def":{"kind":"code","src":" Math.max(0, this.$root.order.indexOf(this.$root.location)) ","deps":["this.$root.location","this.$root.order"]}},{"name":"step","type":"Step?","def":{"kind":"code","src":" this.$root.steps[this.$root.index] ?? null ","$nullsUndefined":true}},{"name":"stepId","type":"string","def":{"kind":"code","src":" this.$root.step?.id ?? \"view\" "}},{"name":"prevStep","type":"string","def":{"kind":"value","value":"view"}},{"name":"resizing","type":"boolean","def":{"kind":"code","src":" this.$root.widthKnob(this.$root.stepId) != null "}},{"name":"widthNow","type":"number","def":{"kind":"code","src":" this.$root.widthOf(this.$root.widthKnob(this.$root.stepId)?.name ?? \"\") "}},{"name":"openT","type":"number","def":{"kind":"value","value":0}},{"name":"labels","type":"string[]","def":{"kind":"list","items":[{"kind":"string","value":"Design"},{"kind":"string","value":"Build"},{"kind":"string","value":"Ship"},{"kind":"string","value":"Test"},{"kind":"string","value":"Plan"},{"kind":"string","value":"Learn"}]},"route":"list"},{"name":"presses","type":"number","def":{"kind":"value","value":0}},{"name":"dragging","type":"boolean","def":{"kind":"value","value":false}},{"name":"outlines","type":"boolean","def":{"kind":"value","value":false}},{"name":"contentsOpen","type":"boolean","def":{"kind":"value","value":false}},{"name":"chipsLive","type":"boolean","def":{"kind":"code","src":" this.$root.step?.live != null "}},{"name":"chipsToggle","type":"boolean","def":{"kind":"code","src":" this.$root.step?.live == \"toggle\" "}},{"name":"dragKnob","type":"boolean","def":{"kind":"code","src":" this.$root.step?.drag ?? false "}},{"name":"following","type":"boolean","def":{"kind":"code","src":" this.$root.dragging || this.$root.stepId == \"spring\" ","deps":["this.$root.dragging","this.$root.stepId"]}},{"name":"scene","type":"Scene","def":{"kind":"code","src":" this.$root.director.scene(this.$root.stepId) "}},{"name":"wordsW","type":"number","def":{"kind":"code","src":" this.$root.stage.words.width "}},{"name":"wordsH","type":"number","def":{"kind":"code","src":" this.$root.stage.words.height "}},{"name":"wide","type":"boolean","def":{"kind":"code","src":" this.$root.width >= 1000 ","deps":["this.$root.width"],"expr":"L0 K1000 g"}},{"name":"stacked","type":"boolean","def":{"kind":"code","src":" this.$root.main.card.width < 820 ","deps":["this.$root.main.card.width"],"expr":"L0 K820 <"}},{"name":"narrow","type":"boolean","def":{"kind":"code","src":" this.$root.main.foot.width < 520 ","deps":["this.$root.main.foot.width"],"expr":"L0 K520 <"}},{"name":"compact","type":"boolean","def":{"kind":"code","src":" this.$root.main.foot.width < 720 ","deps":["this.$root.main.foot.width"],"expr":"L0 K720 <"}},{"name":"stage","type":"Stage","def":{"kind":"code","src":" this.$root.main.card.stageSide.room.stage ","deps":["this.$root.main.card.stageSide.room.stage"],"expr":"L0"}}],"methods":[{"name":"partName","params":[{"name":"id","type":"string"}],"returns":"string","returnsNullable":false,"body":"return this.$root.tour.value?.parts.find(p=>p.id==id)?.name??\"\""},{"name":"whereIs","params":[{"name":"i","type":"number"}],"returns":"string","returnsNullable":false,"body":"const s=this.$root.steps[i];if(s==null)return\"\";return s.core!=null?\"Declare in 10 minutes  \\xB7  \"+(i+1)+\" of \"+this.$root.coreCount:\"Going further  \\xB7  \"+this.$root.partName(s.part)"},{"name":"go","params":[{"name":"i","type":"number"}],"body":"if(i>=0&&i<this.order.length)this.location=this.order[i]"},{"name":"next","body":"this.go(this.index+1)"},{"name":"back","body":"this.go(this.index-1)"},{"name":"onChange","params":[{"name":"e","type":"ChangeEvent"}],"body":"this.prevStep=e.changed[0].previousValue;this.choices.set([\"dx\"],0);this.choices.set([\"dy\"],0);this.$root.stage.p.scrollTo(0)"},{"name":"moveBox","params":[{"name":"dx","type":"number"},{"name":"dy","type":"number"}],"body":"const g=this.director.geo(this.stepId),w=g.w??0,h=g.h??0,x=g.x??0,y=g.y??0;this.choices.set([\"dx\"],Math.round(Math.max(10-x,Math.min(STAGE_W-10-w-x,dx))));this.choices.set([\"dy\"],Math.round(Math.max(10-y,Math.min(STAGE_H-10-h-y,dy))))"},{"name":"widthKnob","params":[{"name":"id","type":"string"}],"returns":"Knob","returnsNullable":true,"body":"return this.$root.steps.find(s=>s.id==id)?.knobs.find(k=>k.name==\"panelWidth\"||k.name==\"rowWidth\")??null"},{"name":"widthOf","params":[{"name":"name","type":"string"}],"returns":"number","returnsNullable":false,"body":"return name==\"panelWidth\"?this.$root.choices.value.panelWidth:this.$root.choices.value.rowWidth"},{"name":"setWidth","params":[{"name":"w","type":"number"}],"body":"const k=this.widthKnob(this.stepId);if(k!=null)this.choices.set([k.name],Math.round(Math.max(k.min??w,Math.min(k.max??w,w))))"},{"name":"leavingNotes","returns":"Note[]","returnsNullable":false,"body":"const cur=this.scene.notes,has=new Set(cur.map(n=>n.id));const before=this.prevStep!=this.stepId?this.director.raw(this.prevStep).notes:[];return[...cur,...before.filter(n=>!has.has(n.id)).map(n=>({...n,gone:true}))]"}],"children":[{"tag":"DataSource","name":"tour","attrs":[{"name":"url","value":{"kind":"value","value":"steps.json"}},{"name":"autoFetch","value":{"kind":"value","value":true}},{"name":"schema","value":{"kind":"schema","shape":[{"name":"parts","array":true,"optional":false,"type":null,"ref":"Part"},{"name":"chip","array":false,"optional":false,"type":null,"ref":"ChipGeo"},{"name":"paint","array":false,"optional":false,"type":null,"fields":[{"name":"light","array":false,"optional":false,"type":null,"ref":"Paint"},{"name":"dark","array":false,"optional":false,"type":null,"ref":"Paint"}]},{"name":"steps","array":true,"optional":false,"type":null,"ref":"Step"}],"refName":"Tour"},"slotType":{"kind":"dataschema"}}]},{"tag":"Dataset","name":"route","attrs":[{"name":"contents","value":{"kind":"code","src":" { steps: this.$root.steps } ","deps":["this.$root.steps"]}}]},{"tag":"Dataset","name":"choices","attrs":[{"name":"schema","value":{"kind":"schema","shape":[{"name":"dx","array":false,"optional":false,"type":"number"},{"name":"dy","array":false,"optional":false,"type":"number"},{"name":"words","array":false,"optional":false,"type":"string"},{"name":"swapped","array":false,"optional":false,"type":"boolean"},{"name":"panelWidth","array":false,"optional":false,"type":"number"},{"name":"size","array":false,"optional":false,"type":"number"},{"name":"open","array":false,"optional":false,"type":"boolean"},{"name":"axis","array":false,"optional":false,"type":"string","tokens":["y","x"]},{"name":"align","array":false,"optional":false,"type":"string","tokens":["start","center","end"]},{"name":"rowWidth","array":false,"optional":false,"type":"number"},{"name":"padding","array":false,"optional":false,"type":"number"},{"name":"fill","array":false,"optional":false,"type":"string","tokens":["color","gradient"]},{"name":"sides","array":false,"optional":false,"type":"string","tokens":["all","bottom"]},{"name":"corners","array":false,"optional":false,"type":"string","tokens":["one","four","pill"]},{"name":"lift","array":false,"optional":false,"type":"number"},{"name":"presence","array":false,"optional":false,"type":"string","tokens":["shown","faded","clear","hidden"]},{"name":"done","array":false,"optional":false,"type":"number"},{"name":"clip","array":false,"optional":false,"type":"string","tokens":["none","box","shape"]},{"name":"scaleBy","array":false,"optional":false,"type":"number"},{"name":"turn","array":false,"optional":false,"type":"number"},{"name":"pivot","array":false,"optional":false,"type":"string","tokens":["middle","corner"]},{"name":"filter","array":false,"optional":false,"type":"string","tokens":["none","blur","grayscale","hue"]},{"name":"frost","array":false,"optional":false,"type":"boolean"},{"name":"label","array":false,"optional":false,"type":"string"},{"name":"status","array":false,"optional":false,"type":"string","tokens":["doing","done"]},{"name":"round","array":false,"optional":false,"type":"boolean"}],"refName":"Choices"},"slotType":{"kind":"dataschema"}}],"raw":{"src":" {\n        \"dx\": 0, \"dy\": 0, \"words\": \"Hello, world\", \"swapped\": false, \"panelWidth\": 360, \"size\": 60, \"open\": false,\n        \"axis\": \"y\", \"align\": \"start\", \"rowWidth\": 460, \"padding\": 20, \"fill\": \"color\", \"sides\": \"all\",\n        \"corners\": \"one\", \"lift\": 0.5, \"presence\": \"shown\", \"done\": 0.6, \"clip\": \"none\", \"scaleBy\": 0.6,\n        \"turn\": 20, \"pivot\": \"middle\", \"filter\": \"none\", \"frost\": false, \"label\": \"Design\", \"status\": \"doing\",\n        \"round\": true } "}},{"tag":"Spring","attrs":[{"name":"attribute","value":{"kind":"value","value":"openT"}},{"name":"to","value":{"kind":"code","src":" this.$root.choices.value.open ? 1 : 0 ","deps":["this.$root.choices.value.open"],"expr":"L0 K1 K0 ?"}},{"name":"stiffness","value":{"kind":"value","value":120}},{"name":"damping","value":{"kind":"value","value":14}}]},{"tag":"Records","name":"records","raw":{"src":" { \"rows\": [\n        { \"id\": 1, \"label\": \"Design\", \"status\": \"doing\" }, { \"id\": 2, \"label\": \"Build\", \"status\": \"doing\" },\n        { \"id\": 3, \"label\": \"Ship\", \"status\": \"done\" }, { \"id\": 4, \"label\": \"Test\", \"status\": \"done\" } ] } "}},{"tag":"Director","name":"director"},{"tag":"Dataset","name":"cast","attrs":[{"name":"schema","value":{"kind":"schema","shape":[{"name":"k","array":true,"optional":false,"type":null,"ref":"Pose"}],"refName":"Cast"},"slotType":{"kind":"dataschema"}},{"name":"contents","value":{"kind":"code","src":" { k: this.$root.scene.k } "}}]},{"tag":"Dataset","name":"notesShown","attrs":[{"name":"contents","value":{"kind":"code","src":" { notes: this.$root.leavingNotes() } "}}]},{"tag":"Listing","name":"listing"},{"tag":"Dataset","name":"codeShown","attrs":[{"name":"schema","value":{"kind":"schema","shape":[{"name":"lines","array":true,"optional":false,"type":null,"ref":"CodeRow"}]},"slotType":{"kind":"dataschema"}},{"name":"contents","value":{"kind":"code","src":" { lines: this.$root.listing.merged(this.$root.listing.lines(this.$root.prevStep), this.$root.listing.lines(this.$root.stepId),\n            this.$root.listing.lines(this.$root.order[this.$root.index - 1] ?? \"\")) } "}}]},{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"align","value":{"kind":"value","value":"stretch"}}],"classSlot":"Layout"},{"tag":"View","name":"side","attrs":[{"name":"visible","value":{"kind":"code","src":" this.$root.wide ","deps":["this.$root.wide"],"expr":"L0"}},{"name":"width","value":{"kind":"value","value":280}},{"name":"scrolls","value":{"kind":"value","value":"y"}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":24},{"kind":"number","value":12},{"kind":"number","value":24},{"kind":"number","value":12}]},"route":"corners"},{"name":"accessibilityRole","value":{"kind":"value","value":"navigation"}},{"name":"accessibilityLabel","value":{"kind":"value","value":"Contents"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").railFill ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" [null, Stroke(1, this.$provided(\"theme\").railStrokeColor), null, null] ","deps":["this.$provided(\"theme\")"]}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}},{"name":"spacing","value":{"kind":"value","value":4}}],"classSlot":"Layout"},{"tag":"View","name":"titleRow","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":0},{"kind":"number","value":4},{"kind":"number","value":4},{"kind":"number","value":12}]},"route":"corners"}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"Text","attrs":[{"name":"flexes","value":{"kind":"value","value":true}},{"name":"fontSize","value":{"kind":"value","value":17}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"text","value":{"kind":"value","value":"The Declare model"}}]},{"tag":"AppearanceSwitch","attrs":[{"name":"dark","value":{"kind":"code","src":" this.$root.isDark ","deps":["this.$root.isDark"],"expr":"L0"}}],"methods":[{"name":"commit","params":[{"name":"v","type":"boolean"}],"body":"this.$root.themeMode=v?\"dark\":\"light\""}]}]},{"tag":"Text","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":0},{"kind":"number","value":12},{"kind":"number","value":4},{"kind":"number","value":12}]},"route":"corners"},{"name":"fontSize","value":{"kind":"value","value":13}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"value","value":"How Declare puts things on the screen, one point at a time."}}]},{"tag":"Text","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":0},{"kind":"number","value":12},{"kind":"number","value":8},{"kind":"number","value":12}]},"route":"corners"},{"name":"fontSize","value":{"kind":"value","value":12}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textFaint ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"value","value":"The stage animates each change so you can follow it; a program changes at once unless it moves its views."}}]},{"tag":"Contents"}]},{"tag":"View","name":"main","attrs":[{"name":"flexes","value":{"kind":"value","value":true}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":28},{"kind":"number","value":32},{"kind":"number","value":32},{"kind":"number","value":32}]},"route":"corners"},{"name":"accessibilityRole","value":{"kind":"value","value":"main"}},{"name":"scrolls","value":{"kind":"code","src":" this.$root.stacked ? \"y\" : \"none\" ","deps":["this.$root.stacked"]}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}},{"name":"spacing","value":{"kind":"value","value":18}}],"classSlot":"Layout"},{"tag":"View","name":"head","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}},{"name":"spacing","value":{"kind":"value","value":8}}],"classSlot":"Layout"},{"tag":"View","name":"bar","attrs":[{"name":"visible","value":{"kind":"code","src":" !this.$root.wide ","deps":["this.$root.wide"],"expr":"L0 n"}},{"name":"width","value":{"kind":"value","value":{"percent":100}}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":8}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"ContentsButton","methods":[{"name":"press","body":"this.$root.contentsOpen=true"}]},{"tag":"Text","attrs":[{"name":"flexes","value":{"kind":"value","value":true}},{"name":"fontSize","value":{"kind":"value","value":13}},{"name":"fontWeight","value":{"kind":"value","value":"medium"}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$root.whereIs(this.$root.index) "}}]},{"tag":"AppearanceSwitch","attrs":[{"name":"dark","value":{"kind":"code","src":" this.$root.isDark ","deps":["this.$root.isDark"],"expr":"L0"}}],"methods":[{"name":"commit","params":[{"name":"v","type":"boolean"}],"body":"this.$root.themeMode=v?\"dark\":\"light\""}]}]},{"tag":"Text","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"accessibilityRole","value":{"kind":"value","value":"heading"}},{"name":"fontSize","value":{"kind":"code","src":" this.$root.width < 600 ? 26 : 34 ","deps":["this.$root.width"],"expr":"L0 K600 < K26 K34 ?"}},{"name":"fontWeight","value":{"kind":"value","value":"semibold"}},{"name":"letterSpacing","value":{"kind":"value","value":-0.5}},{"name":"text","value":{"kind":"code","src":" this.$root.step?.title ?? \"\" "}}]},{"tag":"Text","attrs":[{"name":"width","value":{"kind":"code","src":" Math.min(720, parent.width) ","deps":["parent.width"],"expr":"K720 L0 m"}},{"name":"height","value":{"kind":"code","src":" Math.max(50, this.contentHeight) ","deps":["this.contentHeight"],"expr":"K50 L0 M"}},{"name":"fontSize","value":{"kind":"value","value":18}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textMuted ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$root.step?.point ?? \"\" "}}]}]},{"tag":"View","name":"card","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"flexes","value":{"kind":"code","src":" !this.$root.stacked ","deps":["this.$root.stacked"],"expr":"L0 n"}},{"name":"cornerRadius","value":{"kind":"value","value":18}},{"name":"clip","value":{"kind":"value","value":true}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").cardFill ","deps":["this.$provided(\"theme\")"]}}],"children":[{"tag":"ResponsiveLayout","name":"layout","attrs":[{"name":"align","value":{"kind":"value","value":"stretch"}},{"name":"gap","value":{"kind":"value","value":0}},{"name":"plan","value":{"kind":"code","src":" [\n                ({ from: 820, flow: \"row\", share: ({ stageSide: 100 }) }),\n                ({ from: 0, flow: \"stack\", share: ({ stageSide: 100, codeBox: 100 }) }) ] "}}],"classSlot":"Layout"},{"tag":"View","name":"stageSide","attrs":[{"name":"accessibilityRole","value":{"kind":"value","value":"region"}},{"name":"accessibilityLabel","value":{"kind":"value","value":"The stage"}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").stageFill ","deps":["this.$provided(\"theme\")"]}}],"children":[{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" this.$root.stacked ","deps":["this.$root.stacked"],"expr":"L0"}},{"name":"height","value":{"kind":"code","src":" this.width * 0.7 + 48 + this.$root.target + 64 ","deps":["this.width","this.$root.target"],"expr":"L0 K0.7 * K48 + L1 + K64 +"},"route":"override"}]},{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}}],"classSlot":"Layout"},{"tag":"View","name":"top","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"code","src":" this.$root.target + 64 ","deps":["this.$root.target"],"expr":"L0 K64 +"}},{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":18},{"kind":"number","value":12},{"kind":"number","value":10},{"kind":"number","value":12}]},"route":"corners"},{"name":"datapath","value":{"kind":"code","src":" this.$root.step ","$nullsUndefined":true,"deps":["this.$root.step"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}},{"name":"spacing","value":{"kind":"value","value":10}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"Text","attrs":[{"name":"maxLines","value":{"kind":"value","value":1}},{"name":"fontSize","value":{"kind":"value","value":16}},{"name":"fontWeight","value":{"kind":"value","value":"medium"}},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").hintTextColor ","deps":["this.$provided(\"theme\")"]}},{"name":"text","value":{"kind":"code","src":" this.$data([\"hint\"]) ?? \"\" ","deps":[":hint"]}}]},{"tag":"View","name":"controls","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"scrolls","value":{"kind":"value","value":"x"}},{"name":"fontSize","value":{"kind":"value","value":13},"route":"provision"}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":8}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"Spacer"},{"tag":"View","attrs":[{"name":"datapath","value":{"kind":"path","path":"knobs","many":true},"route":"cursor"},{"name":"classFor","value":{"kind":"code","src":" ({ segmented: \"ChoiceSegments\", slider: \"ChoiceSlider\", toggle: \"ChoiceToggle\", verb: \"RecordVerb\" })[this.$data([\"kind\"]) ?? \"toggle\"] ?? \"ChoiceToggle\" ","deps":[":kind"]}}]},{"tag":"Spacer"}]}]},{"tag":"View","name":"room","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"flexes","value":{"kind":"value","value":true}}],"decls":[{"name":"fit","type":"number","def":{"kind":"code","src":" Math.max(0.3, Math.min((this.width - 32) / STAGE_W, this.height / STAGE_H, 1.4)) ","deps":["this.width","this.height"]}}],"children":[{"tag":"Stage","name":"stage","attrs":[{"name":"scale","value":{"kind":"code","src":" parent.fit ","deps":["parent.fit"],"expr":"L0"}},{"name":"pivotX","value":{"kind":"value","value":0}},{"name":"pivotY","value":{"kind":"value","value":0}},{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}}]}]},{"tag":"View","name":"foot","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":44}},{"name":"theme","value":{"kind":"code","src":" this.$root.isDark ? ({ ...SanFranciscoDark, ...TourDark, ...QuietDark, ...this.$root.fingerSizes })\n                        : ({ ...SanFrancisco, ...TourLight, ...QuietLight, ...this.$root.fingerSizes }) ","deps":["this.$root.isDark","this.$root.fingerSizes"]},"route":"provision"}],"children":[{"tag":"Switch","name":"boxesSwitch","attrs":[{"name":"x","value":{"kind":"value","value":{"align":"center"}}},{"name":"y","value":{"kind":"value","value":{"align":"center"}}},{"name":"label","value":{"kind":"value","value":"Show boxes"}},{"name":"fontSize","value":{"kind":"value","value":12},"route":"provision"},{"name":"textColor","value":{"kind":"code","src":" this.$provided(\"theme\").textFaint ","deps":["this.$provided(\"theme\")"]},"route":"provision"},{"name":"checked","value":{"kind":"code","src":" this.$root.outlines ","deps":["this.$root.outlines"],"expr":"L0"}}],"methods":[{"name":"commit","params":[{"name":"v","type":"boolean"}],"body":"this.$root.outlines=v"}]}]}]},{"tag":"View","name":"codeBox","attrs":[{"name":"padding","value":{"kind":"list","items":[{"kind":"number","value":20},{"kind":"number","value":8},{"kind":"number","value":20},{"kind":"number","value":0}]},"route":"corners"},{"name":"scrolls","value":{"kind":"code","src":" this.$root.stacked ? \"both\" : \"y\" ","deps":["this.$root.stacked"]}},{"name":"fill","value":{"kind":"code","src":" this.$provided(\"theme\").codeFill ","deps":["this.$provided(\"theme\")"]}},{"name":"stroke","value":{"kind":"code","src":" [null, null, null, Stroke(1, this.$provided(\"theme\").cardStrokeColor)] ","deps":["this.$provided(\"theme\")"]}}],"children":[{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" this.$root.stacked ","deps":["this.$root.stacked"],"expr":"L0"}},{"name":"height","value":{"kind":"value","value":260},"route":"override"},{"name":"stroke","value":{"kind":"code","src":" [Stroke(1, this.$provided(\"theme\").cardStrokeColor), null, null, null] ","deps":["this.$provided(\"theme\")"]},"route":"override"}]},{"tag":"View","name":"lines","attrs":[{"name":"width","value":{"kind":"value","value":440}},{"name":"datapath","value":{"kind":"code","src":" this.$root.codeShown.value ","$nullsUndefined":true,"deps":["this.$root.codeShown.value"],"expr":"L0"},"route":"cursor"}],"children":[{"tag":"State","attrs":[{"name":"applied","value":{"kind":"code","src":" this.$root.stacked ","deps":["this.$root.stacked"],"expr":"L0"}},{"name":"width","value":{"kind":"code","src":" Math.max(440, parent.width - 8) ","deps":["parent.width"],"expr":"K440 L0 K8 - M"},"route":"override"}]},{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"y"}}],"classSlot":"Layout"},{"tag":"CodeLine","attrs":[{"name":"datapath","value":{"kind":"path","path":"lines","many":true},"route":"cursor"}]}]}]},{"tag":"View","name":"edge","attrs":[{"name":"ignoreLayout","value":{"kind":"value","value":true}},{"name":"width","value":{"kind":"value","value":{"percent":100}}},{"name":"height","value":{"kind":"value","value":{"percent":100}}},{"name":"cornerRadius","value":{"kind":"value","value":18}},{"name":"pointerEvents","value":{"kind":"value","value":"none"}},{"name":"stroke","value":{"kind":"code","src":" Stroke(1, this.$provided(\"theme\").cardStrokeColor) ","deps":["this.$provided(\"theme\")"]}}]}]},{"tag":"View","name":"foot","attrs":[{"name":"width","value":{"kind":"value","value":{"percent":100}}}],"children":[{"tag":"SimpleLayout","name":"layout","attrs":[{"name":"axis","value":{"kind":"value","value":"x"}},{"name":"spacing","value":{"kind":"value","value":20}},{"name":"align","value":{"kind":"value","value":"center"}}],"classSlot":"Layout"},{"tag":"BackLink","name":"backLink","attrs":[{"name":"disabled","value":{"kind":"code","src":" this.$root.index == 0 ","deps":["this.$root.index"],"expr":"L0 K0 ="}}],"methods":[{"name":"press","body":"this.$root.back()"}]},{"tag":"Progress","attrs":[{"name":"flexes","value":{"kind":"value","value":true}}]},{"tag":"NextPill","name":"nextButton","attrs":[{"name":"disabled","value":{"kind":"code","src":" this.$root.index >= this.$root.order.length - 1 ","deps":["this.$root.index","this.$root.order"],"expr":"L0 L%this.$root.order.length K1 - g"}},{"name":"title","value":{"kind":"code","src":" this.$root.steps[this.$root.index + 1]?.title ?? \"\" "}}],"methods":[{"name":"press","body":"this.$root.next()"}]}]}]},{"tag":"Sheet","name":"contentsSheet","attrs":[{"name":"edge","value":{"kind":"value","value":"start"}},{"name":"accessibilityLabel","value":{"kind":"value","value":"Contents"}},{"name":"shown","value":{"kind":"code","src":" this.$root.contentsOpen && !this.$root.wide ","deps":["this.$root.contentsOpen","this.$root.wide"],"expr":"L0 L1 n L0 ?"}}],"methods":[{"name":"commit","params":[{"name":"open","type":"boolean"}],"body":"this.$root.contentsOpen=open"}],"children":[{"tag":"Contents"}]},{"tag":"FocusRing"},{"tag":"Tooltip"},{"tag":"ShortcutsPanel"}]},"permitted":["DataSource","Dataset","Spring","Records","Director","Listing","SimpleLayout","View","Text","AppearanceSwitch","Contents","ContentsButton","ResponsiveLayout","State","Spacer","Stage","Switch","CodeLine","BackLink","Progress","NextPill","Sheet","FocusRing","Tooltip","ShortcutsPanel","Node","Control","Glide","Ring","ChipRow","Outline","Words","TextLabel","NoteView","Hairline","NoteWords","Arrowhead","DragSurface","Piece","Layout","Icon","SunIcon","MoonIcon","ValueControl","SendHold","Floating","SegmentedItem","IconHost","KeyListener","ShortcutsPanelRow","HTMLText","Segmented","Slider","Button","IconButton","ListIcon","ChevronIcon","Tick","RailStep","App","OverlayStrata","ChoiceSegments","ChoiceSlider","ChoiceToggle","RecordVerb","WidthNote","HeightNote","PointerNote","FrameNote","DotNote","TagNote","LabelNote","ShortcutsPanelHead","ShortcutsPanelLine"],"permittedIslands":[],"routed":true,"trusted":true},"closure":{"entries":[{"id":"apps/model-tour/model-tour.declare","kind":"file","v":{"hash":"63165ada481c3fee"}},{"id":"apps/model-tour/stage.declare","kind":"file","v":{"hash":"7647d0ca5afc1185"}},{"id":"library/autoincludes.json","kind":"file","v":{"hash":"7319942dd4d6aad4"}},{"id":"library/simplelayout.declare","kind":"file","v":{"hash":"29f3a343605dba4b"}},{"id":"library/appearanceswitch.declare","kind":"file","v":{"hash":"ca6fe5fac1e3a52a"}},{"id":"library/control.declare","kind":"file","v":{"hash":"52d54b27b0daa659"}},{"id":"library/icons/appearance.declare","kind":"file","v":{"hash":"b71c48c351356057"}},{"id":"library/icons/icon.declare","kind":"file","v":{"hash":"e1a53e07afc89bb5"}},{"id":"library/responsive.declare","kind":"file","v":{"hash":"a580ee7f4e088e3b"}},{"id":"library/spacer.declare","kind":"file","v":{"hash":"79e9d2cb7d1d4c0f"}},{"id":"library/switch.declare","kind":"file","v":{"hash":"8ec1e404bfc221cf"}},{"id":"library/valuecontrol.declare","kind":"file","v":{"hash":"541b0dbd98527a7e"}},{"id":"library/textlabel.declare","kind":"file","v":{"hash":"64c334940470cb5f"}},{"id":"library/sheet.declare","kind":"file","v":{"hash":"c359bf054cb6d116"}},{"id":"library/floating.declare","kind":"file","v":{"hash":"171733c1e563d77d"}},{"id":"library/segmented.declare","kind":"file","v":{"hash":"21648c49244ceddb"}},{"id":"library/slider.declare","kind":"file","v":{"hash":"38da3e7a6b95e79f"}},{"id":"library/button.declare","kind":"file","v":{"hash":"3315f3f024cb32aa"}},{"id":"library/icons/core.declare","kind":"file","v":{"hash":"966f63ab6d6344f1"}},{"id":"library/overlaystrata.declare","kind":"file","v":{"hash":"a4e12304eab79c2f"}},{"id":"library/focusring.declare","kind":"file","v":{"hash":"3e6b322e5189af9b"}},{"id":"library/tooltip.declare","kind":"file","v":{"hash":"6fc0a56d15e41075"}},{"id":"library/shortcutspanel.declare","kind":"file","v":{"hash":"24ea4e54b4481853"}}],"props":{"render":"dom"}}}
