diff --git a/lecture-06/class/assets/md-BLhYOnc7.js b/lecture-06/class/assets/md-BLhYOnc7.js new file mode 100644 index 0000000000000000000000000000000000000000..ced7a1b0ef2fd5cf8ef24e8021337ef64de4bee2 --- /dev/null +++ b/lecture-06/class/assets/md-BLhYOnc7.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,W as r,_ as i,_t as a,b as o,v as s,x as c,yt as l,z as u}from"./modules/shiki-BFOesOFp.js";import{n as d,t as f}from"./slidev/context-DrkI8qiD.js";import{t as p}from"./default-Cq9fupKf.js";var m={class:`grid grid-cols-[1.3fr_1fr] gap-8 mt-2 items-start`},h={viewBox:`0 0 420 184`,class:`dl-diagram`,style:{"max-height":`14rem`},role:`img`,"aria-label":`The three words of the river bank, each with a bar chart of its four embedding numbers: the is 1 0 0 0, river is 0 2 0 1, bank is 0 0 0 2`},g={class:`dl-tight`},_={class:`mt-3 dl-callout`},v={class:`mt-3`},y={class:`mt-3 dl-secondary`},b={__name:`class.md__slidev_15`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=d();return C.setup(),(d,b)=>{let x=r(`click`);return u(),s(p,l(t(a(f)(a(D),14))),{default:n(()=>[b[27]||=i(`h1`,null,`The sentence we will use all lecture`,-1),i(`div`,m,[i(`div`,null,[(u(),o(`svg`,h,[b[2]||=i(`rect`,{class:`dl-dg-box`,x:`10`,y:`8`,width:`112`,height:`28`,rx:`4`},null,-1),b[3]||=i(`rect`,{class:`dl-dg-box`,x:`150`,y:`8`,width:`112`,height:`28`,rx:`4`},null,-1),b[4]||=i(`rect`,{class:`dl-dg-box is-accent`,x:`290`,y:`8`,width:`112`,height:`28`,rx:`4`},null,-1),b[5]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`66`,y:`27`,"text-anchor":`middle`,style:{"font-style":`italic`}},`the`,-1),b[6]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`206`,y:`27`,"text-anchor":`middle`,style:{"font-style":`italic`}},`river`,-1),b[7]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`346`,y:`27`,"text-anchor":`middle`,style:{"font-style":`italic`}},`bank`,-1),b[8]||=i(`line`,{class:`dl-dg-split`,x1:`10`,y1:`150`,x2:`122`,y2:`150`},null,-1),b[9]||=i(`line`,{class:`dl-dg-split`,x1:`150`,y1:`150`,x2:`262`,y2:`150`},null,-1),b[10]||=i(`line`,{class:`dl-dg-split`,x1:`290`,y1:`150`,x2:`402`,y2:`150`},null,-1),b[11]||=i(`text`,{class:`dl-dg-small`,x:`24`,y:`166`,"text-anchor":`middle`},`det`,-1),b[12]||=i(`text`,{class:`dl-dg-small`,x:`52`,y:`180`,"text-anchor":`middle`},`water`,-1),b[13]||=i(`text`,{class:`dl-dg-small`,x:`80`,y:`166`,"text-anchor":`middle`},`money`,-1),b[14]||=i(`text`,{class:`dl-dg-small`,x:`108`,y:`180`,"text-anchor":`middle`},`thing`,-1),b[15]||=i(`text`,{class:`dl-dg-small`,x:`164`,y:`166`,"text-anchor":`middle`},`det`,-1),b[16]||=i(`text`,{class:`dl-dg-small`,x:`192`,y:`180`,"text-anchor":`middle`},`water`,-1),b[17]||=i(`text`,{class:`dl-dg-small`,x:`220`,y:`166`,"text-anchor":`middle`},`money`,-1),b[18]||=i(`text`,{class:`dl-dg-small`,x:`248`,y:`180`,"text-anchor":`middle`},`thing`,-1),b[19]||=i(`text`,{class:`dl-dg-small`,x:`304`,y:`166`,"text-anchor":`middle`},`det`,-1),b[20]||=i(`text`,{class:`dl-dg-small`,x:`332`,y:`180`,"text-anchor":`middle`},`water`,-1),b[21]||=i(`text`,{class:`dl-dg-small`,x:`360`,y:`166`,"text-anchor":`middle`},`money`,-1),b[22]||=i(`text`,{class:`dl-dg-small`,x:`388`,y:`180`,"text-anchor":`middle`},`thing`,-1),e((u(),o(`g`,null,[...b[0]||=[i(`rect`,{class:`dl-dg-bar`,x:`14`,y:`110`,width:`20`,height:`40`},null,-1),i(`text`,{class:`dl-dg-small`,x:`24`,y:`104`,"text-anchor":`middle`},`1`,-1),i(`rect`,{class:`dl-dg-bar`,x:`182`,y:`70`,width:`20`,height:`80`},null,-1),i(`text`,{class:`dl-dg-small`,x:`192`,y:`64`,"text-anchor":`middle`},`2`,-1),i(`rect`,{class:`dl-dg-bar`,x:`238`,y:`110`,width:`20`,height:`40`},null,-1),i(`text`,{class:`dl-dg-small`,x:`248`,y:`104`,"text-anchor":`middle`},`1`,-1)]])),[[x]]),e((u(),o(`g`,null,[...b[1]||=[i(`rect`,{class:`dl-dg-bar is-q`,x:`378`,y:`70`,width:`20`,height:`80`},null,-1),i(`text`,{class:`dl-dg-small`,x:`388`,y:`64`,"text-anchor":`middle`},`2`,-1)]])),[[x]])]))]),i(`div`,g,[b[25]||=i(`p`,null,[c(`Four embedding numbers per word. We pretend they mean `),i(`strong`,null,`det`),c(` (a word like `),i(`em`,null,`the`),c(`), `),i(`strong`,null,`water`),c(`, `),i(`strong`,null,`money`),c(` and `),i(`strong`,null,`thing`),c(`.`)],-1),e((u(),o(`div`,_,[...b[23]||=[i(`p`,null,[i(`em`,null,`bank`),c(` is a thing, and `),i(`strong`,null,`nothing else`),c(`. Nothing says riverbank or high-street bank.`)],-1)]])),[[x]]),e((u(),o(`div`,v,[...b[24]||=[i(`p`,null,`So the sense has to come from a neighbour. Attention is how it gets there.`,-1)]])),[[x]])])]),e((u(),o(`div`,y,[...b[26]||=[i(`p`,null,`Hand-picked numbers, so you can check the arithmetic. Real coordinates have no names.`,-1)]])),[[x]])]),_:1},16)}}};export{b as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-BMxY1hjv.js b/lecture-06/class/assets/md-BMxY1hjv.js new file mode 100644 index 0000000000000000000000000000000000000000..7efe67e4e24e7b3c4b8c1ade5f3bc45049c32d9f --- /dev/null +++ b/lecture-06/class/assets/md-BMxY1hjv.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,W as i,_ as a,_t as o,b as s,v as c,x as l,yt as u,z as d}from"./modules/shiki-BFOesOFp.js";import{n as f,t as p}from"./slidev/context-DrkI8qiD.js";import{t as m}from"./slidev/VClicks-Dmx1KjZv.js";import{t as h}from"./interactive-CI8hm4xw.js";import{t as g}from"./PositionalEncoding-CZmL_mXL.js";var _={class:`mt-2 dl-callout`},v={__name:`class.md__slidev_24`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=g,b=m,x=i(`click`);return d(),c(h,u(t(o(p)(o(T),23))),{aside:n(t=>[v[2]||=a(`p`,null,[l(`Press `),a(`strong`,null,`Shuffle the words`),l(`, then read the vectors.`)],-1),r(b,null,{default:n(()=>[...v[0]||=[a(`ul`,null,[a(`li`,null,[l(`Every word’s output is `),a(`strong`,null,`exactly`),l(` what it was`)]),a(`li`,null,[l(`A weighted sum is a sum over a `),a(`strong`,null,`set`),l(`. A set has no order`)]),a(`li`,null,[a(`em`,null,`the river bank`),l(` and `),a(`em`,null,`bank river the`),l(` look the same`)])],-1)]]),_:1}),e((d(),s(`div`,_,[...v[1]||=[a(`p`,null,`A recurrent network knew the order, because it read in order. We have just thrown that away.`,-1)]])),[[x]])]),default:n(()=>[r(y,{mode:`blind`})]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-BTnUhx7N.css b/lecture-06/class/assets/md-BTnUhx7N.css new file mode 100644 index 0000000000000000000000000000000000000000..5372cc352f33a9e35fbe353891a4e3c61feb156d --- /dev/null +++ b/lecture-06/class/assets/md-BTnUhx7N.css @@ -0,0 +1 @@ +.dl-stack[data-v-66f48009]{width:100%;height:100%}.dl-stack__spine[data-v-66f48009]{stroke:var(--dl-border);stroke-width:2px;color:var(--dl-border)}.dl-stack__box[data-v-66f48009]{fill:var(--dl-bg);stroke:var(--dl-border);stroke-width:1.3px;transition:fill .2s,stroke .2s}.dl-stack__box.is-seen[data-v-66f48009]{fill:var(--dl-surface);stroke:var(--dl-body)}.dl-stack__box.is-current[data-v-66f48009]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:2.2px}.dl-stack__label[data-v-66f48009]{fill:var(--dl-muted);font-size:11.5px;font-weight:600;transition:fill .2s}.dl-stack__label.is-seen[data-v-66f48009],.dl-stack__label.is-current[data-v-66f48009]{fill:var(--dl-heading)}.dl-stack__sub[data-v-66f48009]{fill:var(--dl-muted);font-size:8.8px}.dl-stack__sub.is-current[data-v-66f48009]{fill:var(--dl-accent-strong)}.dl-stack__repeat[data-v-66f48009]{fill:none;stroke:var(--dl-border);stroke-width:1.2px;stroke-dasharray:5 4;transition:stroke .2s}.dl-stack__repeat.is-current[data-v-66f48009]{stroke:var(--dl-accent)}.dl-stack__repeatlabel[data-v-66f48009]{fill:var(--dl-muted);font-size:11px;font-weight:700}.dl-stack__repeatlabel.is-current[data-v-66f48009]{fill:var(--dl-accent)}.dl-stack__cross[data-v-66f48009]{fill:none;stroke:var(--dl-border);stroke-width:1.6px;color:var(--dl-border);transition:stroke .2s}.dl-stack__cross.is-seen[data-v-66f48009]{stroke:var(--dl-body);color:var(--dl-body)}.dl-stack__cross.is-current[data-v-66f48009]{stroke:var(--dl-accent);color:var(--dl-accent);stroke-width:2.2px}.dl-stack__crosslabel[data-v-66f48009]{fill:var(--dl-muted);opacity:0;font-size:9px;transition:opacity .2s}.dl-stack__crosslabel.is-seen[data-v-66f48009],.dl-stack__crosslabel.is-current[data-v-66f48009]{opacity:1}.dl-stack__crosslabel.is-current[data-v-66f48009]{fill:var(--dl-accent);font-weight:700}.dl-stack__add[data-v-66f48009]{fill:var(--dl-bg);stroke:var(--dl-border);stroke-width:1.4px}.dl-stack__add.is-seen[data-v-66f48009]{stroke:var(--dl-body)}.dl-stack__add.is-current[data-v-66f48009]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:2.2px}.dl-stack__plus[data-v-66f48009]{fill:var(--dl-heading);font-size:12px;font-weight:700}.dl-stack__pe[data-v-66f48009]{fill:var(--dl-muted);font-size:9px}.dl-stack__pe.is-current[data-v-66f48009]{fill:var(--dl-accent);font-weight:700}.dl-stack__port[data-v-66f48009]{fill:var(--dl-muted);font-size:10px;transition:fill .2s}.dl-stack__port.is-current[data-v-66f48009]{fill:var(--dl-accent);font-weight:700}.dl-stack__side[data-v-66f48009]{fill:var(--dl-muted);letter-spacing:.09em;font-size:9.5px} diff --git a/lecture-06/class/assets/md-BYyZKhcj.js b/lecture-06/class/assets/md-BYyZKhcj.js new file mode 100644 index 0000000000000000000000000000000000000000..59034f5d92ebb3fccc5fd31fb9b5c6c8b441e7d8 --- /dev/null +++ b/lecture-06/class/assets/md-BYyZKhcj.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,W as i,_ as a,_t as o,b as s,v as c,x as l,yt as u,z as d}from"./modules/shiki-BFOesOFp.js";import{n as f,t as p}from"./slidev/context-DrkI8qiD.js";import{t as m}from"./slidev/VClicks-Dmx1KjZv.js";import{t as h}from"./interactive-CI8hm4xw.js";import{t as g}from"./PositionalEncoding-CZmL_mXL.js";var _={class:`mt-2 dl-callout`},v={__name:`class.md__slidev_25`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=g,b=m,x=i(`click`);return d(),c(h,u(t(o(p)(o(T),24))),{aside:n(t=>[v[2]||=a(`p`,null,[l(`One fixed vector per position, `),a(`strong`,null,`added`),l(` to the embedding before block one.`)],-1),r(b,null,{default:n(()=>[...v[0]||=[a(`ul`,null,[a(`li`,null,`Left dimensions flip fast; right ones barely move`),a(`li`,null,[l(`So one vector carries `),a(`em`,null,`which word`),l(` and `),a(`em`,null,`which end`),l(` at once`)]),a(`li`,null,[l(`Sines and cosines. `),a(`strong`,null,`Nothing learned`),l(`, no maximum length`)])],-1)]]),_:1}),e((d(),s(`div`,_,[...v[1]||=[a(`p`,null,`Added, not concatenated — the model never gets wider.`,-1)]])),[[x]])]),default:n(()=>[r(y,{mode:`sinusoid`,"d-model":16,positions:12})]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-BZqsqFo42.js b/lecture-06/class/assets/md-BZqsqFo42.js new file mode 100644 index 0000000000000000000000000000000000000000..21a44d0e8311984864a1c5c5392d5863db908820 --- /dev/null +++ b/lecture-06/class/assets/md-BZqsqFo42.js @@ -0,0 +1 @@ +import{E as e,Q as t,S as n,_ as r,_t as i,v as a,yt as o,z as s}from"./modules/shiki-BFOesOFp.js";import{n as c,t as l}from"./slidev/context-DrkI8qiD.js";import{t as u}from"./TransformerGlyph-D9TehqNe.js";import{t as d}from"./section-C2g2VRmZ.js";var f={class:`absolute right-18 top-1/2 -translate-y-1/2`},p={__name:`class.md__slidev_41`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return s(),a(d,o(e(i(l)(i(b),40))),{default:t(()=>[p[0]||=r(`h1`,null,`Where that leaves us`,-1),p[1]||=r(`p`,null,`One idea, applied twice per block.`,-1),r(`div`,f,[n(m,{kind:`block`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-Bas86k082.js b/lecture-06/class/assets/md-Bas86k082.js new file mode 100644 index 0000000000000000000000000000000000000000..4365d399a6d2566dd29e71c9142307500ff8d7bd --- /dev/null +++ b/lecture-06/class/assets/md-Bas86k082.js @@ -0,0 +1,3 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,_ as o,_t as s,b as c,g as l,lt as u,m as d,v as f,vt as p,w as m,x as h,xt as g,y as _,yt as v,z as y}from"./modules/shiki-BFOesOFp.js";import{t as ee}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as b,t as x}from"./slidev/context-DrkI8qiD.js";import{t as S}from"./slidev/VClicks-Dmx1KjZv.js";import{n as C,t as w}from"./interactive-CI8hm4xw.js";import{t as T}from"./StepButton-BcP33F-1.js";var E=[`viewBox`,`aria-label`],D=[`x1`,`y1`,`x2`,`y2`],te=[`x`,`y`],ne=[`x`,`y`],re=[`d`],ie={key:0},ae=[`cx`,`cy`],oe=[`x`,`y`],se={key:1},O=[`y`],k=[`x`,`y`],A=[`x`,`y`],j=[`x`,`y`,`transform`],M=440,N=48,P=244,F=132,I=34,L=12,R=26,z=72,B=ee(m({__name:`TransformerBlock`,props:{variant:{default:`post`},switchable:{type:Boolean,default:!0},start:{default:`walk`}},setup(e){let{$slidev:t,$nav:a,$clicksContext:m,$clicks:v,$page:ee,$renderContext:x,$frontmatter:S}=b(),w=e,B=u(w.variant),V=u(0),H=u(w.start===`whole`),U=[{kind:`box`,label:`Multi-head self-attention`,sub:`positions mix here — and only here`,note:`Every position builds a new vector as a weighted sum over every position. This is the only part of the whole architecture where information moves sideways between tokens.`,sublayer:!0},{kind:`add`,label:`add`,note:`The residual connection: the sub-layer’s output is *added* to what came in, not substituted for it. Same trick as a ResNet, and for the same reason — it gives the gradient a path with no matrix on it.`},{kind:`box`,label:`LayerNorm`,sub:`per position, across features`,note:`Re-centre and re-scale each position’s vector using its own mean and variance. Not BatchNorm: nothing is shared across the batch or across positions, which is what makes it safe with variable-length sequences.`},{kind:`box`,label:`Feed-forward network`,sub:`each position alone — 4× wide`,note:`Two linear layers with a non-linearity between them, applied to every position separately with the same weights. No token sees another here. This is where two thirds of a block’s parameters live.`,sublayer:!0},{kind:`add`,label:`add`,note:`The second residual, around the feed-forward network.`},{kind:`box`,label:`LayerNorm`,sub:`per position, across features`,note:`And normalise again. In the 2017 wiring both norms sit *after* the add — which means they sit on the residual path itself.`}],W=[{kind:`box`,label:`LayerNorm`,sub:`RMSNorm in most modern models`,note:`Modern blocks normalise *before* the sub-layer instead of after it. RMSNorm drops the mean-subtraction and the bias and keeps only the rescaling — slightly cheaper, and empirically just as good.`},{kind:`box`,label:`Multi-head self-attention`,sub:`grouped-query, rotary positions`,note:`Still scaled dot-product attention, unchanged since 2017. What changed around it: position now enters by rotating Q and K (RoPE) rather than by adding a vector at the bottom, and several query heads share one key/value head to shrink the cache.`,sublayer:!0},{kind:`add`,label:`add`,note:`The residual — and note what is *not* on it any more. Nothing stands between the input and this add but the sub-layer’s own output.`},{kind:`box`,label:`LayerNorm`,sub:`RMSNorm`,note:`Normalise before the feed-forward network, on a copy of the residual stream rather than on the stream itself.`},{kind:`box`,label:`Feed-forward network`,sub:`SwiGLU — three matrices, not two`,note:`Still position-wise, still wide. The gated variant uses three matrices instead of two, and the hidden width is trimmed (about 8/3 d rather than 4 d) to keep the parameter count level.`,sublayer:!0},{kind:`add`,label:`add`,note:`The second residual. From input to output there is now an unbroken addition-only path through every block in the stack.`}],G=l(()=>B.value===`post`?U:W),ce=l(()=>B.value===`post`?[{from:-1,to:1},{from:2,to:4}]:[{from:-1,to:2},{from:2,to:5}]),K=l(()=>V.value>=G.value.length);function le(){H.value=!1,V.value=K.value?0:V.value+1}function ue(){B.value=B.value===`post`?`pre`:`post`,V.value=0,H.value=w.start===`whole`}function q(e){return H.value||V.value>=e+1}let J=l(()=>V.value===0?null:G.value[V.value-1]);function Y(e){return R+(G.value.length-e)*N}let X=l(()=>Y(-1)+6),Z=R,Q=l(()=>Y(-1)+36);function $(e){return e<0?X.value:Y(e)+(G.value[e].kind===`add`?0:I/2)}return(e,t)=>{let a=T,l=C;return y(),f(l,{"max-width":`30rem`},{controls:n(()=>[r(a,{label:K.value&&!H.value?`Start over`:V.value===0?`Walk the block`:`Next part`,glyph:`▸`,onClick:le},null,8,[`label`]),w.switchable?(y(),f(a,{key:0,label:B.value===`post`?`Rewire: modern (pre-LN)`:`Rewire: 2017 (post-LN)`,variant:`ghost`,glyph:`⇄`,onClick:ue},null,8,[`label`])):_(`v-if`,!0)]),readout:n(()=>[J.value?(y(),c(d,{key:0},[o(`strong`,null,g(J.value.label),1),h(` — `+g(J.value.note),1)],64)):B.value===`post`?(y(),c(d,{key:1},[h(` The 2017 block: attention, add, normalise, feed-forward, add, normalise. Two sub-layers, each wrapped in a residual and a LayerNorm, and the shape at the top is the shape at the bottom — which is what lets you stack six of them, or ninety-six. `)],64)):(y(),c(d,{key:2},[t[1]||=h(` The same two sub-layers, with the normalisation moved `,-1),t[2]||=o(`strong`,null,`before`,-1),t[3]||=h(` each one. Now nothing sits on the residual path: from the bottom of the stack to the top there is a route made only of additions. Post-LN needs a learning-rate warmup to train deep and pre-LN largely does not, which is why essentially every model after GPT-2 is wired this way. `,-1)],64))]),default:n(()=>[(y(),c(`svg`,{class:`dl-blk`,viewBox:`0 0 ${M} ${Q.value}`,preserveAspectRatio:`xMidYMid meet`,role:`img`,"aria-label":`One transformer block, ${B.value===`post`?`with LayerNorm after each sub-layer as in the 2017 paper`:`with normalisation before each sub-layer as in modern models`}`},[t[0]||=o(`defs`,null,[o(`marker`,{id:`dl-blk-arrow`,viewBox:`0 0 8 8`,refX:`7`,refY:`4`,markerWidth:`5`,markerHeight:`5`,orient:`auto-start-reverse`},[o(`path`,{d:`M0,0 L8,4 L0,8 z`,fill:`currentColor`})])],-1),_(` The main path, bottom to top. `),o(`line`,{class:`dl-blk__spine`,x1:254,y1:X.value,x2:254,y2:s(Z)+10,"marker-end":`url(#dl-blk-arrow)`},null,8,D),o(`text`,{class:`dl-blk__port`,x:254,y:X.value+18,"text-anchor":`middle`},` in — (T, d) one vector per token `,8,te),o(`text`,{class:`dl-blk__port`,x:254,y:s(Z)-6,"text-anchor":`middle`},` out — (T, d), same shape, ready for the next block `,8,ne),_(` Residual connections, drawn as a rail down the left. `),(y(!0),c(d,null,i(ce.value,(e,t)=>(y(),c(`path`,{key:`arc${t}`,class:p([`dl-blk__residual`,{"is-lit":H.value||V.value>e.to}]),d:`M 250 ${$(e.from)} + H ${z} V ${$(e.to)} + H 238`,"marker-end":`url(#dl-blk-arrow)`},null,10,re))),128)),(y(!0),c(d,null,i(G.value,(e,t)=>(y(),c(d,{key:e.label+t},[_(` Sub-layer output joining its add. `),e.kind===`add`?(y(),c(`g`,ie,[o(`circle`,{class:p([`dl-blk__add`,{"is-lit":q(t),"is-current":V.value===t+1}]),cx:254,cy:Y(t),r:L},null,10,ae),o(`text`,{class:`dl-blk__plus`,x:254,y:Y(t)+5,"text-anchor":`middle`},`+`,8,oe)])):(y(),c(`g`,se,[o(`rect`,{class:p([`dl-blk__box`,{"is-lit":q(t),"is-current":V.value===t+1,"is-sublayer":e.sublayer}]),x:F,y:Y(t),width:P,height:I,rx:`6`},null,10,O),o(`text`,{class:p([`dl-blk__label`,{"is-lit":q(t)}]),x:254,y:Y(t)+(e.sub?15:22),"text-anchor":`middle`},g(e.label),11,k),e.sub?(y(),c(`text`,{key:0,class:p([`dl-blk__sub`,{"is-lit":q(t)}]),x:254,y:Y(t)+27,"text-anchor":`middle`},g(e.sub),11,A)):_(`v-if`,!0)]))],64))),128)),o(`text`,{class:`dl-blk__rail`,x:64,y:Q.value/2,"text-anchor":`middle`,transform:`rotate(-90 64 ${Q.value/2})`},` residual stream `,8,j)],8,E))]),_:1})}}}),[[`__scopeId`,`data-v-c465f205`]]),V={class:`mt-2 dl-callout`},H={__name:`class.md__slidev_28`,setup(i){let{$slidev:l,$nav:u,$clicksContext:d,$clicks:p,$page:m,$renderContext:g,$frontmatter:_}=b();return d.setup(),(i,l)=>{let u=B,d=S,p=a(`click`);return y(),f(w,v(t(s(x)(s(_),27))),{aside:n(t=>[l[2]||=o(`p`,null,[h(`Press `),o(`strong`,null,`Walk the block`),h(`. Six parts, all of them already met.`)],-1),r(d,null,{default:n(()=>[...l[0]||=[o(`ul`,null,[o(`li`,null,[h(`attention — the `),o(`strong`,null,`only`),h(` sideways step`)]),o(`li`,null,`add — the residual`),o(`li`,null,`norm`),o(`li`,null,`feed-forward — each position alone`),o(`li`,null,`add, norm`)],-1)]]),_:1}),e((y(),c(`div`,V,[...l[1]||=[o(`p`,null,`Same shape at the top as at the bottom. Stack it.`,-1)]])),[[p]])]),default:n(()=>[r(u,{variant:`post`,switchable:!1})]),_:1},16)}}};export{H as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-BimdYeK3.js b/lecture-06/class/assets/md-BimdYeK3.js new file mode 100644 index 0000000000000000000000000000000000000000..077efe46e5c9a829970a3bd8f43b228967d08fc1 --- /dev/null +++ b/lecture-06/class/assets/md-BimdYeK3.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,V as r,W as i,_ as a,_t as o,b as s,m as c,v as l,vt as u,x as d,xt as f,yt as p,z as m}from"./modules/shiki-BFOesOFp.js";import{n as h,t as g}from"./slidev/context-DrkI8qiD.js";import{t as _}from"./default-Cq9fupKf.js";var v={class:`mt-1 flex justify-center`},y={viewBox:`0 0 660 240`,class:`dl-diagram`,style:{"max-height":`12rem`},role:`img`,"aria-label":`The sentence the cat ate the fish because it was hungry. One softmax arc from it lands on cat; dashed lines mark three other questions: nearby noun, previous word, which clause`},b=[`x`],x=[`x`],S={class:`grid grid-cols-2 gap-8 mt-1`},C={class:`dl-callout`},w={__name:`class.md__slidev_22`,setup(w){let{$slidev:T,$nav:E,$clicksContext:D,$clicks:O,$page:k,$renderContext:A,$frontmatter:j}=h();return D.setup(),(h,w)=>{let T=i(`click`);return m(),l(_,p(t(o(g)(o(j),21))),{default:n(()=>[w[5]||=a(`h1`,null,`One softmax can only point at one thing`,-1),w[6]||=a(`p`,null,[d(`To read `),a(`em`,null,`it`),d(`, the model needs several answers at once.`)],-1),a(`div`,v,[(m(),s(`svg`,y,[w[1]||=a(`path`,{class:`dl-dg-grad is-good`,d:`M476 128 Q296 20 116 128`,style:{"stroke-width":`4`}},null,-1),w[2]||=a(`text`,{class:`dl-dg-small is-good`,x:`296`,y:`54`,"text-anchor":`middle`},`one softmax: most weight on one word`,-1),(m(),s(c,null,r([`the`,`cat`,`ate`,`the`,`fish`,`because`,`it`,`was`,`hungry`],(e,t)=>a(`g`,{key:t},[a(`rect`,{class:u(t===6?`dl-dg-box is-accent`:`dl-dg-box`),x:12+t*72,y:`130`,width:`64`,height:`30`,rx:`4`},null,10,b),a(`text`,{class:`dl-dg-lab is-sm`,x:44+t*72,y:`150`,"text-anchor":`middle`},f(e),9,x)])),64)),e((m(),s(`g`,null,[...w[0]||=[a(`path`,{class:`dl-dg-loss`,d:`M116 162 V188`},null,-1),a(`text`,{class:`dl-dg-small`,x:`116`,y:`202`,"text-anchor":`middle`},`what it refers to`,-1),a(`path`,{class:`dl-dg-loss`,d:`M332 162 V188`},null,-1),a(`text`,{class:`dl-dg-small`,x:`332`,y:`202`,"text-anchor":`middle`},`nearby noun`,-1),a(`path`,{class:`dl-dg-loss`,d:`M404 162 V216`},null,-1),a(`text`,{class:`dl-dg-small`,x:`404`,y:`230`,"text-anchor":`middle`},`previous word`,-1),a(`path`,{class:`dl-dg-loss`,d:`M374 172 H634`},null,-1),a(`text`,{class:`dl-dg-small`,x:`560`,y:`190`,"text-anchor":`middle`},`which clause`,-1)]])),[[T]])]))]),a(`div`,S,[e((m(),s(`div`,C,[...w[3]||=[a(`p`,null,[d(`A softmax puts its weight in `),a(`strong`,null,`one`),d(` place. Four questions need four sets of weights.`)],-1)]])),[[T]]),e((m(),s(`div`,null,[...w[4]||=[a(`p`,null,[d(`So run attention `),a(`strong`,null,`several times side by side`),d(`, each copy with its own `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`W`),a(`mi`,null,`Q`)])]),a(`annotation`,{encoding:`application/x-tex`},`W_Q`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9694em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3283em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`Q`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])])]),d(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`W`),a(`mi`,null,`K`)])]),a(`annotation`,{encoding:`application/x-tex`},`W_K`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3283em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0715em`}},`K`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])]),d(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`W`),a(`mi`,null,`V`)])]),a(`annotation`,{encoding:`application/x-tex`},`W_V`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3283em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.2222em`}},`V`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])]),d(`. Each copy is a `),a(`strong`,null,`head`),d(`.`)],-1)]])),[[T]])])]),_:1},16)}}};export{w as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-BmvwA0Nf.js b/lecture-06/class/assets/md-BmvwA0Nf.js new file mode 100644 index 0000000000000000000000000000000000000000..ef448977d1445fee9f397a934ea957a6a9343cdf --- /dev/null +++ b/lecture-06/class/assets/md-BmvwA0Nf.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,_ as o,_t as s,b as c,m as l,v as u,x as d,yt as f,z as p}from"./modules/shiki-BFOesOFp.js";import{n as m,t as h}from"./slidev/context-DrkI8qiD.js";import{t as g}from"./slidev/VClicks-Dmx1KjZv.js";import{t as _}from"./default-Cq9fupKf.js";var v={class:`grid grid-cols-2 gap-8 mt-2 items-start`},y={viewBox:`0 0 330 200`,class:`dl-diagram`,role:`img`,"aria-label":`Score grids: 4 words give a 4 by 4 grid of 16 scores; 8 words give an 8 by 8 grid of 64 scores, four times as many`,style:{"max-height":`15rem`}},b=[`x`,`y`],x=[`x`,`y`],S={class:`dl-tight`},C={class:`mt-3 dl-callout`},w={class:`mt-3 dl-secondary`},T={__name:`class.md__slidev_29`,setup(T){let{$slidev:E,$nav:D,$clicksContext:O,$clicks:k,$page:A,$renderContext:j,$frontmatter:M}=m();return O.setup(),(m,T)=>{let E=g,D=a(`click`);return p(),u(_,f(t(s(h)(s(M),28))),{default:n(()=>[T[6]||=o(`h1`,null,`The bill for looking everywhere`,-1),T[7]||=o(`p`,null,[d(`The score matrix is `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`T`),o(`mo`,null,`×`),o(`mi`,null,`T`)]),o(`annotation`,{encoding:`application/x-tex`},`T \\times T`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.7667em`,"vertical-align":`-0.0833em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mbin`},`×`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`)])])]),d(`: every position scores every position.`)],-1),o(`div`,v,[o(`div`,null,[(p(),c(`svg`,y,[T[1]||=o(`text`,{class:`dl-dg-small`,x:`10`,y:`16`},`query × key`,-1),(p(),c(l,null,i(16,e=>o(`rect`,{key:`a`+e,class:`dl-dg-box is-accent`,x:10+(e-1)%4*18,y:30+Math.floor((e-1)/4)*18,width:`16`,height:`16`,rx:`2`},null,8,b)),64)),T[2]||=o(`text`,{class:`dl-dg-small`,x:`10`,y:`122`},`T = 4: 16 scores`,-1),e((p(),c(`g`,null,[(p(),c(l,null,i(64,e=>o(`rect`,{key:`b`+e,class:`dl-dg-box`,x:160+(e-1)%8*18,y:30+Math.floor((e-1)/8)*18,width:`16`,height:`16`,rx:`2`},null,8,x)),64)),T[0]||=o(`text`,{class:`dl-dg-small`,x:`160`,y:`190`},`T = 8: 64 scores, 4 ×`,-1)])),[[D]])]))]),o(`div`,S,[r(E,null,{default:n(()=>[...T[3]||=[o(`ul`,null,[o(`li`,null,[d(`512 tokens → 262 144 scores `),o(`strong`,null,`per head, per layer`)])],-1)]]),_:1}),e((p(),c(`div`,C,[...T[4]||=[o(`p`,null,[d(`An RNN took `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`T`)]),o(`annotation`,{encoding:`application/x-tex`},`T`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`)])])]),d(` steps, one after another. Attention takes `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`msup`,null,[o(`mi`,null,`T`),o(`mn`,null,`2`)])]),o(`annotation`,{encoding:`application/x-tex`},`T^2`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.8141em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.8141em`}},[o(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},`2`)])])])])])])])])])]),d(`, all at once: more work, far less waiting.`)],-1)]])),[[D]]),e((p(),c(`div`,w,[...T[5]||=[o(`p`,null,[d(`Caveat: the feed-forward network grows like `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`T`),o(`msup`,null,[o(`mi`,null,`d`),o(`mn`,null,`2`)])]),o(`annotation`,{encoding:`application/x-tex`},`T d^2`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.8141em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`},`d`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.8141em`}},[o(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},`2`)])])])])])])])])])]),d(`, attention like `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`msup`,null,[o(`mi`,null,`T`),o(`mn`,null,`2`)]),o(`mi`,null,`d`)]),o(`annotation`,{encoding:`application/x-tex`},`T^2 d`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.8141em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.8141em`}},[o(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},`2`)])])])])])])]),o(`span`,{class:`mord mathnormal`},`d`)])])]),d(`. At `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`T`),o(`mo`,null,`=`),o(`mi`,null,`d`),o(`mo`,null,`=`),o(`mn`,null,`512`)]),o(`annotation`,{encoding:`application/x-tex`},`T = d = 512`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`=`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),o(`span`,{class:`mord mathnormal`},`d`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`=`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),o(`span`,{class:`mord`},`512`)])])]),d(`, attention is not yet the expensive part.`)],-1)]])),[[D]])])])]),_:1},16)}}};export{T as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-BnAqCEYv2.js b/lecture-06/class/assets/md-BnAqCEYv2.js new file mode 100644 index 0000000000000000000000000000000000000000..70ffb5ffe8ccc9c37e028e47e5c7950316448dd6 --- /dev/null +++ b/lecture-06/class/assets/md-BnAqCEYv2.js @@ -0,0 +1 @@ +import{E as e,Q as t,S as n,_ as r,_t as i,v as a,yt as o,z as s}from"./modules/shiki-BFOesOFp.js";import{n as c,t as l}from"./slidev/context-DrkI8qiD.js";import{t as u}from"./TransformerGlyph-D9TehqNe.js";import{t as d}from"./section-C2g2VRmZ.js";var f={class:`absolute right-18 top-1/2 -translate-y-1/2`},p={__name:`class.md__slidev_3`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return s(),a(d,o(e(i(l)(i(b),2))),{default:t(()=>[p[0]||=r(`h1`,null,`Delete the recurrence`,-1),r(`div`,f,[n(m,{kind:`cut`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-Bq0k6Ht_.js b/lecture-06/class/assets/md-Bq0k6Ht_.js new file mode 100644 index 0000000000000000000000000000000000000000..6245903f1fe5fd5e4dae936d2ee226762d580a9e --- /dev/null +++ b/lecture-06/class/assets/md-Bq0k6Ht_.js @@ -0,0 +1 @@ +import{E as e,Q as t,S as n,_ as r,_t as i,v as a,yt as o,z as s}from"./modules/shiki-BFOesOFp.js";import{n as c,t as l}from"./slidev/context-DrkI8qiD.js";import{t as u}from"./TransformerGlyph-D9TehqNe.js";import{t as d}from"./section-C2g2VRmZ.js";var f={class:`absolute right-18 top-1/2 -translate-y-1/2`},p={__name:`class.md__slidev_7`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return s(),a(d,o(e(i(l)(i(b),6))),{default:t(()=>[p[0]||=r(`h1`,null,`The whole architecture first`,-1),p[1]||=r(`p`,null,`One stack reads, one stack writes.`,-1),r(`div`,f,[n(m,{kind:`encdec`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-BsO5ZW2F.js b/lecture-06/class/assets/md-BsO5ZW2F.js new file mode 100644 index 0000000000000000000000000000000000000000..ae9ea341aa94b5d9c7a6b72930f4000cfaea6943 --- /dev/null +++ b/lecture-06/class/assets/md-BsO5ZW2F.js @@ -0,0 +1 @@ +import{E as e,H as t,Q as n,S as r,_ as i,_t as a,b as o,v as s,w as c,xt as l,y as u,yt as d,z as f}from"./modules/shiki-BFOesOFp.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as m,t as h}from"./slidev/context-DrkI8qiD.js";import{t as g}from"./TransformerGlyph-D9TehqNe.js";var _={class:`slidev-layout dl-end`},v={class:`dl-end__body`},y={class:`dl-end__meta`},b={key:0,class:`dl-end__next`},x=[`href`],S=p(c({__name:`end`,props:{email:{},next:{}},setup(e){let{$slidev:n,$nav:r,$clicksContext:a,$clicks:s,$page:c,$renderContext:d,$frontmatter:p}=m(),h=e;return(e,n)=>(f(),o(`div`,_,[i(`div`,v,[t(e.$slots,`default`,{},void 0,!0)]),n[0]||=i(`div`,{class:`dl-rule`},null,-1),i(`div`,y,[h.next?(f(),o(`span`,b,`Next: `+l(h.next),1)):u(`v-if`,!0),h.email?(f(),o(`a`,{key:1,href:`mailto:${h.email}`},l(h.email),9,x)):u(`v-if`,!0)])]))}}),[[`__scopeId`,`data-v-f8d31aa3`]]),C={class:`mx-auto mt-2`,style:{width:`150px`}},w={__name:`class.md__slidev_44`,setup(t){let{$slidev:o,$nav:c,$clicksContext:l,$clicks:u,$page:p,$renderContext:_,$frontmatter:v}=m();return l.setup(),(t,o)=>{let c=g;return f(),s(S,d(e(a(h)(a(v),43))),{default:n(()=>[o[0]||=i(`h1`,null,`Questions?`,-1),i(`div`,C,[r(c,{kind:`decoder`,size:150})])]),_:1},16)}}};export{w as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-BtB6vj0a2.js b/lecture-06/class/assets/md-BtB6vj0a2.js new file mode 100644 index 0000000000000000000000000000000000000000..bf4a5de733394c6161691e26182d8f5a34d57d94 --- /dev/null +++ b/lecture-06/class/assets/md-BtB6vj0a2.js @@ -0,0 +1 @@ +import{E as e,Q as t,S as n,_ as r,_t as i,v as a,yt as o,z as s}from"./modules/shiki-BFOesOFp.js";import{n as c,t as l}from"./slidev/context-DrkI8qiD.js";import{t as u}from"./TransformerGlyph-D9TehqNe.js";import{t as d}from"./section-C2g2VRmZ.js";var f={class:`absolute right-18 top-1/2 -translate-y-1/2`},p={__name:`class.md__slidev_38`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return s(),a(d,o(e(i(l)(i(b),37))),{default:t(()=>[p[0]||=r(`h1`,null,`In PyTorch`,-1),p[1]||=r(`p`,null,`Everything you computed by hand, as code.`,-1),r(`div`,f,[n(m,{kind:`code`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-BxdQ0RGt.js b/lecture-06/class/assets/md-BxdQ0RGt.js new file mode 100644 index 0000000000000000000000000000000000000000..3f5ce75fcdefe23c39f07e9acf4b7b4a2adf9aaa --- /dev/null +++ b/lecture-06/class/assets/md-BxdQ0RGt.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,W as i,_ as a,_t as o,b as s,v as c,x as l,yt as u,z as d}from"./modules/shiki-BFOesOFp.js";import{n as f,t as p}from"./slidev/context-DrkI8qiD.js";import{t as m}from"./slidev/VClicks-Dmx1KjZv.js";import{t as h}from"./interactive-CI8hm4xw.js";import{t as g}from"./AttentionMatrix-D2xrh-OL.js";var _={class:`mt-2 dl-callout`},v={__name:`class.md__slidev_19`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=g,b=m,x=i(`click`);return d(),c(h,u(t(o(p)(o(T),18))),{aside:n(t=>[v[2]||=a(`p`,null,[l(`All three rows. Rows `),a(`strong`,null,`ask`),l(`, columns `),a(`strong`,null,`are read`),l(`.`)],-1),r(b,null,{default:n(()=>[...v[0]||=[a(`ul`,null,[a(`li`,null,[a(`em`,null,`the`),l(` asks nothing, so its row is flat: 0.33 each`)]),a(`li`,null,[a(`em`,null,`bank`),l(`’s row is the one we just derived`)]),a(`li`,null,[l(`Every row sums to `),a(`strong`,null,`1`)])],-1)]]),_:1}),e((d(),s(`div`,_,[...v[1]||=[a(`p`,null,[l(`No cell depends on another, so all nine are computed `),a(`strong`,null,`at the same time`),l(`. The wall comes down.`)],-1)]])),[[x]])]),default:n(()=>[r(y,{maskable:!1,switchable:``})]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-C3JZnPAz.js b/lecture-06/class/assets/md-C3JZnPAz.js new file mode 100644 index 0000000000000000000000000000000000000000..041f9d5d2847601ea9d34a4519ac4945c5962415 --- /dev/null +++ b/lecture-06/class/assets/md-C3JZnPAz.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,W as r,_ as i,_t as a,b as o,v as s,x as c,yt as l,z as u}from"./modules/shiki-BFOesOFp.js";import{n as d,t as f}from"./slidev/context-DrkI8qiD.js";import{t as p}from"./default-Cq9fupKf.js";var m={class:`mt-1 flex justify-center`},h={viewBox:`0 0 620 132`,class:`dl-diagram`,style:{"max-height":`11rem`},role:`img`,"aria-label":`Four boxes in a row — score, scale, softmax, mix — with the bank row after each: 0 2 0, then 0 1.41 0, then 0.16 0.67 0.16, then a new vector for bank`},g={class:`mt-3 dl-callout`},_={__name:`class.md__slidev_17`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=d();return b.setup(),(d,_)=>{let v=r(`click`);return u(),s(p,l(t(a(f)(a(w),16))),{default:n(()=>[_[7]||=i(`h1`,null,`Four steps, and that is the whole mechanism`,-1),i(`div`,m,[(u(),o(`svg`,h,[_[4]||=i(`defs`,null,[i(`marker`,{id:`l6s1-steps`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),_[5]||=i(`text`,{class:`dl-dg-small`,x:`10`,y:`12`},`the bank row of "the river bank"`,-1),e((u(),o(`g`,null,[..._[0]||=[i(`rect`,{class:`dl-dg-box`,x:`10`,y:`22`,width:`130`,height:`40`,rx:`4`},null,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`75`,y:`47`,"text-anchor":`middle`},`1 · score`,-1),i(`text`,{class:`dl-dg-in`,x:`75`,y:`90`,"text-anchor":`middle`},`0, 2, 0`,-1),i(`text`,{class:`dl-dg-small`,x:`75`,y:`110`,"text-anchor":`middle`},`q · k, every key`,-1)]])),[[v]]),e((u(),o(`g`,null,[..._[1]||=[i(`path`,{class:`dl-dg-arrow`,d:`M140 42 H162`,"marker-end":`url(#l6s1-steps)`},null,-1),i(`rect`,{class:`dl-dg-box`,x:`166`,y:`22`,width:`130`,height:`40`,rx:`4`},null,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`231`,y:`47`,"text-anchor":`middle`},`2 · scale`,-1),i(`text`,{class:`dl-dg-in`,x:`231`,y:`90`,"text-anchor":`middle`},`0, 1.41, 0`,-1),i(`text`,{class:`dl-dg-small`,x:`231`,y:`110`,"text-anchor":`middle`},`÷ √2`,-1)]])),[[v]]),e((u(),o(`g`,null,[..._[2]||=[i(`path`,{class:`dl-dg-arrow`,d:`M296 42 H318`,"marker-end":`url(#l6s1-steps)`},null,-1),i(`rect`,{class:`dl-dg-box`,x:`322`,y:`22`,width:`130`,height:`40`,rx:`4`},null,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`387`,y:`47`,"text-anchor":`middle`},`3 · softmax`,-1),i(`text`,{class:`dl-dg-in`,x:`387`,y:`90`,"text-anchor":`middle`},`0.16, 0.67, 0.16`,-1),i(`text`,{class:`dl-dg-small`,x:`387`,y:`110`,"text-anchor":`middle`},`positive, sum to 1`,-1)]])),[[v]]),e((u(),o(`g`,null,[..._[3]||=[i(`path`,{class:`dl-dg-arrow`,d:`M452 42 H474`,"marker-end":`url(#l6s1-steps)`},null,-1),i(`rect`,{class:`dl-dg-box is-accent`,x:`478`,y:`22`,width:`130`,height:`40`,rx:`4`},null,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`543`,y:`47`,"text-anchor":`middle`},`4 · mix`,-1),i(`text`,{class:`dl-dg-in`,x:`543`,y:`90`,"text-anchor":`middle`},`new vector for bank`,-1),i(`text`,{class:`dl-dg-small`,x:`543`,y:`110`,"text-anchor":`middle`},`weighted sum of values`,-1)]])),[[v]])]))]),_[8]||=i(`div`,{class:`dl-tight mt-2`},[i(`p`,null,[c(`The score `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msub`,null,[i(`mi`,null,`e`),i(`mrow`,null,[i(`mi`,null,`i`),i(`mi`,null,`j`)])]),i(`mo`,null,`=`),i(`msub`,null,[i(`mi`,{mathvariant:`bold`},`q`),i(`mi`,null,`i`)]),i(`mo`,null,`⋅`),i(`msub`,null,[i(`mi`,{mathvariant:`bold`},`k`),i(`mi`,null,`j`)])]),i(`annotation`,{encoding:`application/x-tex`},`e_{ij} = \\mathbf{q}_i \\cdot \\mathbf{k}_j`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`e`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3117em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`ij`)])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2861em`}},[i(`span`)])])])])]),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6389em`,"vertical-align":`-0.1944em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathbf`},`q`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3117em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`},`i`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])]),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),i(`span`,{class:`mbin`},`⋅`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.9805em`,"vertical-align":`-0.2861em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathbf`},`k`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3117em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2861em`}},[i(`span`)])])])])])])])]),c(` is large when query `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`i`)]),i(`annotation`,{encoding:`application/x-tex`},`i`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6595em`}}),i(`span`,{class:`mord mathnormal`},`i`)])])]),c(` and key `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`j`)]),i(`annotation`,{encoding:`application/x-tex`},`j`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.854em`,"vertical-align":`-0.1944em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0572em`}},`j`)])])]),c(` point the same way. `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msub`,null,[i(`mi`,null,`d`),i(`mi`,null,`k`)])]),i(`annotation`,{encoding:`application/x-tex`},`d_k`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.8444em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`d`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3361em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])]),c(` is the key width.`)])],-1),e((u(),o(`div`,g,[..._[6]||=[i(`p`,null,`Score, scale, softmax, mix. Steps 1, 3 and 4 are the 2014 attention. Step 2 is new, and it is one division.`,-1)]])),[[v]])]),_:1},16)}}};export{_ as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-C4a87Mz_.js b/lecture-06/class/assets/md-C4a87Mz_.js new file mode 100644 index 0000000000000000000000000000000000000000..688a3a3b02535615116bf6881ecae65478d5f8c3 --- /dev/null +++ b/lecture-06/class/assets/md-C4a87Mz_.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,_ as o,_t as s,b as c,m as l,v as u,x as d,xt as f,yt as p,z as m}from"./modules/shiki-BFOesOFp.js";import{n as h,t as g}from"./slidev/context-DrkI8qiD.js";import{t as _}from"./slidev/VClicks-Dmx1KjZv.js";import{t as v}from"./default-Cq9fupKf.js";var y={class:`grid grid-cols-2 gap-8 mt-2 dl-tight`},b={viewBox:`0 0 400 190`,class:`dl-diagram`,role:`img`,"aria-label":`Five words of text give four next-word training examples: each word predicts the word after it`},x=[`x`],S=[`x`],C=[`d`],w=[`x`],T=[`x`],E={class:`mt-3 dl-callout`},D={__name:`class.md__slidev_36`,setup(D){let{$slidev:O,$nav:k,$clicksContext:A,$clicks:j,$page:M,$renderContext:N,$frontmatter:P}=h();return A.setup(),(h,D)=>{let O=_,k=a(`click`);return m(),u(v,p(t(s(g)(s(P),35))),{default:n(()=>[D[5]||=o(`h1`,null,`Why decoder-only took over`,-1),D[6]||=o(`p`,null,[d(`Not the most expressive design. The one with the most `),o(`strong`,null,`training data`),d(`.`)],-1),o(`div`,y,[o(`div`,null,[(m(),c(`svg`,b,[D[0]||=o(`defs`,null,[o(`marker`,{id:`l6s4-next`,markerWidth:`6`,markerHeight:`6`,refX:`5`,refY:`3`,orient:`auto`},[o(`path`,{class:`dl-dg-head`,d:`M0 0 L6 3 L0 6 z`})])],-1),D[1]||=o(`text`,{class:`dl-dg-small`,x:`6`,y:`24`},`predicts the next word`,-1),(m(),c(l,null,i([`river`,`bank`,`was`,`flooded`],(e,t)=>o(`g`,{key:`p`+t},[o(`rect`,{class:`dl-dg-fill`,x:6+t*78,y:`36`,width:`70`,height:`30`,rx:`4`},null,8,x),o(`text`,{class:`dl-dg-in`,x:41+t*78,y:`56`,"text-anchor":`middle`},f(e),9,S),o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s4-next)`,d:`M${41+t*78} 128 V72`},null,8,C)])),64)),(m(),c(l,null,i([`the`,`river`,`bank`,`was`,`flooded`],(e,t)=>o(`g`,{key:`t`+t},[o(`rect`,{class:`dl-dg-box`,x:6+t*78,y:`130`,width:`70`,height:`30`,rx:`4`},null,8,w),o(`text`,{class:`dl-dg-lab is-sm`,x:41+t*78,y:`150`,"text-anchor":`middle`},f(e),9,T)])),64)),D[2]||=o(`text`,{class:`dl-dg-small is-good`,x:`6`,y:`182`},`5 words of text → 4 training examples, no labels`,-1)]))]),o(`div`,null,[r(O,null,{default:n(()=>[...D[3]||=[o(`ul`,null,[o(`li`,null,[d(`Next-token prediction needs `),o(`strong`,null,`no labels`),d(`: any text is training data`)]),o(`li`,null,[o(`strong`,null,`Every position`),d(` is an example, so one document gives thousands`)]),o(`li`,null,`Any task written as text becomes next-token prediction`),o(`li`,null,`One stack instead of two: simpler to scale and to serve`)],-1)]]),_:1})])]),e((m(),c(`div`,E,[...D[4]||=[o(`p`,null,`The design that won was the one whose training data was free.`,-1)]])),[[k]])]),_:1},16)}}};export{D as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-C9_5NLsW.js b/lecture-06/class/assets/md-C9_5NLsW.js new file mode 100644 index 0000000000000000000000000000000000000000..0bf978d2e0725bc0146c4e55086da37cd0278d8f --- /dev/null +++ b/lecture-06/class/assets/md-C9_5NLsW.js @@ -0,0 +1,257 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,_ as o,_t as s,b as c,g as l,lt as u,m as d,v as f,vt as p,w as m,x as h,xt as g,y as _,yt as v,z as y}from"./modules/shiki-BFOesOFp.js";import{t as b}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as x,t as S}from"./slidev/context-DrkI8qiD.js";import"./index-DvHcJSI0.js";import{t as C}from"./slidev/VClicks-Dmx1KjZv.js";import{n as ee,t as te}from"./interactive-CI8hm4xw.js";import{t as ne}from"./StepButton-BcP33F-1.js";import{t as re}from"./useConvolution-qO1u8ksh.js";import{a as ie,c as ae,i as oe,l as se,o as ce,s as le,t as ue}from"./useAttention-Blk0c2BZ.js";var w=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15e.replace(de,`-$1`).toLowerCase(),pe={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},me=/[&><"']/g,T=e=>String(e).replace(me,e=>pe[e]),he=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?he(e.body[0]):e:e.type===`font`?he(e.body):e,ge=new Set([`mathord`,`textord`,`atom`]),_e=e=>ge.has(he(e).type),ve=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},ye={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format `},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color `,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro `,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness `,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size `,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand `,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function be(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function xe(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:be(Array.isArray(e.type)?e.type[0]:e.type)}function Se(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?xe(r):a?a(i):i}var Ce=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(ye)){var n=ye[t];n&&Se(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new w(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=ve(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},we=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Ne[Pe[this.id]]}sub(){return Ne[Fe[this.id]]}fracNum(){return Ne[Ie[this.id]]}fracDen(){return Ne[Le[this.id]]}cramp(){return Ne[Re[this.id]]}text(){return Ne[ze[this.id]]}isTight(){return this.size>=2}},Te=0,Ee=1,De=2,Oe=3,ke=4,Ae=5,je=6,Me=7,Ne=[new we(Te,0,!1),new we(Ee,0,!0),new we(De,1,!1),new we(Oe,1,!0),new we(ke,2,!1),new we(Ae,2,!0),new we(je,3,!1),new we(Me,3,!0)],Pe=[ke,Ae,ke,Ae,je,Me,je,Me],Fe=[Ae,Ae,Ae,Ae,Me,Me,Me,Me],Ie=[De,Oe,ke,Ae,je,Me,je,Me],Le=[Oe,Oe,Ae,Ae,Me,Me,Me,Me],Re=[Ee,Ee,Oe,Oe,Ae,Ae,Me,Me],ze=[Te,Ee,De,Oe,De,Oe,De,Oe],E={DISPLAY:Ne[Te],TEXT:Ne[De],SCRIPT:Ne[ke],SCRIPTSCRIPT:Ne[je]},Be=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function Ve(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var He=[];Be.forEach(e=>e.blocks.forEach(e=>He.push(...e)));function Ue(e){for(var t=0;t=He[t]&&e<=He[t+1])return!0;return!1}var We=e=>e+` `+e,Ge=80,Ke=function(e,t){return`M95,`+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+` -`+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},qe=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+` -`+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Je=function(e,t){return`M983 `+(10+e+t)+` +l`+e/3.13+` -`+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Ye=function(e,t){return`M424,`+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+` +h400000v`+(40+e)+`h-400000z`},Xe=function(e,t){return`M473,`+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},Ze=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},Qe=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+` +H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},$e=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=Ke(t,Ge);break;case`sqrtSize1`:r=qe(t,Ge);break;case`sqrtSize2`:r=Je(t,Ge);break;case`sqrtSize3`:r=Ye(t,Ge);break;case`sqrtSize4`:r=Xe(t,Ge);break;case`sqrtTall`:r=Qe(t,Ge,n)}return r},et=function(e,t){switch(e){case`⎜`:return We(`M291 0 H417 V`+t+` H291z`);case`∣`:return We(`M145 0 H188 V`+t+` H145z`);case`∥`:return We(`M145 0 H188 V`+t+` H145z`)+We(`M367 0 H410 V`+t+` H367z`);case`⎟`:return We(`M457 0 H583 V`+t+` H457z`);case`⎢`:return We(`M319 0 H403 V`+t+` H319z`);case`⎥`:return We(`M263 0 H347 V`+t+` H263z`);case`⎪`:return We(`M384 0 H504 V`+t+` H384z`);case`⏐`:return We(`M312 0 H355 V`+t+` H312z`);case`‖`:return We(`M257 0 H300 V`+t+` H257z`)+We(`M478 0 H521 V`+t+` H478z`);default:return``}},tt={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:We(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:We(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:We(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:We(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:We(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:We(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:We(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:We(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},nt=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function rt(e){return`toText`in e}var it=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t{if(rt(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},at={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},ot={ex:!0,em:!0,mu:!0},st=function(e){return typeof e!=`string`&&(e=e.unit),e in at||e in ot||e===`ex`},D=function(e,t){var n;if(e.unit in at)n=at[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new w(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},O=function(e){return+e.toFixed(4)+`em`},ct=function(e){return e.filter(e=>e).join(` `)},lt=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=fe(n)+`:`+r+`;`)}return t},ut=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},dt=function(e){var t=document.createElement(e);t.className=ct(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r/=\x00-\x1f]/,pt=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+T(ct(this.classes))+`"`);var n=lt(this.style);n&&(t+=` style="`+T(n)+`"`);for(var r of Object.keys(this.attributes)){if(ft.test(r))throw new w(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+T(this.attributes[r])+`"`}t+=`>`;for(var i=0;i`,t},mt=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,ut.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return dt.call(this,`span`)}toMarkup(){return pt.call(this,`span`)}},ht=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ut.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return dt.call(this,`a`)}toMarkup(){return pt.call(this,`a`)}},gt=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=``+T(this.alt)+``,e}},_t={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},vt=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=Ve(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=_t[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=O(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=ct(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`0&&(n+=`margin-right:`+O(this.italic)+`;`),n+=lt(this.style),n&&(e=!0,t+=` style="`+T(n)+`"`);var r=T(this.text);return e?(t+=`>`,t+=r,t+=``,t):r}},yt=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n`;for(var n=0;n`,e}},bt=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,tt[this.pathName]),e}toMarkup(){return this.alternate?``:``}},xt=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=``,e}};function St(e){if(e instanceof vt)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Ct(e){if(e instanceof mt)return e;throw Error(`Expected span but got `+String(e)+`.`)}var wt=e=>e instanceof mt||e instanceof ht||e instanceof it,Tt={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Et={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Dt={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function Ot(e,t){Tt[e]=t}function kt(e,t,n){if(!Tt[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=Tt[t][r];if(!i&&e[0]in Dt&&(r=Dt[e[0]].charCodeAt(0),i=Tt[t][r]),!i&&n===`text`&&Ue(r)&&(i=Tt[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var At={};function jt(e){var t=e>=5?0:e>=3?1:2;if(!At[t]){var n=At[t]={cssEmPerMu:Et.quad[t]/18};for(var r of Object.keys(Et))n[r]=Et[r][t]}return At[t]}var k={math:{},text:{}};function A(e,t,n,r,i,a){k[e][i]={font:t,group:n,replace:r},a&&r&&(k[e][r]=k[e][i])}var j=`math`,M=`text`,N=`main`,P=`ams`,F=`accent-token`,I=`bin`,Mt=`close`,Nt=`inner`,L=`mathord`,R=`op-token`,Pt=`open`,Ft=`punct`,z=`rel`,It=`spacing`,B=`textord`;A(j,N,z,`≡`,`\\equiv`,!0),A(j,N,z,`≺`,`\\prec`,!0),A(j,N,z,`≻`,`\\succ`,!0),A(j,N,z,`∼`,`\\sim`,!0),A(j,N,z,`⊥`,`\\perp`),A(j,N,z,`⪯`,`\\preceq`,!0),A(j,N,z,`⪰`,`\\succeq`,!0),A(j,N,z,`≃`,`\\simeq`,!0),A(j,N,z,`∣`,`\\mid`,!0),A(j,N,z,`≪`,`\\ll`,!0),A(j,N,z,`≫`,`\\gg`,!0),A(j,N,z,`≍`,`\\asymp`,!0),A(j,N,z,`∥`,`\\parallel`),A(j,N,z,`⋈`,`\\bowtie`,!0),A(j,N,z,`⌣`,`\\smile`,!0),A(j,N,z,`⊑`,`\\sqsubseteq`,!0),A(j,N,z,`⊒`,`\\sqsupseteq`,!0),A(j,N,z,`≐`,`\\doteq`,!0),A(j,N,z,`⌢`,`\\frown`,!0),A(j,N,z,`∋`,`\\ni`,!0),A(j,N,z,`∝`,`\\propto`,!0),A(j,N,z,`⊢`,`\\vdash`,!0),A(j,N,z,`⊣`,`\\dashv`,!0),A(j,N,z,`∋`,`\\owns`),A(j,N,Ft,`.`,`\\ldotp`),A(j,N,Ft,`⋅`,`\\cdotp`),A(j,N,Ft,`⋅`,`·`),A(M,N,B,`⋅`,`·`),A(j,N,B,`#`,`\\#`),A(M,N,B,`#`,`\\#`),A(j,N,B,`&`,`\\&`),A(M,N,B,`&`,`\\&`),A(j,N,B,`ℵ`,`\\aleph`,!0),A(j,N,B,`∀`,`\\forall`,!0),A(j,N,B,`ℏ`,`\\hbar`,!0),A(j,N,B,`∃`,`\\exists`,!0),A(j,N,B,`∇`,`\\nabla`,!0),A(j,N,B,`♭`,`\\flat`,!0),A(j,N,B,`ℓ`,`\\ell`,!0),A(j,N,B,`♮`,`\\natural`,!0),A(j,N,B,`♣`,`\\clubsuit`,!0),A(j,N,B,`℘`,`\\wp`,!0),A(j,N,B,`♯`,`\\sharp`,!0),A(j,N,B,`♢`,`\\diamondsuit`,!0),A(j,N,B,`ℜ`,`\\Re`,!0),A(j,N,B,`♡`,`\\heartsuit`,!0),A(j,N,B,`ℑ`,`\\Im`,!0),A(j,N,B,`♠`,`\\spadesuit`,!0),A(j,N,B,`§`,`\\S`,!0),A(M,N,B,`§`,`\\S`),A(j,N,B,`¶`,`\\P`,!0),A(M,N,B,`¶`,`\\P`),A(j,N,B,`†`,`\\dag`),A(M,N,B,`†`,`\\dag`),A(M,N,B,`†`,`\\textdagger`),A(j,N,B,`‡`,`\\ddag`),A(M,N,B,`‡`,`\\ddag`),A(M,N,B,`‡`,`\\textdaggerdbl`),A(j,N,Mt,`⎱`,`\\rmoustache`,!0),A(j,N,Pt,`⎰`,`\\lmoustache`,!0),A(j,N,Mt,`⟯`,`\\rgroup`,!0),A(j,N,Pt,`⟮`,`\\lgroup`,!0),A(j,N,I,`∓`,`\\mp`,!0),A(j,N,I,`⊖`,`\\ominus`,!0),A(j,N,I,`⊎`,`\\uplus`,!0),A(j,N,I,`⊓`,`\\sqcap`,!0),A(j,N,I,`∗`,`\\ast`),A(j,N,I,`⊔`,`\\sqcup`,!0),A(j,N,I,`◯`,`\\bigcirc`,!0),A(j,N,I,`∙`,`\\bullet`,!0),A(j,N,I,`‡`,`\\ddagger`),A(j,N,I,`≀`,`\\wr`,!0),A(j,N,I,`⨿`,`\\amalg`),A(j,N,I,`&`,`\\And`),A(j,N,z,`⟵`,`\\longleftarrow`,!0),A(j,N,z,`⇐`,`\\Leftarrow`,!0),A(j,N,z,`⟸`,`\\Longleftarrow`,!0),A(j,N,z,`⟶`,`\\longrightarrow`,!0),A(j,N,z,`⇒`,`\\Rightarrow`,!0),A(j,N,z,`⟹`,`\\Longrightarrow`,!0),A(j,N,z,`↔`,`\\leftrightarrow`,!0),A(j,N,z,`⟷`,`\\longleftrightarrow`,!0),A(j,N,z,`⇔`,`\\Leftrightarrow`,!0),A(j,N,z,`⟺`,`\\Longleftrightarrow`,!0),A(j,N,z,`↦`,`\\mapsto`,!0),A(j,N,z,`⟼`,`\\longmapsto`,!0),A(j,N,z,`↗`,`\\nearrow`,!0),A(j,N,z,`↩`,`\\hookleftarrow`,!0),A(j,N,z,`↪`,`\\hookrightarrow`,!0),A(j,N,z,`↘`,`\\searrow`,!0),A(j,N,z,`↼`,`\\leftharpoonup`,!0),A(j,N,z,`⇀`,`\\rightharpoonup`,!0),A(j,N,z,`↙`,`\\swarrow`,!0),A(j,N,z,`↽`,`\\leftharpoondown`,!0),A(j,N,z,`⇁`,`\\rightharpoondown`,!0),A(j,N,z,`↖`,`\\nwarrow`,!0),A(j,N,z,`⇌`,`\\rightleftharpoons`,!0),A(j,P,z,`≮`,`\\nless`,!0),A(j,P,z,``,`\\@nleqslant`),A(j,P,z,``,`\\@nleqq`),A(j,P,z,`⪇`,`\\lneq`,!0),A(j,P,z,`≨`,`\\lneqq`,!0),A(j,P,z,``,`\\@lvertneqq`),A(j,P,z,`⋦`,`\\lnsim`,!0),A(j,P,z,`⪉`,`\\lnapprox`,!0),A(j,P,z,`⊀`,`\\nprec`,!0),A(j,P,z,`⋠`,`\\npreceq`,!0),A(j,P,z,`⋨`,`\\precnsim`,!0),A(j,P,z,`⪹`,`\\precnapprox`,!0),A(j,P,z,`≁`,`\\nsim`,!0),A(j,P,z,``,`\\@nshortmid`),A(j,P,z,`∤`,`\\nmid`,!0),A(j,P,z,`⊬`,`\\nvdash`,!0),A(j,P,z,`⊭`,`\\nvDash`,!0),A(j,P,z,`⋪`,`\\ntriangleleft`),A(j,P,z,`⋬`,`\\ntrianglelefteq`,!0),A(j,P,z,`⊊`,`\\subsetneq`,!0),A(j,P,z,``,`\\@varsubsetneq`),A(j,P,z,`⫋`,`\\subsetneqq`,!0),A(j,P,z,``,`\\@varsubsetneqq`),A(j,P,z,`≯`,`\\ngtr`,!0),A(j,P,z,``,`\\@ngeqslant`),A(j,P,z,``,`\\@ngeqq`),A(j,P,z,`⪈`,`\\gneq`,!0),A(j,P,z,`≩`,`\\gneqq`,!0),A(j,P,z,``,`\\@gvertneqq`),A(j,P,z,`⋧`,`\\gnsim`,!0),A(j,P,z,`⪊`,`\\gnapprox`,!0),A(j,P,z,`⊁`,`\\nsucc`,!0),A(j,P,z,`⋡`,`\\nsucceq`,!0),A(j,P,z,`⋩`,`\\succnsim`,!0),A(j,P,z,`⪺`,`\\succnapprox`,!0),A(j,P,z,`≆`,`\\ncong`,!0),A(j,P,z,``,`\\@nshortparallel`),A(j,P,z,`∦`,`\\nparallel`,!0),A(j,P,z,`⊯`,`\\nVDash`,!0),A(j,P,z,`⋫`,`\\ntriangleright`),A(j,P,z,`⋭`,`\\ntrianglerighteq`,!0),A(j,P,z,``,`\\@nsupseteqq`),A(j,P,z,`⊋`,`\\supsetneq`,!0),A(j,P,z,``,`\\@varsupsetneq`),A(j,P,z,`⫌`,`\\supsetneqq`,!0),A(j,P,z,``,`\\@varsupsetneqq`),A(j,P,z,`⊮`,`\\nVdash`,!0),A(j,P,z,`⪵`,`\\precneqq`,!0),A(j,P,z,`⪶`,`\\succneqq`,!0),A(j,P,z,``,`\\@nsubseteqq`),A(j,P,I,`⊴`,`\\unlhd`),A(j,P,I,`⊵`,`\\unrhd`),A(j,P,z,`↚`,`\\nleftarrow`,!0),A(j,P,z,`↛`,`\\nrightarrow`,!0),A(j,P,z,`⇍`,`\\nLeftarrow`,!0),A(j,P,z,`⇏`,`\\nRightarrow`,!0),A(j,P,z,`↮`,`\\nleftrightarrow`,!0),A(j,P,z,`⇎`,`\\nLeftrightarrow`,!0),A(j,P,z,`△`,`\\vartriangle`),A(j,P,B,`ℏ`,`\\hslash`),A(j,P,B,`▽`,`\\triangledown`),A(j,P,B,`◊`,`\\lozenge`),A(j,P,B,`Ⓢ`,`\\circledS`),A(j,P,B,`®`,`\\circledR`),A(M,P,B,`®`,`\\circledR`),A(j,P,B,`∡`,`\\measuredangle`,!0),A(j,P,B,`∄`,`\\nexists`),A(j,P,B,`℧`,`\\mho`),A(j,P,B,`Ⅎ`,`\\Finv`,!0),A(j,P,B,`⅁`,`\\Game`,!0),A(j,P,B,`‵`,`\\backprime`),A(j,P,B,`▲`,`\\blacktriangle`),A(j,P,B,`▼`,`\\blacktriangledown`),A(j,P,B,`■`,`\\blacksquare`),A(j,P,B,`⧫`,`\\blacklozenge`),A(j,P,B,`★`,`\\bigstar`),A(j,P,B,`∢`,`\\sphericalangle`,!0),A(j,P,B,`∁`,`\\complement`,!0),A(j,P,B,`ð`,`\\eth`,!0),A(M,N,B,`ð`,`ð`),A(j,P,B,`╱`,`\\diagup`),A(j,P,B,`╲`,`\\diagdown`),A(j,P,B,`□`,`\\square`),A(j,P,B,`□`,`\\Box`),A(j,P,B,`◊`,`\\Diamond`),A(j,P,B,`¥`,`\\yen`,!0),A(M,P,B,`¥`,`\\yen`,!0),A(j,P,B,`✓`,`\\checkmark`,!0),A(M,P,B,`✓`,`\\checkmark`),A(j,P,B,`ℶ`,`\\beth`,!0),A(j,P,B,`ℸ`,`\\daleth`,!0),A(j,P,B,`ℷ`,`\\gimel`,!0),A(j,P,B,`ϝ`,`\\digamma`,!0),A(j,P,B,`ϰ`,`\\varkappa`),A(j,P,Pt,`┌`,`\\@ulcorner`,!0),A(j,P,Mt,`┐`,`\\@urcorner`,!0),A(j,P,Pt,`└`,`\\@llcorner`,!0),A(j,P,Mt,`┘`,`\\@lrcorner`,!0),A(j,P,z,`≦`,`\\leqq`,!0),A(j,P,z,`⩽`,`\\leqslant`,!0),A(j,P,z,`⪕`,`\\eqslantless`,!0),A(j,P,z,`≲`,`\\lesssim`,!0),A(j,P,z,`⪅`,`\\lessapprox`,!0),A(j,P,z,`≊`,`\\approxeq`,!0),A(j,P,I,`⋖`,`\\lessdot`),A(j,P,z,`⋘`,`\\lll`,!0),A(j,P,z,`≶`,`\\lessgtr`,!0),A(j,P,z,`⋚`,`\\lesseqgtr`,!0),A(j,P,z,`⪋`,`\\lesseqqgtr`,!0),A(j,P,z,`≑`,`\\doteqdot`),A(j,P,z,`≓`,`\\risingdotseq`,!0),A(j,P,z,`≒`,`\\fallingdotseq`,!0),A(j,P,z,`∽`,`\\backsim`,!0),A(j,P,z,`⋍`,`\\backsimeq`,!0),A(j,P,z,`⫅`,`\\subseteqq`,!0),A(j,P,z,`⋐`,`\\Subset`,!0),A(j,P,z,`⊏`,`\\sqsubset`,!0),A(j,P,z,`≼`,`\\preccurlyeq`,!0),A(j,P,z,`⋞`,`\\curlyeqprec`,!0),A(j,P,z,`≾`,`\\precsim`,!0),A(j,P,z,`⪷`,`\\precapprox`,!0),A(j,P,z,`⊲`,`\\vartriangleleft`),A(j,P,z,`⊴`,`\\trianglelefteq`),A(j,P,z,`⊨`,`\\vDash`,!0),A(j,P,z,`⊪`,`\\Vvdash`,!0),A(j,P,z,`⌣`,`\\smallsmile`),A(j,P,z,`⌢`,`\\smallfrown`),A(j,P,z,`≏`,`\\bumpeq`,!0),A(j,P,z,`≎`,`\\Bumpeq`,!0),A(j,P,z,`≧`,`\\geqq`,!0),A(j,P,z,`⩾`,`\\geqslant`,!0),A(j,P,z,`⪖`,`\\eqslantgtr`,!0),A(j,P,z,`≳`,`\\gtrsim`,!0),A(j,P,z,`⪆`,`\\gtrapprox`,!0),A(j,P,I,`⋗`,`\\gtrdot`),A(j,P,z,`⋙`,`\\ggg`,!0),A(j,P,z,`≷`,`\\gtrless`,!0),A(j,P,z,`⋛`,`\\gtreqless`,!0),A(j,P,z,`⪌`,`\\gtreqqless`,!0),A(j,P,z,`≖`,`\\eqcirc`,!0),A(j,P,z,`≗`,`\\circeq`,!0),A(j,P,z,`≜`,`\\triangleq`,!0),A(j,P,z,`∼`,`\\thicksim`),A(j,P,z,`≈`,`\\thickapprox`),A(j,P,z,`⫆`,`\\supseteqq`,!0),A(j,P,z,`⋑`,`\\Supset`,!0),A(j,P,z,`⊐`,`\\sqsupset`,!0),A(j,P,z,`≽`,`\\succcurlyeq`,!0),A(j,P,z,`⋟`,`\\curlyeqsucc`,!0),A(j,P,z,`≿`,`\\succsim`,!0),A(j,P,z,`⪸`,`\\succapprox`,!0),A(j,P,z,`⊳`,`\\vartriangleright`),A(j,P,z,`⊵`,`\\trianglerighteq`),A(j,P,z,`⊩`,`\\Vdash`,!0),A(j,P,z,`∣`,`\\shortmid`),A(j,P,z,`∥`,`\\shortparallel`),A(j,P,z,`≬`,`\\between`,!0),A(j,P,z,`⋔`,`\\pitchfork`,!0),A(j,P,z,`∝`,`\\varpropto`),A(j,P,z,`◀`,`\\blacktriangleleft`),A(j,P,z,`∴`,`\\therefore`,!0),A(j,P,z,`∍`,`\\backepsilon`),A(j,P,z,`▶`,`\\blacktriangleright`),A(j,P,z,`∵`,`\\because`,!0),A(j,P,z,`⋘`,`\\llless`),A(j,P,z,`⋙`,`\\gggtr`),A(j,P,I,`⊲`,`\\lhd`),A(j,P,I,`⊳`,`\\rhd`),A(j,P,z,`≂`,`\\eqsim`,!0),A(j,N,z,`⋈`,`\\Join`),A(j,P,z,`≑`,`\\Doteq`,!0),A(j,P,I,`∔`,`\\dotplus`,!0),A(j,P,I,`∖`,`\\smallsetminus`),A(j,P,I,`⋒`,`\\Cap`,!0),A(j,P,I,`⋓`,`\\Cup`,!0),A(j,P,I,`⩞`,`\\doublebarwedge`,!0),A(j,P,I,`⊟`,`\\boxminus`,!0),A(j,P,I,`⊞`,`\\boxplus`,!0),A(j,P,I,`⋇`,`\\divideontimes`,!0),A(j,P,I,`⋉`,`\\ltimes`,!0),A(j,P,I,`⋊`,`\\rtimes`,!0),A(j,P,I,`⋋`,`\\leftthreetimes`,!0),A(j,P,I,`⋌`,`\\rightthreetimes`,!0),A(j,P,I,`⋏`,`\\curlywedge`,!0),A(j,P,I,`⋎`,`\\curlyvee`,!0),A(j,P,I,`⊝`,`\\circleddash`,!0),A(j,P,I,`⊛`,`\\circledast`,!0),A(j,P,I,`⋅`,`\\centerdot`),A(j,P,I,`⊺`,`\\intercal`,!0),A(j,P,I,`⋒`,`\\doublecap`),A(j,P,I,`⋓`,`\\doublecup`),A(j,P,I,`⊠`,`\\boxtimes`,!0),A(j,P,z,`⇢`,`\\dashrightarrow`,!0),A(j,P,z,`⇠`,`\\dashleftarrow`,!0),A(j,P,z,`⇇`,`\\leftleftarrows`,!0),A(j,P,z,`⇆`,`\\leftrightarrows`,!0),A(j,P,z,`⇚`,`\\Lleftarrow`,!0),A(j,P,z,`↞`,`\\twoheadleftarrow`,!0),A(j,P,z,`↢`,`\\leftarrowtail`,!0),A(j,P,z,`↫`,`\\looparrowleft`,!0),A(j,P,z,`⇋`,`\\leftrightharpoons`,!0),A(j,P,z,`↶`,`\\curvearrowleft`,!0),A(j,P,z,`↺`,`\\circlearrowleft`,!0),A(j,P,z,`↰`,`\\Lsh`,!0),A(j,P,z,`⇈`,`\\upuparrows`,!0),A(j,P,z,`↿`,`\\upharpoonleft`,!0),A(j,P,z,`⇃`,`\\downharpoonleft`,!0),A(j,N,z,`⊶`,`\\origof`,!0),A(j,N,z,`⊷`,`\\imageof`,!0),A(j,P,z,`⊸`,`\\multimap`,!0),A(j,P,z,`↭`,`\\leftrightsquigarrow`,!0),A(j,P,z,`⇉`,`\\rightrightarrows`,!0),A(j,P,z,`⇄`,`\\rightleftarrows`,!0),A(j,P,z,`↠`,`\\twoheadrightarrow`,!0),A(j,P,z,`↣`,`\\rightarrowtail`,!0),A(j,P,z,`↬`,`\\looparrowright`,!0),A(j,P,z,`↷`,`\\curvearrowright`,!0),A(j,P,z,`↻`,`\\circlearrowright`,!0),A(j,P,z,`↱`,`\\Rsh`,!0),A(j,P,z,`⇊`,`\\downdownarrows`,!0),A(j,P,z,`↾`,`\\upharpoonright`,!0),A(j,P,z,`⇂`,`\\downharpoonright`,!0),A(j,P,z,`⇝`,`\\rightsquigarrow`,!0),A(j,P,z,`⇝`,`\\leadsto`),A(j,P,z,`⇛`,`\\Rrightarrow`,!0),A(j,P,z,`↾`,`\\restriction`),A(j,N,B,`‘`,"`"),A(j,N,B,`$`,`\\$`),A(M,N,B,`$`,`\\$`),A(M,N,B,`$`,`\\textdollar`),A(j,N,B,`%`,`\\%`),A(M,N,B,`%`,`\\%`),A(j,N,B,`_`,`\\_`),A(M,N,B,`_`,`\\_`),A(M,N,B,`_`,`\\textunderscore`),A(j,N,B,`∠`,`\\angle`,!0),A(j,N,B,`∞`,`\\infty`,!0),A(j,N,B,`′`,`\\prime`),A(j,N,B,`△`,`\\triangle`),A(j,N,B,`Γ`,`\\Gamma`,!0),A(j,N,B,`Δ`,`\\Delta`,!0),A(j,N,B,`Θ`,`\\Theta`,!0),A(j,N,B,`Λ`,`\\Lambda`,!0),A(j,N,B,`Ξ`,`\\Xi`,!0),A(j,N,B,`Π`,`\\Pi`,!0),A(j,N,B,`Σ`,`\\Sigma`,!0),A(j,N,B,`Υ`,`\\Upsilon`,!0),A(j,N,B,`Φ`,`\\Phi`,!0),A(j,N,B,`Ψ`,`\\Psi`,!0),A(j,N,B,`Ω`,`\\Omega`,!0),A(j,N,B,`A`,`Α`),A(j,N,B,`B`,`Β`),A(j,N,B,`E`,`Ε`),A(j,N,B,`Z`,`Ζ`),A(j,N,B,`H`,`Η`),A(j,N,B,`I`,`Ι`),A(j,N,B,`K`,`Κ`),A(j,N,B,`M`,`Μ`),A(j,N,B,`N`,`Ν`),A(j,N,B,`O`,`Ο`),A(j,N,B,`P`,`Ρ`),A(j,N,B,`T`,`Τ`),A(j,N,B,`X`,`Χ`),A(j,N,B,`¬`,`\\neg`,!0),A(j,N,B,`¬`,`\\lnot`),A(j,N,B,`⊤`,`\\top`),A(j,N,B,`⊥`,`\\bot`),A(j,N,B,`∅`,`\\emptyset`),A(j,P,B,`∅`,`\\varnothing`),A(j,N,L,`α`,`\\alpha`,!0),A(j,N,L,`β`,`\\beta`,!0),A(j,N,L,`γ`,`\\gamma`,!0),A(j,N,L,`δ`,`\\delta`,!0),A(j,N,L,`ϵ`,`\\epsilon`,!0),A(j,N,L,`ζ`,`\\zeta`,!0),A(j,N,L,`η`,`\\eta`,!0),A(j,N,L,`θ`,`\\theta`,!0),A(j,N,L,`ι`,`\\iota`,!0),A(j,N,L,`κ`,`\\kappa`,!0),A(j,N,L,`λ`,`\\lambda`,!0),A(j,N,L,`μ`,`\\mu`,!0),A(j,N,L,`ν`,`\\nu`,!0),A(j,N,L,`ξ`,`\\xi`,!0),A(j,N,L,`ο`,`\\omicron`,!0),A(j,N,L,`π`,`\\pi`,!0),A(j,N,L,`ρ`,`\\rho`,!0),A(j,N,L,`σ`,`\\sigma`,!0),A(j,N,L,`τ`,`\\tau`,!0),A(j,N,L,`υ`,`\\upsilon`,!0),A(j,N,L,`ϕ`,`\\phi`,!0),A(j,N,L,`χ`,`\\chi`,!0),A(j,N,L,`ψ`,`\\psi`,!0),A(j,N,L,`ω`,`\\omega`,!0),A(j,N,L,`ε`,`\\varepsilon`,!0),A(j,N,L,`ϑ`,`\\vartheta`,!0),A(j,N,L,`ϖ`,`\\varpi`,!0),A(j,N,L,`ϱ`,`\\varrho`,!0),A(j,N,L,`ς`,`\\varsigma`,!0),A(j,N,L,`φ`,`\\varphi`,!0),A(j,N,I,`∗`,`*`,!0),A(j,N,I,`+`,`+`),A(j,N,I,`−`,`-`,!0),A(j,N,I,`⋅`,`\\cdot`,!0),A(j,N,I,`∘`,`\\circ`,!0),A(j,N,I,`÷`,`\\div`,!0),A(j,N,I,`±`,`\\pm`,!0),A(j,N,I,`×`,`\\times`,!0),A(j,N,I,`∩`,`\\cap`,!0),A(j,N,I,`∪`,`\\cup`,!0),A(j,N,I,`∖`,`\\setminus`,!0),A(j,N,I,`∧`,`\\land`),A(j,N,I,`∨`,`\\lor`),A(j,N,I,`∧`,`\\wedge`,!0),A(j,N,I,`∨`,`\\vee`,!0),A(j,N,B,`√`,`\\surd`),A(j,N,Pt,`⟨`,`\\langle`,!0),A(j,N,Pt,`∣`,`\\lvert`),A(j,N,Pt,`∥`,`\\lVert`),A(j,N,Mt,`?`,`?`),A(j,N,Mt,`!`,`!`),A(j,N,Mt,`⟩`,`\\rangle`,!0),A(j,N,Mt,`∣`,`\\rvert`),A(j,N,Mt,`∥`,`\\rVert`),A(j,N,z,`=`,`=`),A(j,N,z,`:`,`:`),A(j,N,z,`≈`,`\\approx`,!0),A(j,N,z,`≅`,`\\cong`,!0),A(j,N,z,`≥`,`\\ge`),A(j,N,z,`≥`,`\\geq`,!0),A(j,N,z,`←`,`\\gets`),A(j,N,z,`>`,`\\gt`,!0),A(j,N,z,`∈`,`\\in`,!0),A(j,N,z,``,`\\@not`),A(j,N,z,`⊂`,`\\subset`,!0),A(j,N,z,`⊃`,`\\supset`,!0),A(j,N,z,`⊆`,`\\subseteq`,!0),A(j,N,z,`⊇`,`\\supseteq`,!0),A(j,P,z,`⊈`,`\\nsubseteq`,!0),A(j,P,z,`⊉`,`\\nsupseteq`,!0),A(j,N,z,`⊨`,`\\models`),A(j,N,z,`←`,`\\leftarrow`,!0),A(j,N,z,`≤`,`\\le`),A(j,N,z,`≤`,`\\leq`,!0),A(j,N,z,`<`,`\\lt`,!0),A(j,N,z,`→`,`\\rightarrow`,!0),A(j,N,z,`→`,`\\to`),A(j,P,z,`≱`,`\\ngeq`,!0),A(j,P,z,`≰`,`\\nleq`,!0),A(j,N,It,`\xA0`,`\\ `),A(j,N,It,`\xA0`,`\\space`),A(j,N,It,`\xA0`,`\\nobreakspace`),A(M,N,It,`\xA0`,`\\ `),A(M,N,It,`\xA0`,` `),A(M,N,It,`\xA0`,`\\space`),A(M,N,It,`\xA0`,`\\nobreakspace`),A(j,N,It,``,`\\nobreak`),A(j,N,It,``,`\\allowbreak`),A(j,N,Ft,`,`,`,`),A(j,N,Ft,`;`,`;`),A(j,P,I,`⊼`,`\\barwedge`,!0),A(j,P,I,`⊻`,`\\veebar`,!0),A(j,N,I,`⊙`,`\\odot`,!0),A(j,N,I,`⊕`,`\\oplus`,!0),A(j,N,I,`⊗`,`\\otimes`,!0),A(j,N,B,`∂`,`\\partial`,!0),A(j,N,I,`⊘`,`\\oslash`,!0),A(j,P,I,`⊚`,`\\circledcirc`,!0),A(j,P,I,`⊡`,`\\boxdot`,!0),A(j,N,I,`△`,`\\bigtriangleup`),A(j,N,I,`▽`,`\\bigtriangledown`),A(j,N,I,`†`,`\\dagger`),A(j,N,I,`⋄`,`\\diamond`),A(j,N,I,`⋆`,`\\star`),A(j,N,I,`◃`,`\\triangleleft`),A(j,N,I,`▹`,`\\triangleright`),A(j,N,Pt,`{`,`\\{`),A(M,N,B,`{`,`\\{`),A(M,N,B,`{`,`\\textbraceleft`),A(j,N,Mt,`}`,`\\}`),A(M,N,B,`}`,`\\}`),A(M,N,B,`}`,`\\textbraceright`),A(j,N,Pt,`{`,`\\lbrace`),A(j,N,Mt,`}`,`\\rbrace`),A(j,N,Pt,`[`,`\\lbrack`,!0),A(M,N,B,`[`,`\\lbrack`,!0),A(j,N,Mt,`]`,`\\rbrack`,!0),A(M,N,B,`]`,`\\rbrack`,!0),A(j,N,Pt,`(`,`\\lparen`,!0),A(j,N,Mt,`)`,`\\rparen`,!0),A(M,N,B,`<`,`\\textless`,!0),A(M,N,B,`>`,`\\textgreater`,!0),A(j,N,Pt,`⌊`,`\\lfloor`,!0),A(j,N,Mt,`⌋`,`\\rfloor`,!0),A(j,N,Pt,`⌈`,`\\lceil`,!0),A(j,N,Mt,`⌉`,`\\rceil`,!0),A(j,N,B,`\\`,`\\backslash`),A(j,N,B,`∣`,`|`),A(j,N,B,`∣`,`\\vert`),A(M,N,B,`|`,`\\textbar`,!0),A(j,N,B,`∥`,`\\|`),A(j,N,B,`∥`,`\\Vert`),A(M,N,B,`∥`,`\\textbardbl`),A(M,N,B,`~`,`\\textasciitilde`),A(M,N,B,`\\`,`\\textbackslash`),A(M,N,B,`^`,`\\textasciicircum`),A(j,N,z,`↑`,`\\uparrow`,!0),A(j,N,z,`⇑`,`\\Uparrow`,!0),A(j,N,z,`↓`,`\\downarrow`,!0),A(j,N,z,`⇓`,`\\Downarrow`,!0),A(j,N,z,`↕`,`\\updownarrow`,!0),A(j,N,z,`⇕`,`\\Updownarrow`,!0),A(j,N,R,`∐`,`\\coprod`),A(j,N,R,`⋁`,`\\bigvee`),A(j,N,R,`⋀`,`\\bigwedge`),A(j,N,R,`⨄`,`\\biguplus`),A(j,N,R,`⋂`,`\\bigcap`),A(j,N,R,`⋃`,`\\bigcup`),A(j,N,R,`∫`,`\\int`),A(j,N,R,`∫`,`\\intop`),A(j,N,R,`∬`,`\\iint`),A(j,N,R,`∭`,`\\iiint`),A(j,N,R,`∏`,`\\prod`),A(j,N,R,`∑`,`\\sum`),A(j,N,R,`⨂`,`\\bigotimes`),A(j,N,R,`⨁`,`\\bigoplus`),A(j,N,R,`⨀`,`\\bigodot`),A(j,N,R,`∮`,`\\oint`),A(j,N,R,`∯`,`\\oiint`),A(j,N,R,`∰`,`\\oiiint`),A(j,N,R,`⨆`,`\\bigsqcup`),A(j,N,R,`∫`,`\\smallint`),A(M,N,Nt,`…`,`\\textellipsis`),A(j,N,Nt,`…`,`\\mathellipsis`),A(M,N,Nt,`…`,`\\ldots`,!0),A(j,N,Nt,`…`,`\\ldots`,!0),A(j,N,Nt,`⋯`,`\\@cdots`,!0),A(j,N,Nt,`⋱`,`\\ddots`,!0),A(j,N,B,`⋮`,`\\varvdots`),A(M,N,B,`⋮`,`\\varvdots`),A(j,N,F,`ˊ`,`\\acute`),A(j,N,F,`ˋ`,`\\grave`),A(j,N,F,`¨`,`\\ddot`),A(j,N,F,`~`,`\\tilde`),A(j,N,F,`ˉ`,`\\bar`),A(j,N,F,`˘`,`\\breve`),A(j,N,F,`ˇ`,`\\check`),A(j,N,F,`^`,`\\hat`),A(j,N,F,`⃗`,`\\vec`),A(j,N,F,`˙`,`\\dot`),A(j,N,F,`˚`,`\\mathring`),A(j,N,L,``,`\\@imath`),A(j,N,L,``,`\\@jmath`),A(j,N,B,`ı`,`ı`),A(j,N,B,`ȷ`,`ȷ`),A(M,N,B,`ı`,`\\i`,!0),A(M,N,B,`ȷ`,`\\j`,!0),A(M,N,B,`ß`,`\\ss`,!0),A(M,N,B,`æ`,`\\ae`,!0),A(M,N,B,`œ`,`\\oe`,!0),A(M,N,B,`ø`,`\\o`,!0),A(M,N,B,`Æ`,`\\AE`,!0),A(M,N,B,`Œ`,`\\OE`,!0),A(M,N,B,`Ø`,`\\O`,!0),A(M,N,F,`ˊ`,`\\'`),A(M,N,F,`ˋ`,"\\`"),A(M,N,F,`ˆ`,`\\^`),A(M,N,F,`˜`,`\\~`),A(M,N,F,`ˉ`,`\\=`),A(M,N,F,`˘`,`\\u`),A(M,N,F,`˙`,`\\.`),A(M,N,F,`¸`,`\\c`),A(M,N,F,`˚`,`\\r`),A(M,N,F,`ˇ`,`\\v`),A(M,N,F,`¨`,`\\"`),A(M,N,F,`˝`,`\\H`),A(M,N,F,`◯`,`\\textcircled`);var Lt={"--":!0,"---":!0,"``":!0,"''":!0};A(M,N,B,`–`,`--`,!0),A(M,N,B,`–`,`\\textendash`),A(M,N,B,`—`,`---`,!0),A(M,N,B,`—`,`\\textemdash`),A(M,N,B,`‘`,"`",!0),A(M,N,B,`‘`,`\\textquoteleft`),A(M,N,B,`’`,`'`,!0),A(M,N,B,`’`,`\\textquoteright`),A(M,N,B,`“`,"``",!0),A(M,N,B,`“`,`\\textquotedblleft`),A(M,N,B,`”`,`''`,!0),A(M,N,B,`”`,`\\textquotedblright`),A(j,N,B,`°`,`\\degree`,!0),A(M,N,B,`°`,`\\degree`),A(M,N,B,`°`,`\\textdegree`,!0),A(j,N,B,`£`,`\\pounds`),A(j,N,B,`£`,`\\mathsterling`,!0),A(M,N,B,`£`,`\\pounds`),A(M,N,B,`£`,`\\textsterling`,!0),A(j,P,B,`✠`,`\\maltese`),A(M,P,B,`✠`,`\\maltese`);for(var Rt=`0123456789/@."`,zt=0;zt{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return fn[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return pn[Math.floor((r-120782)/10)];if(r===120485||r===120486)return fn[0];if(120486{if(ct(e.classes)!==ct(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},xn=e=>{for(var t=0;tt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},U=function(e,t,n,r){var i=new mt(e,t,n,r);return Sn(i),i},Cn=(e,t,n,r)=>new mt(e,t,n,r),wn=function(e,t,n){var r=U([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=O(r.height),r.maxFontSize=1,r},Tn=function(e,t,n,r){var i=new ht(e,t,n,r);return Sn(i),i},En=function(e){var t=new it(e);return Sn(t),t},Dn=function(e,t){return e instanceof it?U([],[e],t):e},On=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a{var n=U([`mspace`],[],t),r=D(e,t);return n.style.marginRight=O(r),n},An=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},jn={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},Mn={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},Nn=function(e,t){var n=Mn[e],r=n[0],i=n[1],a=n[2],o=Cn([`katex-overlay`],[new yt([new bt(r)],{width:O(i),height:O(a),style:`width:`+O(i),viewBox:`0 0 `+1e3*i+` `+1e3*a,preserveAspectRatio:`xMinYMin`})],t);return o.height=a,o.style.height=O(a),o.style.width=O(i),o},G={number:3,unit:`mu`},Pn={number:4,unit:`mu`},Fn={number:5,unit:`mu`},In={mord:{mop:G,mbin:Pn,mrel:Fn,minner:G},mop:{mord:G,mop:G,mrel:Fn,minner:G},mbin:{mord:Pn,mop:Pn,mopen:Pn,minner:Pn},mrel:{mord:Fn,mop:Fn,mopen:Fn,minner:Fn},mopen:{},mclose:{mop:G,mbin:Pn,mrel:Fn,minner:G},mpunct:{mord:G,mop:G,mrel:Fn,mopen:G,mclose:G,mpunct:G,minner:G},minner:{mord:G,mop:G,mbin:Pn,mrel:Fn,mopen:G,mpunct:G,minner:G}},Ln={mord:{mop:G},mop:{mord:G,mop:G},mbin:{},mrel:{},mopen:{},mclose:{mop:G},mpunct:{},minner:{mop:G}},Rn={},zn={},Bn={};function K(e){for(var t=e.type,n=e.names,r=e.htmlBuilder,i=e.mathmlBuilder,a=0;a{var n=t.classes[0],r=e.classes[0];n===`mbin`&&Wn.has(r)?t.classes[0]=`mord`:r===`mbin`&&Un.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),Jn(i,(e,t)=>{var n=Zn(t),r=Zn(e),i=n&&r?e.hasClass(`mtight`)?Ln[n]?.[r]:In[n]?.[r]:null;if(i)return kn(i,c)},{node:u},d,f),i},Jn=function(e,t,n,r,i){r&&e.push(r);for(var a=0;an=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},Yn=function(e){return e instanceof it||e instanceof ht||e instanceof mt&&e.hasClass(`enclosing`)?e:null},Xn=function(e,t){var n=Yn(e);if(n){var r=n.children;if(r.length){if(t===`right`)return Xn(r[r.length-1],`right`);if(t===`left`)return Xn(r[0],`left`)}}return e},Zn=function(e,t){return e?(t&&(e=Xn(e,t)),Kn[e.classes[0]]||null):null},Qn=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return U(t.concat(n))},J=function(e,t,n){if(!e)return U();if(zn[e.type]){var r=zn[e.type](e,t);if(n&&t.size!==n.size){r=U(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new w(`Got group of unknown type: '`+e.type+`'`)};function $n(e,t){var n=U([`katex-base`],e,t),r=U([`katex-strut`]);return r.style.height=O(n.height+n.depth),n.depth&&(r.style.verticalAlign=O(-n.depth)),n.children.unshift(r),n}function er(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=qn(e,t,`root`),i;r.length===2&&r[1].hasClass(`katex-tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s0&&(a.push($n(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push($n(o,t));var l;n?(l=$n(qn(n,t,!0),t),l.classes=[`katex-tag`],a.push(l)):i&&a.push(i);var u=U([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=O(u.height+u.depth),u.depth&&(d.style.verticalAlign=O(-u.depth))}return u}function tr(e){return new it(e)}var Y=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t of Object.entries(this.attributes)){var n=t[0],r=t[1];e.setAttribute(n,r)}this.classes.length>0&&(e.className=ct(this.classes));for(var i=0;i0&&(e+=` class ="`+T(ct(this.classes))+`"`),e+=`>`;for(var i=0;i`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},X=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return T(this.toText())}toText(){return this.text}},nr=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?`  `:e>=-.05556&&e<=-.05555?` ⁣`:e>=-.1667&&e<=-.1666?` ⁣`:e>=-.2223&&e<=-.2222?` ⁣`:e>=-.2778&&e<=-.2777?` ⁣`:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,O(this.width)),e}toMarkup(){return this.character?``+this.character+``:``}toText(){return this.character?this.character:` `}},rr=new Set([`\\imath`,`\\jmath`]),ir=new Set([`mrow`,`mtable`]),ar=function(e,t,n){var r,i;return k[t][e]&&k[t][e].replace&&e.charCodeAt(0)!==55349&&!(Object.prototype.hasOwnProperty.call(Lt,e)&&((n==null||(r=n.fontFamily)==null?void 0:r.slice(4,6))===`tt`||(n==null||(i=n.font)==null?void 0:i.slice(4,6))===`tt`))&&(e=k[t][e].replace),new X(e)},or=function(e){return e.length===1?e[0]:new Y(`mrow`,e)},sr={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},cr=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=sr[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(rr.has(a))return null;if(k[r][a]){var o=k[r][a].replace;o&&(a=o)}var s=jn[n].fontName;return kt(a,s,r)?jn[n].variant:null};function lr(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof X&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof X&&n.text===`,`}return!1}var ur=function(e,t,n){if(e.length===1){var r=Z(e[0],t);return n&&r instanceof Y&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o=1&&(a.type===`mn`||lr(a))){var c=s.children[0];c instanceof Y&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof X&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof X&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},dr=function(e,t,n){return or(ur(e,t,n))},Z=function(e,t){if(!e)return new Y(`mrow`);if(Bn[e.type])return Bn[e.type](e,t);throw new w(`Got group of unknown type: '`+e.type+`'`)};function fr(e,t,n,r,i){var a=ur(e,n),o=a.length===1&&a[0]instanceof Y&&ir.has(a[0].type)?a[0]:new Y(`mrow`,a),s=new Y(`annotation`,[new X(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new Y(`math`,[new Y(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),U([i?`katex`:`katex-mathml`],[c])}var pr=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],mr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],hr=function(e,t){return t.size<2?e:pr[e-1][t.size-1]},gr=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=mr[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:hr(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:mr[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=hr(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`katex-sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`katex-sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=jt(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};gr.BASESIZE=6;var _r=function(e){return new gr({style:e.displayMode?E.DISPLAY:E.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},vr=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=U(n,[e])}return e},yr=function(e,t,n){var r=_r(n),i;return n.output===`mathml`?fr(e,t,r,n.displayMode,!0):(i=n.output===`html`?U([`katex`],[er(e,r)]):U([`katex`],[fr(e,t,r,n.displayMode,!1),er(e,r)]),vr(i,n))},br=function(e,t,n){return vr(U([`katex`],[er(e,_r(n))]),n)},xr={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},Sr=function(e){var t=new Y(`mo`,[new X(xr[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},Cr={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},wr=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),Tr=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(wr.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:Cn([],[new yt([new bt(o)],{width:`100%`,height:O(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=Cr[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var d=u[0],f=u[1],p=u[2],m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support + `+h+` children.`);for(var v=0;v0&&(i.style.minWidth=O(a)),i},Er=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=U([`katex-stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new xt({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new xt({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=Cn([],[new yt(c,{width:`100%`,height:O(o)})],i)}return a.height=o,a.style.height=O(o),a},Dr=[`bin`,`close`,`inner`,`open`,`punct`,`rel`],Or=[`accent-token`,`mathord`,`op-token`,`spacing`,`textord`],kr=new Set(Dr),Ar=new Set(Or);function jr(e){return kr.has(e)}function Q(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function Mr(e){var t=Nr(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function Nr(e){return e.type===`atom`||Ar.has(e.type)?e:null}function Pr(e,t,n){var r=``;for(var i of e.body)if(i.type===`textord`)r+=i.text;else if(n&&i.type===`spacing`&&i.text===` `)r+=` `;else throw new w(t,e);return r}var Fr=e=>{if(e instanceof vt)return e;if(wt(e)&&e.children.length===1)return Fr(e.children[0])},Ir=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=Q(e.base,`accent`),n=r.base,e.base=n,i=Ct(J(e,t)),e.base=r):(r=Q(e,`accent`),n=r.base);var a=J(n,t.havingCrampedStyle()),o=r.isShifty&&_e(n),s=0;o&&(s=Fr(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=Tr(r,t),u=W({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+O(2*s)+`)`,marginLeft:O(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=Nn(`vec`,t),f=Mn.vec[1]):(d=yn({type:`textord`,mode:r.mode,text:r.label},t),d=St(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=U([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=O(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=W({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=U([`mord`,`katex-accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},Lr=(e,t)=>{var n=e.isStretchy?Sr(e.label):new Y(`mo`,[ar(e.label,e.mode)]),r=new Y(`mover`,[Z(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},Rr=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));K({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],numArgs:1,handler:(e,t)=>{var n=Hn(t[0]),r=!Rr.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:Ir,mathmlBuilder:Lr}),K({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`],handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}}}),K({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=J(e.base,t),r=Tr(e,t),i=e.label===`\\utilde`?.12:0;return U([`mord`,`accentunder`],[W({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=Sr(e.label),r=new Y(`munder`,[Z(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var zr=e=>{var t=new Y(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};K({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=e.funcName;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Dn(J(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Dn(J(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=Tr(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=W({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=W({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return U([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=Sr(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=zr(Z(e.body,t));r=e.below?new Y(`munderover`,[n,zr(Z(e.below,t)),i]):new Y(`mover`,[n,i])}else e.below?r=new Y(`munder`,[n,zr(Z(e.below,t))]):(r=zr(),r=new Y(`mover`,[n,r]));return r}});function Br(e,t){var n=qn(e.body,t,!0);return U([e.mclass],n,t)}function Vr(e,t){var n,r=ur(e.body,t);return e.mclass===`minner`?n=new Y(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new Y(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new Y(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):(e.mclass===`mopen`||e.mclass===`mclose`)&&(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`)),n}K({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],numArgs:1,primitive:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:q(i),isCharacterBox:_e(i)}},htmlBuilder:Br,mathmlBuilder:Vr});var Hr=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};K({type:`mclass`,names:[`\\@binrel`],numArgs:2,handler(e,t){return{type:`mclass`,mode:e.parser.mode,mclass:Hr(t[0]),body:q(t[1]),isCharacterBox:_e(t[1])}}}),K({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],numArgs:2,handler(e,t){var n=e.parser,r=e.funcName,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:Hr(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:q(i)},c=r===`\\underset`?{type:`supsub`,mode:a.mode,base:s,sub:a}:{type:`supsub`,mode:a.mode,base:s,sup:a};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:_e(c)}}}),K({type:`pmb`,names:[`\\pmb`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`pmb`,mode:e.parser.mode,mclass:Hr(t[0]),body:q(t[0])}},htmlBuilder(e,t){var n=qn(e.body,t,!0),r=U([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new Y(`mstyle`,ur(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var Ur={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},Wr=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),Gr=e=>e.type===`textord`&&e.text===`@`,Kr=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function qr(e,t,n){var r=Ur[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function Jr(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new w(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;aAV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;pAV=|." after @`,o[c])}var m={type:`styling`,body:[qr(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=Wr()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}K({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Dn(J(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=O(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new Y(`mrow`,[Z(e.label,t)]);return n=new Y(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new Y(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),K({type:`cdlabelparent`,names:[`\\\\cdparent`],numArgs:1,handler(e,t){return{type:`cdlabelparent`,mode:e.parser.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Dn(J(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new Y(`mrow`,[Z(e.fragment,t)])}}),K({type:`textord`,names:[`\\@char`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=Pr(Q(t[0],`ordgroup`),`\\@char has non-numeric argument`),i=parseInt(r),a;if(isNaN(i))throw new w(`\\@char has non-numeric argument `+r);if(i<0||i>=1114111)throw new w(`\\@char with invalid code point `+r);return i<=65535?a=String.fromCharCode(i):(i-=65536,a=String.fromCharCode((i>>10)+55296,(i&1023)+56320)),{type:`textord`,mode:n.mode,text:a}}}),K({type:`color`,names:[`\\textcolor`],numArgs:2,allowedInText:!0,argTypes:[`color`,`original`],handler(e,t){var n=e.parser,r=Q(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:q(i)}},htmlBuilder:(e,t)=>En(qn(e.body,t.withColor(e.color),!1)),mathmlBuilder:(e,t)=>{var n=new Y(`mstyle`,ur(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n}}),K({type:`color`,names:[`\\color`],numArgs:1,allowedInText:!0,argTypes:[`color`],handler(e,t){var n=e.parser,r=e.breakOnTokenText,i=Q(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}}}),K({type:`cr`,names:[`\\\\`],numArgs:0,numOptionalArgs:0,allowedInText:!0,handler(e,t,n){var r=e.parser,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&Q(i,`size`).value}},htmlBuilder(e,t){var n=U([`mspace`],[],t);return e.newLine&&(n.classes.push(`katex-newline`),e.size&&(n.style.marginTop=O(D(e.size,t)))),n},mathmlBuilder(e,t){var n=new Y(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,O(D(e.size,t)))),n}});var Yr={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},Xr=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new w(`Expected a control sequence`,e);return t},Zr=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},Qr=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};K({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],numArgs:0,allowedInText:!0,handler(e){var t=e.parser,n=e.funcName;t.consumeSpaces();var r=t.fetch();if(Yr[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=Yr[r.text]),Q(t.parseFunction(),`internal`);throw new w(`Invalid token after macro prefix`,r)}}),K({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new w(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new w(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new w(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new w(`Expected a macro definition`);else s[a].push(r.text);var c=t.gullet.consumeArg().tokens;return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===Yr[n]),{type:`internal`,mode:t.mode}}}),K({type:`internal`,names:[`\\let`,`\\\\globallet`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=Xr(t.gullet.popToken());return t.gullet.consumeSpaces(),Qr(t,r,Zr(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),K({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],numArgs:0,allowedInText:!0,primitive:!0,handler(e){var t=e.parser,n=e.funcName,r=Xr(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Qr(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var $r=function(e,t,n){var r=kt(k.math[e]&&k.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},ei=function(e,t,n,r){var i=n.havingBaseStyle(t),a=U(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},ti=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=O(i),e.height-=i,e.depth+=i},ni=function(e,t,n,r,i,a){var o=ei(gn(e,`Main-Regular`,i,r),t,r,a);return n&&ti(o,r,t),o},ri=function(e,t,n,r){return gn(e,`Size`+t+`-Regular`,n,r)},ii=function(e,t,n,r,i,a){var o=ri(e,t,i,r),s=ei(U([`delimsizing`,`size`+t],[o],r),E.TEXT,r,a);return n&&ti(s,r,E.TEXT),s},ai=function(e,t,n){return{type:`elem`,elem:U([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[U([],[gn(e,t,n)])])}},oi=function(e,t,n){var r=Tt[`Size4-Regular`][e.charCodeAt(0)]?Tt[`Size4-Regular`][e.charCodeAt(0)][4]:Tt[`Size1-Regular`][e.charCodeAt(0)][4],i=Cn([],[new yt([new bt(`inner`,et(e,Math.round(1e3*t)))],{width:O(r),height:O(t),style:`width:`+O(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=O(t),i.style.width=O(r),{type:`elem`,elem:i}},si=.008,ci={type:`kern`,size:-1*si},li=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),ui=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),di=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):li.has(e)?(c=`∣`,u=`vert`,d=333):ui.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=$r(o,f,i),m=p.height+p.depth,h=$r(c,f,i),g=h.height+h.depth,_=$r(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=$r(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,ee=r.fontMetrics().axisHeight;n&&(ee*=r.sizeMultiplier);var te=C/2-ee,ne=[];if(u.length>0){var re=C-m-v,ie=Math.round(C*1e3),ae=nt(u,Math.round(re*1e3)),oe=new bt(u,ae),se=O(d/1e3),ce=O(ie/1e3),le=Cn([],[new yt([oe],{width:se,height:ce,viewBox:`0 0 `+d+` `+ie})],r);le.height=ie/1e3,le.style.width=se,le.style.height=ce,ne.push({type:`elem`,elem:le})}else{if(ne.push(ai(l,f,i)),ne.push(ci),s===null){var ue=C-m-v+2*si;ne.push(oi(c,ue,r))}else{var w=(C-m-v-y)/2+2*si;ne.push(oi(c,w,r)),ne.push(ci),ne.push(ai(s,f,i)),ne.push(ci),ne.push(oi(c,w,r))}ne.push(ci),ne.push(ai(o,f,i))}var de=r.havingBaseStyle(E.TEXT);return ei(U([`delimsizing`,`mult`],[W({positionType:`bottom`,positionData:te,children:ne})],de),E.TEXT,r,a)},fi=80,pi=.08,mi=function(e,t,n,r,i){return Cn([`hide-tail`],[new yt([new bt(e,$e(e,r,n))],{width:`400em`,height:O(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},hi=function(e,t){var n=t.havingBaseSizing(),r=Ti(`\\surd`,e*n.sizeMultiplier,Ci,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+fi,e<1?i=1:e<1.4&&(i=.7),s=(1+a+pi)/i,c=(1+a)/i,o=mi(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+fi)*yi[r.size],c=(yi[r.size]+a)/i,s=(yi[r.size]+a+pi)/i,o=mi(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+pi,c=e+a,l=Math.floor(1e3*e+a)+fi,o=mi(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=O(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},gi=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),_i=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),vi=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),yi=[0,1.2,1.8,2.4,3],bi=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),gi.has(e)||vi.has(e))return ii(e,t,!1,n,r,i);if(_i.has(e))return di(e,yi[t],!1,n,r,i);throw new w(`Illegal delimiter: '`+e+`'`)},xi=[{type:`small`,style:E.SCRIPTSCRIPT},{type:`small`,style:E.SCRIPT},{type:`small`,style:E.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Si=[{type:`small`,style:E.SCRIPTSCRIPT},{type:`small`,style:E.SCRIPT},{type:`small`,style:E.TEXT},{type:`stack`}],Ci=[{type:`small`,style:E.SCRIPTSCRIPT},{type:`small`,style:E.SCRIPT},{type:`small`,style:E.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],wi=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},Ti=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return a}return n[n.length-1]},Ei=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=vi.has(e)?xi:gi.has(e)?Ci:Si,s=Ti(e,t,o,r);return s.type===`small`?ni(e,s.style,n,r,i,a):s.type===`large`?ii(e,s.size,n,r,i,a):di(e,t,n,r,i,a)},Di=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return Ei(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},Oi={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},ki=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function Ai(e){return`isMiddle`in e}function ji(e,t){var n=Nr(e);if(n&&ki.has(n.text))return n;throw n?new w(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new w(`Invalid delimiter type '`+e.type+`'`,e)}K({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],numArgs:1,argTypes:[`primitive`],handler:(e,t)=>{var n=ji(Hn(t[0]),e);return{type:`delimsizing`,mode:e.parser.mode,size:Oi[e.funcName].size,mclass:Oi[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?U([e.mclass]):bi(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(ar(e.delim,e.mode));var n=new Y(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=O(yi[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function Mi(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}K({type:`leftright-right`,names:[`\\right`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new w(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:ji(t[0],e).text,color:n}}}),K({type:`leftright`,names:[`\\left`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=ji(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=Q(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Mi(e);for(var n=qn(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o{Mi(e);var n=ur(e.body,t);if(e.left!==`.`){var r=new Y(`mo`,[ar(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new Y(`mo`,[ar(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return or(n)}}),K({type:`middle`,names:[`\\middle`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=ji(t[0],e);if(!e.parser.leftrightDepth)throw new w(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=Qn(t,[]):(n=bi(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new Y(`mo`,[e.delim===`\\vert`||e.delim===`|`?ar(`|`,`text`):ar(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}}),K({type:`enclose`,names:[`\\colorbox`],numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=Q(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:(e,t)=>{var n=Dn(J(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=_e(e.body);if(r===`sout`)a=U([`katex-stretchy`,`katex-sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=D({number:.6,unit:`pt`},t),l=D({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=O(d/2+c);var f=Math.floor(1e3*d*i);a=Cn([`hide-tail`],[new yt([new bt(`phase`,Ze(f))],{width:`400em`,height:O(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=O(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=Er(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=O(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=O(h),a.style.borderRightWidth=O(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=W({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=W({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?U([`mord`,`cancel-lap`],[g],t):U([`mord`],[g],t)},mathmlBuilder:(e,t)=>{var n,r=new Y(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[Z(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+O(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r}}),K({type:`enclose`,names:[`\\fcolorbox`],numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`],handler(e,t,n){var r=e.parser,i=e.funcName,a=Q(t[0],`color-token`).color,o=Q(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}}}),K({type:`enclose`,names:[`\\fbox`],numArgs:1,argTypes:[`hbox`],allowedInText:!0,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\fbox`,body:t[0]}}}),K({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),K({type:`enclose`,names:[`\\sout`],numArgs:1,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}}}),K({type:`enclose`,names:[`\\angl`],numArgs:1,argTypes:[`hbox`],allowedInText:!1,handler(e,t){return{type:`enclose`,mode:e.parser.mode,label:`\\angl`,body:t[0]}}});var Ni={};function Pi(e){for(var t=e.type,n=e.names,r=e.props,i=e.handler,a=e.htmlBuilder,o=e.mathmlBuilder,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c{if(!e.parser.settings.displayMode)throw new w(`{`+e.envName+`} can be used only in display mode.`)},Bi=new Set([`gather`,`gather*`]);function Vi(e){if(!e.includes(`ed`))return!e.includes(`*`)}function Hi(e,t,n){var r=t.hskipBeforeAndAfter,i=t.addJot,a=t.cols,o=t.arraystretch,s=t.colSeparationType,c=t.autoTag,l=t.singleRow,u=t.emptySingleRow,d=t.maxNumCols,f=t.leqno;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new w(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new Li(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(Ri(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var S={type:`ordgroup`,mode:e.mode,body:x};n&&(S={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[S]}),m.push(S);var C=e.fetch().text;if(C===`&`){if(d&&m.length===d){if(l||s)throw new w(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(C===`\\end`){b(),m.length===1&&S.type===`styling`&&S.body.length===1&&S.body[0].type===`ordgroup`&&S.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n0&&(te+=g,xe))for(n=0;n=o)){var _e=void 0;(r>0||e.hskipBeforeAndAfter)&&(_e=fe?.pregap??d,_e!==0&&(ae=U([`arraycolsep`],[]),ae.style.width=O(_e),ie.push(ae)));var ve=[];for(n=0;n0){for(var Te=wn(`katex-hline`,t,l),Ee=wn(`katex-hdashline`,t,l),De=[{type:`elem`,elem:we,shift:0}];c.length>0;){var Oe=c.pop(),ke=Oe.pos-ne;Oe.isDashed?De.push({type:`elem`,elem:Ee,shift:ke}):De.push({type:`elem`,elem:Te,shift:ke})}we=W({positionType:`individualShift`,children:De})}if(se.length===0)return U([`mord`],[we],t);var Ae=U([`katex-tag`],[W({positionType:`individualShift`,children:se})],t);return En([we,Ae])},Gi={c:`center `,l:`left `,r:`right `},Ki=function(e,t){for(var n=[],r=new Y(`mtd`,[],[`mtr-glue`]),i=new Y(`mtd`,[],[`mml-eqn-num`]),a=0;a0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=Gi[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S0?`left `:``,d+=ee[ee.length-1].length>0?`right `:``;for(var te=1;te0&&u&&(p=1),n[d]={type:`align`,align:f,pregap:p,postgap:0}}return i.colSeparationType=u?`align`:`alignat`,i};Pi({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(Nr(t[0])?[t[0]]:Q(t[0],`ordgroup`).body).map(function(e){var t=Mr(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new w(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Hi(e.parser,r,Ui(e.envName))},htmlBuilder:Wi,mathmlBuilder:Ki}),Pi({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new w(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=Hi(e.parser,r,Ui(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Wi,mathmlBuilder:Ki}),Pi({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=Hi(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:Wi,mathmlBuilder:Ki}),Pi({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(Nr(t[0])?[t[0]]:Q(t[0],`ordgroup`).body).map(function(e){var t=Mr(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new w(`Unknown column alignment: `+t,e)});if(n.length>1)throw new w(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=Hi(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new w(`{subarray} can contain only one column`);return i},htmlBuilder:Wi,mathmlBuilder:Ki}),Pi({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=Hi(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},Ui(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:Wi,mathmlBuilder:Ki}),Pi({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:qi,htmlBuilder:Wi,mathmlBuilder:Ki}),Pi({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){Bi.has(e.envName)&&zi(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:Vi(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Hi(e.parser,t,`display`)},htmlBuilder:Wi,mathmlBuilder:Ki}),Pi({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:qi,htmlBuilder:Wi,mathmlBuilder:Ki}),Pi({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){zi(e);var t={autoTag:Vi(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Hi(e.parser,t,`display`)},htmlBuilder:Wi,mathmlBuilder:Ki}),Pi({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return zi(e),Jr(e.parser)},htmlBuilder:Wi,mathmlBuilder:Ki}),$(`\\nonumber`,`\\gdef\\@eqnsw{0}`),$(`\\notag`,`\\nonumber`),K({type:`text`,names:[`\\hline`,`\\hdashline`],numArgs:0,allowedInText:!0,allowedInMath:!0,handler(e,t){throw new w(e.funcName+` valid only within array environment`)}});var Ji=Ni;K({type:`environment`,names:[`\\begin`,`\\end`],numArgs:1,argTypes:[`text`],handler(e,t){var n=e.parser,r=e.funcName,i=t[0];if(i.type!==`ordgroup`)throw new w(`Invalid environment name`,i);var a=Pr(i,`Environment name should contain only text characters and spaces`,!0);if(r===`\\begin`){if(!Object.prototype.hasOwnProperty.call(Ji,a))throw new w(`No such environment: `+a,i);var o=Ji[a],s=n.parseArguments(`\\begin{`+a+`}`,o),c=s.args,l=s.optArgs,u={mode:n.mode,envName:a,parser:n},d=o.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=Q(n.parseFunction(),`environment`);if(p.name!==a)throw new w(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var Yi=(e,t)=>{var n=e.font,r=t.withFont(n);return J(e.body,r)},Xi=(e,t)=>{var n=e.font,r=t.withFont(n);return Z(e.body,r)},Zi={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};K({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],numArgs:1,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=Hn(t[0]),a=r in Zi?Zi[r]:r;return{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:Yi,mathmlBuilder:Xi}),K({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],numArgs:1,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`mclass`,mode:n.mode,mclass:Hr(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:_e(r)}}}),K({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],numArgs:0,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=e.breakOnTokenText,a=n.mode,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}}});var Qi=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=J(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d){var n=new Y(`mfrac`,[Z(e.numer,t),Z(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=D(e.barSize,t);n.setAttribute(`linethickness`,O(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Y(`mo`,[new X(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new Y(`mo`,[new X(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return or(i)}return n},ea=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;K({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],numArgs:2,allowedInArgument:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),ea({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:Qi,mathmlBuilder:$i}),K({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],numArgs:0,infix:!0,handler(e){var t=e.parser,n=e.funcName,r=e.token,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var ta=[`display`,`text`,`script`,`scriptscript`],na=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};K({type:`genfrac`,names:[`\\genfrac`],numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`],handler(e,t){var n=e.parser,r=t[4],i=t[5],a=Hn(t[0]),o=a.type===`atom`&&a.family===`open`?na(a.text):null,s=Hn(t[1]),c=s.type===`atom`&&s.family===`close`?na(s.text):null,l=Q(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=Q(p.body[0],`textord`);f=ta[Number(m.text)]}}else p=Q(p,`textord`),f=ta[Number(p.text)];return ea({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),K({type:`infix`,names:[`\\above`],numArgs:1,argTypes:[`size`],infix:!0,handler(e,t){var n=e.parser;e.funcName;var r=e.token;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:Q(t[0],`size`).value,token:r}}}),K({type:`genfrac`,names:[`\\\\abovefrac`],numArgs:3,argTypes:[`math`,`size`,`math`],handler:(e,t)=>{var n=e.parser;e.funcName;var r=t[0],i=Q(t[1],`infix`).size;if(!i)throw Error(`\\\\abovefrac expected size, but got `+String(i));var a=t[2],o=i.number>0;return{type:`genfrac`,mode:n.mode,numer:r,denom:a,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}}});var ra=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?J(e.sup,t.havingStyle(n.sup()),t):J(e.sub,t.havingStyle(n.sub()),t),i=Q(e.base,`horizBrace`)):i=Q(e,`horizBrace`);var a=J(i.base,t.havingBaseStyle(E.DISPLAY)),o=Tr(i,t),s=i.isOver?W({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):W({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=U([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?W({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):W({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return U([`minner`,i.isOver?`mover`:`munder`],[s],t)};K({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],numArgs:1,handler(e,t){var n=e.parser,r=e.funcName;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:ra,mathmlBuilder:(e,t)=>{var n=Sr(e.label);return new Y(e.isOver?`mover`:`munder`,[Z(e.base,t),n])}}),K({type:`href`,names:[`\\href`],numArgs:2,argTypes:[`url`,`original`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[1],i=Q(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:q(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=qn(e.body,t,!1);return Tn(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=dr(e.body,t);return n instanceof Y||(n=new Y(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),K({type:`href`,names:[`\\url`],numArgs:1,argTypes:[`url`],allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=Q(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a{var n=e.parser,r=e.funcName;e.token;var i=Q(t[0],`raw`).string,a=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var o,s={};switch(r){case`\\htmlClass`:s.class=i,o={command:`\\htmlClass`,class:i};break;case`\\htmlId`:s.id=i,o={command:`\\htmlId`,id:i};break;case`\\htmlStyle`:s.style=i,o={command:`\\htmlStyle`,style:i};break;case`\\htmlData`:for(var c=`{,}`,l=[],u=``,d=0;d{var n=qn(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=U(r,n,t);for(var a of Object.entries(e.attributes)){var o=a[0],s=a[1];o!==`class`&&i.setAttribute(o,s)}return i},mathmlBuilder:(e,t)=>dr(e.body,t)}),K({type:`htmlmathml`,names:[`\\html@mathml`],numArgs:2,allowedInArgument:!0,allowedInText:!0,handler:(e,t)=>({type:`htmlmathml`,mode:e.parser.mode,html:q(t[0]),mathml:q(t[1])}),htmlBuilder:(e,t)=>En(qn(e.html,t,!1)),mathmlBuilder:(e,t)=>dr(e.mathml,t)});var ia=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new w(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!st(n))throw new w(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};K({type:`includegraphics`,names:[`\\includegraphics`],numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1,handler:(e,t,n)=>{var r=e.parser,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=Q(n[0],`raw`).string.split(`,`),l=0;l{var n=D(e.height,t),r=0;e.totalheight.number>0&&(r=D(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=D(e.width,t));var a={height:O(n+r)};i>0&&(a.width=O(i)),r>0&&(a.verticalAlign=O(-r));var o=new gt(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new Y(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=D(e.height,t),i=0;if(e.totalheight.number>0&&(i=D(e.totalheight,t)-r,n.setAttribute(`valign`,O(-i))),n.setAttribute(`height`,O(r+i)),e.width.number>0){var a=D(e.width,t);n.setAttribute(`width`,O(a))}return n.setAttribute(`src`,e.src),n}}),K({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=Q(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return kn(e.dimension,t)},mathmlBuilder(e,t){return new nr(D(e.dimension,t))}}),K({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=e.funcName,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=U([],[J(e.body,t)]),n=U([`katex-inner`],[n],t)):n=U([`katex-inner`],[J(e.body,t)]);var r=U([`katex-fix`],[]),i=U([e.alignment],[n,r],t),a=U([`katex-strut`]);return a.style.height=O(i.height+i.depth),i.depth&&(a.style.verticalAlign=O(-i.depth)),i.children.unshift(a),i=U([`katex-thinbox`],[i],t),U([`mord`,`katex-vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new Y(`mpadded`,[Z(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),K({type:`styling`,names:[`\\(`,`$`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){var n=e.funcName,r=e.parser,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),K({type:`text`,names:[`\\)`,`\\]`],numArgs:0,allowedInText:!0,allowedInMath:!1,handler(e,t){throw new w(`Mismatched `+e.funcName)}});var aa=(e,t)=>{switch(t.style.size){case E.DISPLAY.size:return e.display;case E.TEXT.size:return e.text;case E.SCRIPT.size:return e.script;case E.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};K({type:`mathchoice`,names:[`\\mathchoice`],numArgs:4,primitive:!0,handler:(e,t)=>({type:`mathchoice`,mode:e.parser.mode,display:q(t[0]),text:q(t[1]),script:q(t[2]),scriptscript:q(t[3])}),htmlBuilder:(e,t)=>En(qn(aa(e,t),t,!1)),mathmlBuilder:(e,t)=>dr(aa(e,t),t)});var oa=(e,t,n,r,i,a,o)=>{e=U([],[e]);var s=n&&_e(n),c,l;if(t){var u=J(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=J(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=W({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:O(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:O(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=W({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:O(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=W({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:O(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=U([`mspace`],[],r);m.style.marginRight=O(a),p.unshift(m)}return U([`mop`,`op-limits`],p,r)},sa=new Set([`\\smallint`]),ca=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Q(e.base,`op`),i=!0):a=Q(e,`op`);var o=t.style,s=!1;o.size===E.DISPLAY.size&&a.symbol&&!sa.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=gn(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=Nn(d+`Size`+(s?`2`:`1`),t);c=W({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=qn(a.body,t,!0);p.length===1&&p[0]instanceof vt?(c=p[0],c.classes[0]=`mop`):c=U([`mop`],p,t)}else{for(var m=[],h=1;h{var n;if(e.symbol)n=new Y(`mo`,[ar(e.name,e.mode)]),sa.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new Y(`mo`,ur(e.body,t));else{n=new Y(`mi`,[new X(e.name.slice(1))]);var r=new Y(`mo`,[ar(`⁡`,`text`)]);n=e.parentIsSupSub?new Y(`mrow`,[n,r]):tr([n,r])}return n},ua={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};K({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),numArgs:0,handler:(e,t)=>{var n=e.parser,r=e.funcName;return r.length===1&&(r=ua[r]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:ca,mathmlBuilder:la}),K({type:`op`,names:[`\\mathop`],numArgs:1,primitive:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:q(r)}}});var da={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};K({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}}}),K({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],numArgs:0,handler(e){var t=e.parser,n=e.funcName;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}}}),K({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],numArgs:0,allowedInArgument:!0,handler(e){var t=e.parser,n=e.funcName;return n.length===1&&(n=da[n]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}}});var fa=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Q(e.base,`operatorname`),i=!0):a=Q(e,`operatorname`);var o;if(a.body.length>0){for(var s=qn(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c{var n=e.parser,r=e.funcName,i=t[0];return{type:`operatorname`,mode:n.mode,body:q(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:fa,mathmlBuilder:(e,t)=>{for(var n=ur(e.body,t.withFont(`mathrm`)),r=!0,i=0;ie.toText()).join(``))]);var s=new Y(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new Y(`mo`,[ar(`⁡`,`text`)]);return e.parentIsSupSub?new Y(`mrow`,[s,c]):tr([s,c])}}),$(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),Vn({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?En(qn(e.body,t,!1)):U([`mord`],qn(e.body,t,!0),t)},mathmlBuilder(e,t){return dr(e.body,t,!0)}}),K({type:`overline`,names:[`\\overline`],numArgs:1,handler(e,t){var n=e.parser,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=J(e.body,t.havingCrampedStyle()),r=wn(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return U([`mord`,`katex-overline`],[W({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new Y(`mo`,[new X(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y(`mover`,[Z(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),K({type:`phantom`,names:[`\\phantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`phantom`,mode:n.mode,body:q(r)}},htmlBuilder:(e,t)=>En(qn(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new Y(`mphantom`,ur(e.body,t))}),$(`\\hphantom`,`\\smash{\\phantom{#1}}`),K({type:`vphantom`,names:[`\\vphantom`],numArgs:1,allowedInText:!0,handler:(e,t)=>{var n=e.parser,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>U([`mord`,`rlap`],[U([`katex-inner`],[J(e.body,t.withPhantom())]),U([`katex-fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new Y(`mpadded`,[new Y(`mphantom`,ur(q(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),K({type:`raisebox`,names:[`\\raisebox`],numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0,handler(e,t){var n=e.parser,r=Q(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=J(e.body,t);return W({positionType:`shift`,positionData:-D(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new Y(`mpadded`,[Z(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),K({type:`internal`,names:[`\\relax`],numArgs:0,allowedInText:!0,allowedInArgument:!0,handler(e){return{type:`internal`,mode:e.parser.mode}}}),K({type:`rule`,names:[`\\rule`],numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`],handler(e,t,n){var r=e.parser,i=n[0],a=Q(t[0],`size`),o=Q(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&Q(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=U([`mord`,`katex-rule`],[],t),r=D(e.width,t),i=D(e.height,t),a=e.shift?D(e.shift,t):0;return n.style.borderRightWidth=O(r),n.style.borderTopWidth=O(i),n.style.bottom=O(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=D(e.width,t),r=D(e.height,t),i=e.shift?D(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new Y(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,O(n)),o.setAttribute(`height`,O(r));var s=new Y(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,O(i)):(s.setAttribute(`height`,O(i)),s.setAttribute(`depth`,O(-i))),s.setAttribute(`voffset`,O(i)),s}});function pa(e,t,n){for(var r=qn(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a{var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:ma.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return pa(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new Y(`mstyle`,ur(e.body,n));return r.setAttribute(`mathsize`,O(n.sizeMultiplier)),r}}),K({type:`smash`,names:[`\\smash`],numArgs:1,numOptionalArgs:1,allowedInText:!0,handler:(e,t,n)=>{var r=e.parser,i=!1,a=!1,o=n[0]&&Q(n[0],`ordgroup`);if(o)for(var s,c=0;c{var n=U([],[J(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return U([`mord`,`katex-smash`],[n],t);if(n.children)for(var r=0;r{var n=new Y(`mpadded`,[Z(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),K({type:`sqrt`,names:[`\\sqrt`],numArgs:1,numOptionalArgs:1,handler(e,t,n){var r=e.parser,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=J(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Dn(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.idn.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=s.height-n.height-a-c;n.style.paddingLeft=O(l);var f=W({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:s},{type:`kern`,size:c}]});if(e.index){var p=t.havingStyle(E.SCRIPTSCRIPT),m=J(e.index,p,t);return U([`mord`,`sqrt`],[U([`katex-root`],[W({positionType:`shift`,positionData:-(.6*(f.height-f.depth)),children:[{type:`elem`,elem:m}]})]),f],t)}return U([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var n=e.body,r=e.index;return r?new Y(`mroot`,[Z(n,t),Z(r,t)]):new Y(`msqrt`,[Z(n,t)])}});var ha={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.SCRIPTSCRIPT};function ga(e){return e in ha}K({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],numArgs:0,allowedInText:!0,primitive:!0,handler(e,t){var n=e.breakOnTokenText,r=e.funcName,i=e.parser,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!ga(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=ha[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),pa(e.body,r,t)},mathmlBuilder(e,t){var n=ha[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new Y(`mstyle`,ur(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var _a=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===E.DISPLAY.size||n.alwaysHandleSupSub)?ca:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===E.DISPLAY.size||n.limits)?fa:null:n.type===`accent`?_e(n.base)?Ir:null:n.type===`horizBrace`&&!e.sub===n.isOver?ra:null:null};Vn({type:`supsub`,htmlBuilder(e,t){var n=_a(e,t);if(n)return n(e,t);var r=e.base,i=e.sup,a=e.sub,o=J(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&_e(r);if(i){var p=t.havingStyle(t.style.sup());s=J(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=J(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===E.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=O(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof vt||y)&&(v=O(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)0&&(u+=S,d-=S)}b=W({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=W({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=W({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return U([Zn(o,`right`)||`mord`],[o,U([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[Z(e.base,t)];e.sub&&a.push(Z(e.sub,t)),e.sup&&a.push(Z(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===E.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===E.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===E.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===E.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===E.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===E.DISPLAY)?`munder`:`msub`}return new Y(o,a)}}),Vn({type:`atom`,htmlBuilder(e,t){return _n(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new Y(`mo`,[ar(e.text,e.mode)]);if(e.family===`bin`){var r=cr(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var va={mi:`italic`,mn:`normal`,mtext:`normal`};Vn({type:`mathord`,htmlBuilder(e,t){return yn(e,t)},mathmlBuilder(e,t){var n=new Y(`mi`,[ar(e.text,e.mode,t)]),r=cr(e,t)||`italic`;return r!==va[n.type]&&n.setAttribute(`mathvariant`,r),n}}),Vn({type:`textord`,htmlBuilder(e,t){return yn(e,t)},mathmlBuilder(e,t){var n=ar(e.text,e.mode,t),r=cr(e,t)||`normal`,i=e.mode===`text`?new Y(`mtext`,[n]):/[0-9]/.test(e.text)?new Y(`mn`,[n]):e.text===`\\prime`?new Y(`mo`,[n]):new Y(`mi`,[n]);return r!==va[i.type]&&i.setAttribute(`mathvariant`,r),i}});var ya=new Map([[`\\nobreak`,`nobreak`],[`\\allowbreak`,`allowbreak`]]),ba=new Map([[` `,{}],[`\\ `,{}],[`~`,{className:`nobreak`}],[`\\space`,{}],[`\\nobreakspace`,{className:`nobreak`}]]);Vn({type:`spacing`,htmlBuilder(e,t){var n=ba.get(e.text),r=ya.get(e.text);if(n){var i=n.className||``;if(e.mode===`text`){var a=yn(e,t);return a.classes.push(i),a}return U([`mspace`,i],[_n(e.text,e.mode,t)],t)}if(r)return U([`mspace`,r],[],t);throw new w(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(ba.has(e.text))n=new Y(`mtext`,[new X(`\xA0`)]);else if(ya.has(e.text))return new Y(`mspace`);else throw new w(`Unknown type of space "`+e.text+`"`);return n}});var xa=()=>{var e=new Y(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};Vn({type:`tag`,mathmlBuilder(e,t){var n=new Y(`mtable`,[new Y(`mtr`,[xa(),new Y(`mtd`,[dr(e.body,t)]),xa(),new Y(`mtd`,[dr(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var Sa={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},Ca={"\\textbf":`textbf`,"\\textmd":`textmd`},wa={"\\textit":`textit`,"\\textup":`textup`},Ta=(e,t)=>{var n=e.font;return n?Sa[n]?t.withTextFontFamily(Sa[n]):Ca[n]?t.withTextFontWeight(Ca[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(wa[n]):t};K({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0,handler(e,t){var n=e.parser,r=e.funcName,i=t[0];return{type:`text`,mode:n.mode,body:q(i),font:r}},htmlBuilder(e,t){var n=Ta(e,t);return U([`mord`,`text`],qn(e.body,n,!0),n)},mathmlBuilder(e,t){var n=Ta(e,t);return dr(e.body,n)}}),K({type:`underline`,names:[`\\underline`],numArgs:1,allowedInText:!0,handler(e,t){return{type:`underline`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=J(e.body,t),r=wn(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return U([`mord`,`katex-underline`],[W({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new Y(`mo`,[new X(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new Y(`munder`,[Z(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),K({type:`vcenter`,names:[`\\vcenter`],numArgs:1,argTypes:[`original`],allowedInText:!1,handler(e,t){return{type:`vcenter`,mode:e.parser.mode,body:t[0]}},htmlBuilder(e,t){var n=J(e.body,t),r=t.fontMetrics().axisHeight;return W({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new Y(`mrow`,[new Y(`mpadded`,[Z(e.body,t)],[`vcenter`])])}}),K({type:`verb`,names:[`\\verb`],numArgs:0,allowedInText:!0,handler(e,t,n){throw new w(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=Ea(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?`␣`:`\xA0`),Da=Rn,Oa=`[ \r + ]`,ka=`\\\\[a-zA-Z@]+`,Aa=`\\\\[^\ud800-\udfff]`,ja=`(`+ka+`)`+Oa+`*`,Ma=`\\\\( +|[ \r ]+ +?)[ \r ]*`,Na=`[̀-ͯ]`,Pa=RegExp(Na+`+$`),Fa=`(`+Oa+`+)|`+(Ma+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(Na+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(Na+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+ja)+(`|`+Aa+`)`),Ia=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Fa,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Li(`EOF`,new Ii(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new w(`Unexpected character: '`+e[t]+`'`,new Li(e[t],new Ii(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(` +`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new Li(r,new Ii(this,t,this.tokenRegex.lastIndex))}},La=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new w(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}},Ra=Fi;$(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),$(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),$(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),$(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),$(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),$(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),$(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var za={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};$(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new w("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=za[t.text],r==null||r>=n)throw new w(`Invalid base-`+n+` digit `+t.text);for(var i;(i=za[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new w(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new w(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new w(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var c=``,l=e.expandNextToken();l.text!==`]`&&l.text!==`EOF`;)c+=l.text,l=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new w(`Invalid number of arguments: `+c);s=parseInt(c),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``};$(`\\newcommand`,e=>Ba(e,!1,!0,!1)),$(`\\renewcommand`,e=>Ba(e,!0,!1,!1)),$(`\\providecommand`,e=>Ba(e,!0,!0,!0)),$(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),$(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),$(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Da[n],k.math[n],k.text[n]),``}),$(`\\bgroup`,`{`),$(`\\egroup`,`}`),$(`~`,`\\nobreakspace`),$(`\\lq`,"`"),$(`\\rq`,`'`),$(`\\aa`,`\\r a`),$(`\\AA`,`\\r A`),$(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),$(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),$(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),$(`ℬ`,`\\mathscr{B}`),$(`ℰ`,`\\mathscr{E}`),$(`ℱ`,`\\mathscr{F}`),$(`ℋ`,`\\mathscr{H}`),$(`ℐ`,`\\mathscr{I}`),$(`ℒ`,`\\mathscr{L}`),$(`ℳ`,`\\mathscr{M}`),$(`ℛ`,`\\mathscr{R}`),$(`ℭ`,`\\mathfrak{C}`),$(`ℌ`,`\\mathfrak{H}`),$(`ℨ`,`\\mathfrak{Z}`),$(`\\Bbbk`,`\\Bbb{k}`),$(`\\llap`,`\\mathllap{\\textrm{#1}}`),$(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),$(`\\clap`,`\\mathclap{\\textrm{#1}}`),$(`\\mathstrut`,`\\vphantom{(}`),$(`\\underbar`,`\\underline{\\text{#1}}`),$(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),$(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),$(`\\ne`,`\\neq`),$(`≠`,`\\neq`),$(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),$(`∉`,`\\notin`),$(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),$(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),$(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),$(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),$(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),$(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),$(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),$(`⟂`,`\\perp`),$(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),$(`∌`,`\\notni`),$(`⌜`,`\\ulcorner`),$(`⌝`,`\\urcorner`),$(`⌞`,`\\llcorner`),$(`⌟`,`\\lrcorner`),$(`©`,`\\copyright`),$(`®`,`\\textregistered`),$(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),$(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),$(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),$(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),$(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),$(`⋮`,`\\vdots`),$(`\\varGamma`,`\\mathit{\\Gamma}`),$(`\\varDelta`,`\\mathit{\\Delta}`),$(`\\varTheta`,`\\mathit{\\Theta}`),$(`\\varLambda`,`\\mathit{\\Lambda}`),$(`\\varXi`,`\\mathit{\\Xi}`),$(`\\varPi`,`\\mathit{\\Pi}`),$(`\\varSigma`,`\\mathit{\\Sigma}`),$(`\\varUpsilon`,`\\mathit{\\Upsilon}`),$(`\\varPhi`,`\\mathit{\\Phi}`),$(`\\varPsi`,`\\mathit{\\Psi}`),$(`\\varOmega`,`\\mathit{\\Omega}`),$(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),$(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),$(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),$(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),$(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),$(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),$(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),$(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var Va={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},Ha=new Set([`bin`,`rel`]);$(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in Va?t=Va[n]:(n.slice(0,4)===`\\not`||n in k.math&&Ha.has(k.math[n].group))&&(t=`\\dotsb`),t});var Ua={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};$(`\\dotso`,function(e){return e.future().text in Ua?`\\ldots\\,`:`\\ldots`}),$(`\\dotsc`,function(e){var t=e.future().text;return t in Ua&&t!==`,`?`\\ldots\\,`:`\\ldots`}),$(`\\cdots`,function(e){return e.future().text in Ua?`\\@cdots\\,`:`\\@cdots`}),$(`\\dotsb`,`\\cdots`),$(`\\dotsm`,`\\cdots`),$(`\\dotsi`,`\\!\\cdots`),$(`\\dotsx`,`\\ldots\\,`),$(`\\DOTSI`,`\\relax`),$(`\\DOTSB`,`\\relax`),$(`\\DOTSX`,`\\relax`),$(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),$(`\\,`,`\\tmspace+{3mu}{.1667em}`),$(`\\thinspace`,`\\,`),$(`\\>`,`\\mskip{4mu}`),$(`\\:`,`\\tmspace+{4mu}{.2222em}`),$(`\\medspace`,`\\:`),$(`\\;`,`\\tmspace+{5mu}{.2777em}`),$(`\\thickspace`,`\\;`),$(`\\!`,`\\tmspace-{3mu}{.1667em}`),$(`\\negthinspace`,`\\!`),$(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),$(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),$(`\\enspace`,`\\kern.5em `),$(`\\enskip`,`\\hskip.5em\\relax`),$(`\\quad`,`\\hskip1em\\relax`),$(`\\qquad`,`\\hskip2em\\relax`),$(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),$(`\\tag@paren`,`\\tag@literal{({#1})}`),$(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new w(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),$(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),$(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),$(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),$(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),$(`\\newline`,`\\\\\\relax`),$(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var Wa=O(Tt[`Main-Regular`][84][1]-.7*Tt[`Main-Regular`][65][1]);$(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+Wa+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),$(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+Wa+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),$(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),$(`\\@hspace`,`\\hskip #1\\relax`),$(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),$(`\\ordinarycolon`,`:`),$(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),$(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),$(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),$(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),$(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),$(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),$(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),$(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),$(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),$(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),$(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),$(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),$(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),$(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),$(`∷`,`\\dblcolon`),$(`∹`,`\\eqcolon`),$(`≔`,`\\coloneqq`),$(`≕`,`\\eqqcolon`),$(`⩴`,`\\Coloneqq`),$(`\\ratio`,`\\vcentcolon`),$(`\\coloncolon`,`\\dblcolon`),$(`\\colonequals`,`\\coloneqq`),$(`\\coloncolonequals`,`\\Coloneqq`),$(`\\equalscolon`,`\\eqqcolon`),$(`\\equalscoloncolon`,`\\Eqqcolon`),$(`\\colonminus`,`\\coloneq`),$(`\\coloncolonminus`,`\\Coloneq`),$(`\\minuscolon`,`\\eqcolon`),$(`\\minuscoloncolon`,`\\Eqcolon`),$(`\\coloncolonapprox`,`\\Colonapprox`),$(`\\coloncolonsim`,`\\Colonsim`),$(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),$(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),$(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),$(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),$(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),$(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),$(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),$(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),$(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),$(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),$(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),$(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),$(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),$(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),$(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),$(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),$(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),$(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),$(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),$(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),$(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),$(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),$(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),$(`\\imath`,`\\html@mathml{\\@imath}{ı}`),$(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),$(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),$(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),$(`⟦`,`\\llbracket`),$(`⟧`,`\\rrbracket`),$(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),$(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),$(`⦃`,`\\lBrace`),$(`⦄`,`\\rBrace`),$(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),$(`⦵`,`\\minuso`),$(`\\darr`,`\\downarrow`),$(`\\dArr`,`\\Downarrow`),$(`\\Darr`,`\\Downarrow`),$(`\\lang`,`\\langle`),$(`\\rang`,`\\rangle`),$(`\\uarr`,`\\uparrow`),$(`\\uArr`,`\\Uparrow`),$(`\\Uarr`,`\\Uparrow`),$(`\\N`,`\\mathbb{N}`),$(`\\R`,`\\mathbb{R}`),$(`\\Z`,`\\mathbb{Z}`),$(`\\alef`,`\\aleph`),$(`\\alefsym`,`\\aleph`),$(`\\Alpha`,`\\mathrm{A}`),$(`\\Beta`,`\\mathrm{B}`),$(`\\bull`,`\\bullet`),$(`\\Chi`,`\\mathrm{X}`),$(`\\clubs`,`\\clubsuit`),$(`\\cnums`,`\\mathbb{C}`),$(`\\Complex`,`\\mathbb{C}`),$(`\\Dagger`,`\\ddagger`),$(`\\diamonds`,`\\diamondsuit`),$(`\\empty`,`\\emptyset`),$(`\\Epsilon`,`\\mathrm{E}`),$(`\\Eta`,`\\mathrm{H}`),$(`\\exist`,`\\exists`),$(`\\harr`,`\\leftrightarrow`),$(`\\hArr`,`\\Leftrightarrow`),$(`\\Harr`,`\\Leftrightarrow`),$(`\\hearts`,`\\heartsuit`),$(`\\image`,`\\Im`),$(`\\infin`,`\\infty`),$(`\\Iota`,`\\mathrm{I}`),$(`\\isin`,`\\in`),$(`\\Kappa`,`\\mathrm{K}`),$(`\\larr`,`\\leftarrow`),$(`\\lArr`,`\\Leftarrow`),$(`\\Larr`,`\\Leftarrow`),$(`\\lrarr`,`\\leftrightarrow`),$(`\\lrArr`,`\\Leftrightarrow`),$(`\\Lrarr`,`\\Leftrightarrow`),$(`\\Mu`,`\\mathrm{M}`),$(`\\natnums`,`\\mathbb{N}`),$(`\\Nu`,`\\mathrm{N}`),$(`\\Omicron`,`\\mathrm{O}`),$(`\\plusmn`,`\\pm`),$(`\\rarr`,`\\rightarrow`),$(`\\rArr`,`\\Rightarrow`),$(`\\Rarr`,`\\Rightarrow`),$(`\\real`,`\\Re`),$(`\\reals`,`\\mathbb{R}`),$(`\\Reals`,`\\mathbb{R}`),$(`\\Rho`,`\\mathrm{P}`),$(`\\sdot`,`\\cdot`),$(`\\sect`,`\\S`),$(`\\spades`,`\\spadesuit`),$(`\\sub`,`\\subset`),$(`\\sube`,`\\subseteq`),$(`\\supe`,`\\supseteq`),$(`\\Tau`,`\\mathrm{T}`),$(`\\thetasym`,`\\vartheta`),$(`\\weierp`,`\\wp`),$(`\\Zeta`,`\\mathrm{Z}`),$(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),$(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),$(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),$(`\\bra`,`\\mathinner{\\langle{#1}|}`),$(`\\ket`,`\\mathinner{|{#1}\\rangle}`),$(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),$(`\\Bra`,`\\left\\langle#1\\right|`),$(`\\Ket`,`\\left|#1\\right\\rangle`);var Ga=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};$(`\\bra@ket`,Ga(!1)),$(`\\bra@set`,Ga(!0)),$(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),$(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),$(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),$(`\\angln`,`{\\angl n}`),$(`\\blue`,`\\textcolor{##6495ed}{#1}`),$(`\\orange`,`\\textcolor{##ffa500}{#1}`),$(`\\pink`,`\\textcolor{##ff00af}{#1}`),$(`\\red`,`\\textcolor{##df0030}{#1}`),$(`\\green`,`\\textcolor{##28ae7b}{#1}`),$(`\\gray`,`\\textcolor{gray}{#1}`),$(`\\purple`,`\\textcolor{##9d38bd}{#1}`),$(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),$(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),$(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),$(`\\blueD`,`\\textcolor{##11accd}{#1}`),$(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),$(`\\tealA`,`\\textcolor{##94fff5}{#1}`),$(`\\tealB`,`\\textcolor{##26edd5}{#1}`),$(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),$(`\\tealD`,`\\textcolor{##01a995}{#1}`),$(`\\tealE`,`\\textcolor{##208170}{#1}`),$(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),$(`\\greenB`,`\\textcolor{##8af281}{#1}`),$(`\\greenC`,`\\textcolor{##74cf70}{#1}`),$(`\\greenD`,`\\textcolor{##1fab54}{#1}`),$(`\\greenE`,`\\textcolor{##0d923f}{#1}`),$(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),$(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),$(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),$(`\\goldD`,`\\textcolor{##e07d10}{#1}`),$(`\\goldE`,`\\textcolor{##a75a05}{#1}`),$(`\\redA`,`\\textcolor{##fca9a9}{#1}`),$(`\\redB`,`\\textcolor{##ff8482}{#1}`),$(`\\redC`,`\\textcolor{##f9685d}{#1}`),$(`\\redD`,`\\textcolor{##e84d39}{#1}`),$(`\\redE`,`\\textcolor{##bc2612}{#1}`),$(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),$(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),$(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),$(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),$(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),$(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),$(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),$(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),$(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),$(`\\purpleE`,`\\textcolor{##543b78}{#1}`),$(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),$(`\\mintB`,`\\textcolor{##edf2df}{#1}`),$(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),$(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),$(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),$(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),$(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),$(`\\grayE`,`\\textcolor{##babec2}{#1}`),$(`\\grayF`,`\\textcolor{##888d93}{#1}`),$(`\\grayG`,`\\textcolor{##626569}{#1}`),$(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),$(`\\grayI`,`\\textcolor{##21242c}{#1}`),$(`\\kaBlue`,`\\textcolor{##314453}{#1}`),$(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var Ka={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},qa=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new La(Ra,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Ia(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new Li(`EOF`,n.loc)),this.pushTokens(r),new Li(``,Ii.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new w(`Extra }`,i)}else if(i.text===`EOF`)throw new w(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new w(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;rthis.settings.maxExpand)throw new w(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new w(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new w(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new w(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Li(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new Ia(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(Da,e)||Object.prototype.hasOwnProperty.call(k.math,e)||Object.prototype.hasOwnProperty.call(k.text,e)||Object.prototype.hasOwnProperty.call(Ka,e)}isExpandable(e){var t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(Da,e)&&!Da[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},Ja=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Ya=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),Xa={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},Za={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},Qa=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new qa(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new w(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Li(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&Da[i.text]&&Da[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r=128)this.settings.strict&&(Ue(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:Ii.range(e),text:t};else return null;if(this.consume(),i)for(var c=0;c{try{return ao.renderToString(u.expr,{displayMode:u.display,throwOnError:!1,output:`html`})}catch{return`${u.expr}`}});return(e,t)=>(y(),c(`span`,{class:p([`dl-katex`,{"is-display":u.display}]),innerHTML:d.value},null,10,oo))}}),[[`__scopeId`,`data-v-78921b68`]]),co={class:`dl-qkv`},lo={class:`dl-qkv__sentence`},uo=[`onClick`],fo={class:`dl-qkv__source`},po={class:`dl-qkv__sourcelabel`},mo={class:`dl-qkv__axis`},ho={class:`dl-qkv__val`},go={class:`dl-qkv__fan`,"aria-hidden":`true`},_o={class:`dl-qkv__lenses`},vo={class:`dl-qkv__lensname`},yo={class:`dl-qkv__role`},bo={class:`dl-qkv__formula`},xo={class:`dl-qkv__vec`},So={key:0,class:`dl-qkv__silent`},Co={key:0,class:`dl-qkv__note`},wo={key:1,class:`dl-qkv__note`},To={key:2,class:`dl-qkv__note`},Eo=b(m({__name:`QkvLab`,props:{sentence:{default:`river`},switchable:{type:Boolean,default:!1}},setup(e){let{$slidev:t,$nav:a,$clicksContext:m,$clicks:v,$page:b,$renderContext:S,$frontmatter:C}=x(),te=e,w=u(te.sentence),de=l(()=>oe[w.value]),fe=u(2),pe=l(()=>de.value[Math.min(fe.value,de.value.length-1)]),me=l(()=>ie[pe.value]),T=[{key:`q`,name:`Query`,symbol:`q`,matrix:`W_Q`,role:`what I am looking for`,weights:le},{key:`k`,name:`Key`,symbol:`k`,matrix:`W_K`,role:`what I advertise`,weights:ce},{key:`v`,name:`Value`,symbol:`v`,matrix:`W_V`,role:`what I hand over`,weights:ae}],he=l(()=>T.map(e=>({...e,vec:se(me.value,e.weights)})));function ge(e){return e.every(e=>e===0)}function _e(){fe.value=(fe.value+1)%de.value.length}function ve(){w.value=w.value===`river`?`money`:`river`}return(e,t)=>{let a=so,l=ne,u=ee;return y(),f(u,{"max-width":`44rem`},{controls:n(()=>[r(l,{label:`Next word`,glyph:`▸`,onClick:_e}),te.switchable?(y(),f(l,{key:0,label:w.value===`river`?`Swap river → money`:`Swap money → river`,variant:`ghost`,glyph:`⇄`,onClick:ve},null,8,[`label`])):_(`v-if`,!0)]),readout:n(()=>[o(`strong`,null,g(pe.value),1),t[6]||=h(` is four numbers, and the three boxes are three `,-1),t[7]||=o(`strong`,null,`learned`,-1),t[8]||=h(` projections of those same four numbers — not three stored things. `,-1),pe.value===`bank`?(y(),c(`span`,Co,[...t[1]||=[h(` Look at x: all of `,-1),o(`em`,null,`bank`,-1),h(`’s mass is on `,-1),o(`em`,null,`thing`,-1),h(`, and none of it on `,-1),o(`em`,null,`water`,-1),h(` or `,-1),o(`em`,null,`money`,-1),h(`. The sense is not in the vector. Its query asks the loudest question in the sentence, and its key advertises nothing — so nobody reads `,-1),o(`em`,null,`bank`,-1),h(` to find out what a bank is. `,-1)]])):pe.value===`the`?(y(),c(`span`,wo,[...t[2]||=[o(`em`,null,`the`,-1),h(` projects to a zero query and a zero key: it asks nothing and advertises nothing. Its row of attention weights will come out flat, and no other word will point at it. `,-1)]])):(y(),c(`span`,To,[o(`em`,null,g(pe.value),1),t[3]||=h(` advertises exactly the thing `,-1),t[4]||=o(`em`,null,`bank`,-1),t[5]||=h(` is about to ask for — which is the whole mechanism, and it is one dot product away. `,-1)]))]),default:n(()=>[o(`div`,co,[_(` One sentence, one word selected. `),o(`div`,lo,[(y(!0),c(d,null,i(de.value,(e,t)=>(y(),c(`button`,{key:e+t,type:`button`,class:p([`dl-qkv__word`,{"is-current":t===fe.value}]),onClick:e=>fe.value=t},g(e),11,uo))),128))]),_(` The one vector everything below is derived from. `),o(`div`,fo,[o(`span`,po,[t[0]||=h(`x`,-1),o(`sub`,null,g(fe.value+1),1)]),(y(!0),c(d,null,i(me.value,(e,t)=>(y(),c(`span`,{key:t,class:p([`dl-qkv__coord`,{"is-zero":e===0}])},[o(`span`,mo,g(s(ue)[t]),1),o(`span`,ho,g(s(re)(e)),1)],2))),128))]),o(`div`,go,[(y(),c(d,null,i(T,e=>o(`span`,{key:e.key,class:`dl-qkv__stem`})),64))]),_(` Three projections of it. `),o(`div`,_o,[(y(!0),c(d,null,i(he.value,e=>(y(),c(`div`,{key:e.key,class:p([`dl-qkv__lens`,{"is-silent":ge(e.vec)}])},[o(`div`,vo,g(e.name),1),o(`div`,yo,g(e.role),1),o(`div`,bo,[r(a,{expr:`\\mathbf{${e.symbol}} = \\mathbf{x}\\,${e.matrix}`},null,8,[`expr`])]),o(`div`,xo,[(y(!0),c(d,null,i(e.vec,(e,t)=>(y(),c(`span`,{key:t,class:`dl-qkv__cell`},g(s(re)(e)),1))),128))]),ge(e.vec)?(y(),c(`div`,So,`all zero`)):_(`v-if`,!0)],2))),128))])])]),_:1})}}}),[[`__scopeId`,`data-v-88443cb2`]]),Do={class:`mt-2 dl-callout`},Oo={__name:`class.md__slidev_16`,setup(i){let{$slidev:l,$nav:u,$clicksContext:d,$clicks:p,$page:m,$renderContext:g,$frontmatter:_}=x();return d.setup(),(i,l)=>{let u=Eo,d=C,p=a(`click`);return y(),f(te,v(t(s(S)(s(_),15))),{aside:n(t=>[l[2]||=o(`p`,null,[h(`Press `),o(`strong`,null,`Next word`),h(`. One vector, three projections of it.`)],-1),r(d,null,{default:n(()=>[...l[0]||=[o(`ul`,null,[o(`li`,null,[o(`em`,null,`the`),h(` — zero query, zero key. Asks nothing, advertises nothing`)]),o(`li`,null,[o(`em`,null,`river`),h(` advertises `),o(`strong`,null,`water`)]),o(`li`,null,[o(`em`,null,`bank`),h(` asks the loudest question, and advertises nothing`)])],-1)]]),_:1}),e((y(),c(`div`,Do,[...l[1]||=[o(`p`,null,[h(`Nobody reads `),o(`em`,null,`bank`),h(` to learn what a bank is.`)],-1)]])),[[p]])]),default:n(()=>[r(u)]),_:1},16)}}};export{Oo as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-CJukBVkv.js b/lecture-06/class/assets/md-CJukBVkv.js new file mode 100644 index 0000000000000000000000000000000000000000..07b9ab1d0174739b5a7ba2d3a255363ff9a16710 --- /dev/null +++ b/lecture-06/class/assets/md-CJukBVkv.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,V as r,W as i,_ as a,_t as o,b as s,m as c,v as l,x as u,yt as d,z as f}from"./modules/shiki-BFOesOFp.js";import{n as p,t as m}from"./slidev/context-DrkI8qiD.js";import{t as h}from"./default-Cq9fupKf.js";var g={class:`mt-1 flex justify-center`},_={viewBox:`0 0 620 240`,class:`dl-diagram is-sm-h`,role:`img`,"aria-label":`An encoder stack reads the source tokens and outputs one vector per token; a decoder stack with three sub-layers reads the encoder output through cross-attention`},v=[`x`],y=[`x`],b=[`x`],x={class:`mt-1 dl-callout`},S={__name:`class.md__slidev_9`,setup(S){let{$slidev:C,$nav:w,$clicksContext:T,$clicks:E,$page:D,$renderContext:O,$frontmatter:k}=p();return T.setup(),(p,S)=>{let C=i(`click`);return f(),l(h,d(t(o(m)(o(k),8))),{default:n(()=>[S[25]||=a(`h1`,null,`Two stacks`,-1),S[26]||=a(`p`,null,[u(`The 2017 paper is a `),a(`strong`,null,`translation`),u(` model. One stack reads the source; the other writes the target.`)],-1),a(`div`,g,[(f(),s(`svg`,_,[S[23]||=a(`defs`,null,[a(`marker`,{id:`l6s3-a1`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[a(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),a(`g`,null,[S[0]||=a(`text`,{class:`dl-dg-small`,x:`140`,y:`14`,"text-anchor":`middle`},`one vector per source token`,-1),(f(),s(c,null,r(3,e=>a(`rect`,{key:`eo${e}`,class:`dl-dg-box is-accent`,x:88+(e-1)*38,y:`22`,width:`26`,height:`22`,rx:`3`},null,8,v)),64)),S[1]||=a(`rect`,{class:`dl-dg-fill is-muted is-dashed`,x:`40`,y:`70`,width:`200`,height:`110`,rx:`6`},null,-1),S[2]||=a(`text`,{class:`dl-dg-small`,x:`52`,y:`86`},`encoder, 6 blocks`,-1),S[3]||=a(`rect`,{class:`dl-dg-box`,x:`60`,y:`94`,width:`160`,height:`30`,rx:`4`},null,-1),S[4]||=a(`text`,{class:`dl-dg-in`,x:`140`,y:`114`,"text-anchor":`middle`},`feed-forward`,-1),S[5]||=a(`rect`,{class:`dl-dg-box`,x:`60`,y:`134`,width:`160`,height:`30`,rx:`4`},null,-1),S[6]||=a(`text`,{class:`dl-dg-in`,x:`140`,y:`154`,"text-anchor":`middle`},`self-attention, no mask`,-1),(f(),s(c,null,r(3,e=>a(`rect`,{key:`ei${e}`,class:`dl-dg-box`,x:88+(e-1)*38,y:`206`,width:`26`,height:`22`,rx:`3`},null,8,y)),64)),S[7]||=a(`text`,{class:`dl-dg-small`,x:`80`,y:`221`,"text-anchor":`end`},`source`,-1),S[8]||=a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s3-a1)`,d:`M140 204 V184`},null,-1),S[9]||=a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s3-a1)`,d:`M140 68 V48`},null,-1)]),e((f(),s(`g`,null,[S[10]||=a(`rect`,{class:`dl-dg-fill is-dashed`,x:`380`,y:`50`,width:`210`,height:`130`,rx:`6`},null,-1),S[11]||=a(`text`,{class:`dl-dg-small`,x:`392`,y:`66`},`decoder, 6 blocks`,-1),S[12]||=a(`rect`,{class:`dl-dg-box`,x:`398`,y:`72`,width:`174`,height:`28`,rx:`4`},null,-1),S[13]||=a(`text`,{class:`dl-dg-in`,x:`485`,y:`91`,"text-anchor":`middle`},`feed-forward`,-1),S[14]||=a(`rect`,{class:`dl-dg-box is-accent`,x:`398`,y:`106`,width:`174`,height:`28`,rx:`4`},null,-1),S[15]||=a(`text`,{class:`dl-dg-in`,x:`485`,y:`125`,"text-anchor":`middle`},`cross-attention`,-1),S[16]||=a(`rect`,{class:`dl-dg-box`,x:`398`,y:`140`,width:`174`,height:`28`,rx:`4`},null,-1),S[17]||=a(`text`,{class:`dl-dg-in`,x:`485`,y:`159`,"text-anchor":`middle`},`masked self-attention`,-1),(f(),s(c,null,r(3,e=>a(`rect`,{key:`di${e}`,class:`dl-dg-box`,x:428+(e-1)*38,y:`206`,width:`26`,height:`22`,rx:`3`},null,8,b)),64)),S[18]||=a(`text`,{class:`dl-dg-small`,x:`420`,y:`221`,"text-anchor":`end`},`target so far`,-1),S[19]||=a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s3-a1)`,d:`M485 204 V184`},null,-1),S[20]||=a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s3-a1)`,d:`M485 48 V26`},null,-1),S[21]||=a(`text`,{class:`dl-dg-small`,x:`497`,y:`22`},`next word`,-1)])),[[C]]),e((f(),s(`g`,null,[...S[22]||=[a(`path`,{class:`dl-dg-line`,"marker-end":`url(#l6s3-a1)`,d:`M192 33 H310 V120 H394`},null,-1),a(`text`,{class:`dl-dg-small is-good`,x:`318`,y:`84`},`K and V`,-1)]])),[[C]])]))]),e((f(),s(`div`,x,[...S[24]||=[a(`p`,null,`One vector per source token: the bottleneck is gone. Nothing has to be summarised in advance.`,-1)]])),[[C]])]),_:1},16)}}};export{S as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-CNfnuG9N2.js b/lecture-06/class/assets/md-CNfnuG9N2.js new file mode 100644 index 0000000000000000000000000000000000000000..2d70b5179f4bb6168dbd4f6707c82b8ac73ddebf --- /dev/null +++ b/lecture-06/class/assets/md-CNfnuG9N2.js @@ -0,0 +1,19 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,_ as o,_t as s,b as c,m as l,v as u,x as d,xt as f,yt as p,z as m}from"./modules/shiki-BFOesOFp.js";import{n as h,t as g}from"./slidev/context-DrkI8qiD.js";import{t as _}from"./slidev/VClicks-Dmx1KjZv.js";import{t as v}from"./default-Cq9fupKf.js";import{t as y}from"./slidev/KaTexBlockWrapper-BIlBldVC.js";var b={class:`grid grid-cols-2 gap-8 mt-1 dl-tight`},x={viewBox:`0 0 300 160`,class:`dl-diagram`,style:{"max-height":`9.5rem`},role:`img`,"aria-label":`One decoder query sends lines of different strength to three encoder outputs, which serve as keys and values`},S=[`y`],C=[`y`],w={class:`mt-2 dl-callout`},T={__name:`class.md__slidev_32`,setup(T){let{$slidev:E,$nav:D,$clicksContext:O,$clicks:k,$page:A,$renderContext:j,$frontmatter:M}=h();return O.setup(),(h,T)=>{let E=y,D=_,O=a(`click`);return m(),u(v,p(t(s(g)(s(M),31))),{default:n(()=>[T[7]||=o(`h1`,null,`Cross-attention: the decoder reads the encoder`,-1),T[8]||=o(`p`,null,[d(`Self-attention takes `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`Q`)]),o(`annotation`,{encoding:`application/x-tex`},`Q`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.8778em`,"vertical-align":`-0.1944em`}}),o(`span`,{class:`mord mathnormal`},`Q`)])])]),d(`, `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`K`)]),o(`annotation`,{encoding:`application/x-tex`},`K`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0715em`}},`K`)])])]),d(` and `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`V`)]),o(`annotation`,{encoding:`application/x-tex`},`V`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.2222em`}},`V`)])])]),d(` from `),o(`strong`,null,`one`),d(` stack. Cross-attention uses `),o(`strong`,null,`two`),d(`.`)],-1),r(E,{ranges:[]},{default:n(()=>[...T[0]||=[o(`p`,null,[o(`span`,{class:`katex-display`},[o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,{mathvariant:`normal`},`Attention`),o(`mo`,null,`⁡`),o(`mo`,{stretchy:`false`},`(`),o(`munder`,null,[o(`munder`,null,[o(`mi`,null,`Q`),o(`mo`,{stretchy:`true`},`⏟`)]),o(`mtext`,null,`decoder`)]),o(`mo`,{separator:`true`},`,`),o(`mtext`,null,`  `),o(`munder`,null,[o(`munder`,null,[o(`mrow`,null,[o(`mi`,null,`K`),o(`mo`,{separator:`true`},`,`),o(`mtext`,null,`  `),o(`mi`,null,`V`)]),o(`mo`,{stretchy:`true`},`⏟`)]),o(`mtext`,null,`encoder`)]),o(`mo`,{stretchy:`false`},`)`)]),o(`annotation`,{encoding:`application/x-tex`},`\\operatorname{Attention}(\\underbrace{Q}_{\\text{decoder}},\\; \\underbrace{K,\\; V}_{\\text{encoder}})`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`2.2785em`,"vertical-align":`-1.5285em`}}),o(`span`,{class:`mop`},[o(`span`,{class:`mord mathrm`},`Attention`)]),o(`span`,{class:`mopen`},`(`),o(`span`,{class:`minner munder`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.6833em`}},[o(`span`,{style:{top:`-1.4715em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},[o(`span`,{class:`mord text mtight`},[o(`span`,{class:`mord mtight`},`decoder`)])])])]),o(`span`,{style:{top:`-3em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`minner munder`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.6833em`}},[o(`span`,{class:`svg-align`,style:{top:`-2.1576em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[o(`span`,{class:`brace-left`,style:{height:`0.548em`}},[o(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[o(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),o(`span`,{class:`brace-center`,style:{height:`0.548em`}},[o(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[o(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),o(`span`,{class:`brace-right`,style:{height:`0.548em`}},[o(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[o(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),o(`span`,{style:{top:`-3em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`},`Q`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.8424em`}},[o(`span`)])])])])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`1.5285em`}},[o(`span`)])])])]),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`mpunct`},`,`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`minner munder`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.6833em`}},[o(`span`,{style:{top:`-1.4715em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},[o(`span`,{class:`mord text mtight`},[o(`span`,{class:`mord mtight`},`encoder`)])])])]),o(`span`,{style:{top:`-3em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`minner munder`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.6833em`}},[o(`span`,{class:`svg-align`,style:{top:`-2.1576em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[o(`span`,{class:`brace-left`,style:{height:`0.548em`}},[o(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[o(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),o(`span`,{class:`brace-center`,style:{height:`0.548em`}},[o(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[o(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),o(`span`,{class:`brace-right`,style:{height:`0.548em`}},[o(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[o(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),o(`span`,{style:{top:`-3em`}},[o(`span`,{class:`pstrut`,style:{height:`3em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0715em`}},`K`),o(`span`,{class:`mpunct`},`,`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.2222em`}},`V`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.8424em`}},[o(`span`)])])])])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`1.5285em`}},[o(`span`)])])])]),o(`span`,{class:`mclose`},`)`)])])])])],-1)]]),_:1}),o(`div`,b,[o(`div`,null,[(m(),c(`svg`,x,[(m(),c(l,null,i(3,e=>o(`rect`,{key:`s${e}`,class:`dl-dg-box`,x:`196`,y:8+(e-1)*48,width:`96`,height:`36`,rx:`4`},null,8,S)),64)),(m(),c(l,null,i(3,e=>o(`text`,{key:`st${e}`,class:`dl-dg-in`,x:`244`,y:31+(e-1)*48,"text-anchor":`middle`},`K, V `+f(e),9,C)),64)),T[2]||=o(`text`,{class:`dl-dg-small`,x:`244`,y:`156`,"text-anchor":`middle`},`encoder output`,-1),e((m(),c(`g`,null,[...T[1]||=[o(`path`,{class:`dl-dg-line is-muted`,d:`M74 75 L194 26`,style:{strokeWidth:1.4}},null,-1),o(`path`,{class:`dl-dg-line`,d:`M74 75 L194 74`,style:{strokeWidth:5}},null,-1),o(`path`,{class:`dl-dg-line is-muted`,d:`M74 75 L194 122`,style:{strokeWidth:2.4}},null,-1)]])),[[O]]),T[3]||=o(`rect`,{class:`dl-dg-box is-accent`,x:`6`,y:`57`,width:`68`,height:`36`,rx:`4`},null,-1),T[4]||=o(`text`,{class:`dl-dg-in`,x:`40`,y:`80`,"text-anchor":`middle`},`Q`,-1)]))]),o(`div`,null,[r(D,null,{default:n(()=>[...T[5]||=[o(`ul`,null,[o(`li`,null,[d(`Decoder query: `),o(`em`,null,`what does the next word need?`)]),o(`li`,null,`Encoder: one key and value per source token`),o(`li`,null,`Score, softmax, weighted sum: Bahdanau’s 2014 attention`)],-1)]]),_:1}),e((m(),c(`div`,w,[...T[6]||=[o(`p`,null,[d(`Compared with 2014: a `),o(`strong`,null,`scaled dot product`),d(` score, and no recurrence on either side.`)],-1)]])),[[O]])])])]),_:1},16)}}};export{T as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-Cdeogdwt.js b/lecture-06/class/assets/md-Cdeogdwt.js new file mode 100644 index 0000000000000000000000000000000000000000..e836d0608450e25582795d9affd0e5ff9d7c2d66 --- /dev/null +++ b/lecture-06/class/assets/md-Cdeogdwt.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,W as i,_ as a,_t as o,b as s,v as c,x as l,yt as u,z as d}from"./modules/shiki-BFOesOFp.js";import{n as f,t as p}from"./slidev/context-DrkI8qiD.js";import{t as m}from"./slidev/VClicks-Dmx1KjZv.js";import{t as h}from"./default-Cq9fupKf.js";var g={class:`grid grid-cols-[0.9fr_1.1fr] gap-8 mt-2 items-start`},_={viewBox:`0 0 240 300`,class:`dl-diagram`,role:`img`,"aria-label":`Input x goes up two paths: through the sub-layer, and a copy unchanged. The two are added at a plus sign, then LayerNorm, giving an output of the same shape`,style:{"max-height":`17rem`}},v={class:`dl-tight`},y={class:`mt-3 dl-callout`},b={__name:`class.md__slidev_27`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=m,S=i(`click`);return d(),c(h,u(t(o(p)(o(D),26))),{default:n(()=>[b[6]||=a(`h1`,null,`Two wrappers that make it stackable`,-1),b[7]||=a(`p`,null,`Each sub-layer is wrapped the same way, so blocks can be stacked.`,-1),a(`div`,g,[a(`div`,null,[(d(),s(`svg`,_,[...b[0]||=[a(`defs`,null,[a(`marker`,{id:`l6s2-wrap-arrow`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[a(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),a(`rect`,{class:`dl-dg-box`,x:`95`,y:`264`,width:`50`,height:`28`,rx:`4`},null,-1),a(`text`,{class:`dl-dg-lab`,x:`120`,y:`284`,"text-anchor":`middle`},`x`,-1),a(`path`,{class:`dl-dg-grad is-good`,"marker-end":`url(#l6s2-wrap-arrow)`,d:`M120 262 V150`,style:{"stroke-width":`2.4`}},null,-1),a(`text`,{class:`dl-dg-small is-good`,x:`112`,y:`214`,"text-anchor":`end`},`x copied,`,-1),a(`text`,{class:`dl-dg-small is-good`,x:`112`,y:`228`,"text-anchor":`end`},`unchanged`,-1),a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s2-wrap-arrow)`,d:`M120 244 H190 V214`},null,-1),a(`rect`,{class:`dl-dg-box is-accent`,x:`146`,y:`172`,width:`88`,height:`40`,rx:`4`},null,-1),a(`text`,{class:`dl-dg-small`,x:`190`,y:`196`,"text-anchor":`middle`},`sub-layer`,-1),a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s2-wrap-arrow)`,d:`M190 170 V136 H136`},null,-1),a(`circle`,{class:`dl-dg-op`,cx:`120`,cy:`136`,r:`13`},null,-1),a(`text`,{class:`dl-dg-lab is-sm`,x:`120`,y:`141`,"text-anchor":`middle`},`+`,-1),a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s2-wrap-arrow)`,d:`M120 122 V104`},null,-1),a(`rect`,{class:`dl-dg-box`,x:`60`,y:`72`,width:`120`,height:`30`,rx:`4`},null,-1),a(`text`,{class:`dl-dg-small`,x:`120`,y:`91`,"text-anchor":`middle`},`LayerNorm`,-1),a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s2-wrap-arrow)`,d:`M120 70 V40`},null,-1),a(`text`,{class:`dl-dg-small`,x:`120`,y:`30`,"text-anchor":`middle`},`same shape out`,-1)]]))]),a(`div`,v,[b[4]||=a(`h3`,null,`Residual`,-1),r(x,null,{default:n(()=>[...b[1]||=[a(`ul`,null,[a(`li`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`x`),a(`mo`,null,`+`),a(`mi`,{mathvariant:`normal`},`SubLayer`),a(`mo`,null,`⁡`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,{mathvariant:`bold`},`x`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{x} + \\operatorname{SubLayer}(\\mathbf{x})`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord mathbf`},`x`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mop`},[a(`span`,{class:`mord mathrm`},`SubLayer`)]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathbf`},`x`),a(`span`,{class:`mclose`},`)`)])])]),l(`: `),a(`strong`,null,`add`),l(`, never replace`)]),a(`li`,null,`A gradient path with no matrix on it, as in a ResNet`)],-1)]]),_:1}),b[5]||=a(`h3`,null,`LayerNorm`,-1),r(x,null,{default:n(()=>[...b[2]||=[a(`ul`,null,[a(`li`,null,[l(`Re-centre and re-scale `),a(`strong`,null,`each position’s own vector`)]),a(`li`,null,`Not BatchNorm: nothing is shared across the batch or across time`)],-1)]]),_:1}),e((d(),s(`div`,y,[...b[3]||=[a(`p`,null,[l(`Same shape in, `),a(`strong`,null,`same shape out`),l(`. That is why blocks stack.`)],-1)]])),[[S]])])])]),_:1},16)}}};export{b as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-Cuhu_vvG2.js b/lecture-06/class/assets/md-Cuhu_vvG2.js new file mode 100644 index 0000000000000000000000000000000000000000..e21f6526c62f30b2df0afd7e608a8ed826fcc7f4 --- /dev/null +++ b/lecture-06/class/assets/md-Cuhu_vvG2.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,_ as o,_t as s,b as c,m as l,v as u,x as d,xt as f,yt as p,z as m}from"./modules/shiki-BFOesOFp.js";import{n as h,t as g}from"./slidev/context-DrkI8qiD.js";import{t as _}from"./slidev/VClicks-Dmx1KjZv.js";import{t as v}from"./default-Cq9fupKf.js";import{t as y}from"./slidev/KaTexBlockWrapper-BIlBldVC.js";var b={class:`mt-1`},x={class:`grid grid-cols-2 gap-8 mt-1 dl-tight`},S={class:`mt-2 dl-secondary`},C={viewBox:`0 0 600 170`,class:`dl-diagram`,role:`img`,"aria-label":`The words the, river and bank each go up through their own copy of the same feed-forward network; there are no arrows between the columns`},w=[`x`],T=[`x`],E=[`d`],D=[`points`],O=[`x`],k=[`d`],A=[`x`],j={class:`mt-2 dl-callout`},M={__name:`class.md__slidev_26`,setup(M){let{$slidev:N,$nav:P,$clicksContext:F,$clicks:I,$page:L,$renderContext:R,$frontmatter:z}=h();return F.setup(),(h,M)=>{let N=y,P=_,F=a(`click`);return m(),u(v,p(t(s(g)(s(z),25))),{default:n(()=>[M[5]||=o(`h1`,null,`The other half of the block`,-1),M[6]||=o(`p`,null,[d(`After attention mixes the positions, each position goes through the `),o(`strong`,null,`same small network, alone`),d(`:`)],-1),o(`div`,b,[r(N,{ranges:[]},{default:n(()=>[...M[0]||=[o(`p`,null,[o(`span`,{class:`katex-display`},[o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,{mathvariant:`normal`},`FFN`),o(`mo`,null,`⁡`),o(`mo`,{stretchy:`false`},`(`),o(`mi`,{mathvariant:`bold`},`x`),o(`mo`,{stretchy:`false`},`)`),o(`mo`,null,`=`),o(`msub`,null,[o(`mi`,null,`W`),o(`mn`,null,`2`)]),o(`mtext`,null,` `),o(`mi`,null,`ϕ`),o(`mtext`,null,` ⁣`),o(`mrow`,null,[o(`mo`,{fence:`true`},`(`),o(`msub`,null,[o(`mi`,null,`W`),o(`mn`,null,`1`)]),o(`mi`,{mathvariant:`bold`},`x`),o(`mo`,null,`+`),o(`msub`,null,[o(`mi`,{mathvariant:`bold`},`b`),o(`mn`,null,`1`)]),o(`mo`,{fence:`true`},`)`)]),o(`mo`,null,`+`),o(`msub`,null,[o(`mi`,{mathvariant:`bold`},`b`),o(`mn`,null,`2`)])]),o(`annotation`,{encoding:`application/x-tex`},`\\operatorname{FFN}(\\mathbf{x}) = W_2\\,\\phi\\!\\left(W_1\\mathbf{x} + \\mathbf{b}_1\\right) + \\mathbf{b}_2`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),o(`span`,{class:`mop`},[o(`span`,{class:`mord mathrm`},`FFN`)]),o(`span`,{class:`mopen`},`(`),o(`span`,{class:`mord mathbf`},`x`),o(`span`,{class:`mclose`},`)`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`=`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3011em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},`2`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.15em`}},[o(`span`)])])])])]),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`mord mathnormal`},`ϕ`),o(`span`,{class:`mspace`,style:{"margin-right":`-0.1667em`}}),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`minner`},[o(`span`,{class:`mopen delimcenter`,style:{top:`0em`}},`(`),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3011em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},`1`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.15em`}},[o(`span`)])])])])]),o(`span`,{class:`mord mathbf`},`x`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mbin`},`+`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathbf`},`b`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3011em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},`1`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.15em`}},[o(`span`)])])])])]),o(`span`,{class:`mclose delimcenter`,style:{top:`0em`}},`)`)]),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mbin`},`+`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.8444em`,"vertical-align":`-0.15em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathbf`},`b`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3011em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},`2`)])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.15em`}},[o(`span`)])])])])])])])])])],-1)]]),_:1})]),o(`div`,x,[o(`div`,null,[r(P,null,{default:n(()=>[...M[1]||=[o(`ul`,null,[o(`li`,null,`Two linear layers and a non-linearity: an MLP (multilayer perceptron)`),o(`li`,null,[o(`strong`,null,`Position-wise`),d(`: no token sees another`)]),o(`li`,null,[d(`Wide in the middle: `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`msub`,null,[o(`mi`,null,`d`),o(`mtext`,null,`ff`)]),o(`mo`,null,`=`),o(`mn`,null,`4`),o(`mi`,null,`d`),o(`mo`,null,`=`),o(`mn`,null,`2048`)]),o(`annotation`,{encoding:`application/x-tex`},`d_{\\text{ff}} = 4d = 2048`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.8444em`,"vertical-align":`-0.15em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`},`d`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t vlist-t2`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.3361em`}},[o(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},[o(`span`,{class:`mord text mtight`},[o(`span`,{class:`mord mtight`},`ff`)])])])])]),o(`span`,{class:`vlist-s`},`​`)]),o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.15em`}},[o(`span`)])])])])]),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`=`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),o(`span`,{class:`mord`},`4`),o(`span`,{class:`mord mathnormal`},`d`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`=`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),o(`span`,{class:`mord`},`2048`)])])])])],-1)]]),_:1}),e((m(),c(`div`,S,[...M[2]||=[o(`p`,null,[o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mn`,null,`2`),o(`mo`,null,`×`),o(`mn`,null,`512`),o(`mo`,null,`×`),o(`mn`,null,`2048`),o(`mo`,null,`=`),o(`mn`,null,`2`),o(`mtext`,null,` `),o(`mn`,null,`097`),o(`mtext`,null,` `),o(`mn`,null,`152`)]),o(`annotation`,{encoding:`application/x-tex`},`2 \\times 512 \\times 2048 = 2\\,097\\,152`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),o(`span`,{class:`mord`},`2`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mbin`},`×`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),o(`span`,{class:`mord`},`512`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),o(`span`,{class:`mbin`},`×`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),o(`span`,{class:`mord`},`2048`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`=`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),o(`span`,{class:`mord`},`2`),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`mord`},`097`),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`mord`},`152`)])])]),d(` weights, against 1.05 M for attention: `),o(`strong`,null,`two thirds of the block.`)],-1)]])),[[F]])]),o(`div`,null,[(m(),c(`svg`,C,[M[3]||=o(`defs`,null,[o(`marker`,{id:`l6s2-ffn-arrow`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[o(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),(m(),c(l,null,i([`the`,`river`,`bank`],(e,t)=>o(`g`,{key:t},[o(`rect`,{class:`dl-dg-box`,x:50+t*200,y:`138`,width:`100`,height:`28`,rx:`4`},null,8,w),o(`text`,{class:`dl-dg-lab is-sm`,x:100+t*200,y:`157`,"text-anchor":`middle`},f(e),9,T),o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s2-ffn-arrow)`,d:`M`+(100+t*200)+` 136 V120`},null,8,E),o(`polygon`,{class:`dl-dg-net`,points:80+t*200+`,116 `+(120+t*200)+`,116 `+(160+t*200)+`,80 `+(120+t*200)+`,44 `+(80+t*200)+`,44 `+(40+t*200)+`,80`},null,8,D),o(`text`,{class:`dl-dg-in`,x:100+t*200,y:`85`,"text-anchor":`middle`},`FFN`,8,O),o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s2-ffn-arrow)`,d:`M`+(100+t*200)+` 42 V24`},null,8,k),o(`rect`,{class:`dl-dg-box is-accent`,x:60+t*200,y:`2`,width:`80`,height:`20`,rx:`4`},null,8,A)])),64))])),e((m(),c(`div`,j,[...M[4]||=[o(`p`,null,[d(`Attention decides `),o(`strong`,null,`what to gather`),d(`. This decides `),o(`strong`,null,`what to do with it`),d(`.`)],-1)]])),[[F]])])])]),_:1},16)}}};export{M as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-CwNbuyVx2.js b/lecture-06/class/assets/md-CwNbuyVx2.js new file mode 100644 index 0000000000000000000000000000000000000000..75a4c97256c91f66ef298eda43c38ad2a388039e --- /dev/null +++ b/lecture-06/class/assets/md-CwNbuyVx2.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,W as r,_ as i,_t as a,b as o,v as s,x as c,yt as l,z as u}from"./modules/shiki-BFOesOFp.js";import{n as d,t as f}from"./slidev/context-DrkI8qiD.js";import{t as p}from"./default-Cq9fupKf.js";var m={class:`grid grid-cols-2 gap-6 mt-2`},h={viewBox:`0 0 480 140`,class:`dl-diagram`,style:{"max-height":`8rem`},role:`img`,"aria-label":`Each model drawn as a rectangle with width proportional to d_model and height proportional to the number of blocks; the growth is mostly in width`},g={class:`dl-callout`},_={class:`mt-2 dl-secondary`},v={__name:`class.md__slidev_37`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=d();return x.setup(),(d,v)=>{let y=r(`click`);return u(),s(p,l(t(a(f)(a(T),36))),{default:n(()=>[v[3]||=i(`h1`,null,`The same block, more of it`,-1),v[4]||=i(`div`,{class:`dl-ledger dl-ledger--scale mt-1`},[i(`table`,null,[i(`thead`,null,[i(`tr`,null,[i(`th`),i(`th`,null,`year`),i(`th`,null,`blocks`),i(`th`,null,[i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msub`,null,[i(`mi`,null,`d`),i(`mtext`,null,`model`)])]),i(`annotation`,{encoding:`application/x-tex`},`d_{\\text{model}}`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.8444em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`d`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3361em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mord text mtight`},[i(`span`,{class:`mord mtight`},`model`)])])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])])]),i(`th`,null,`heads`),i(`th`,null,`context`),i(`th`,null,`parameters`)])]),i(`tbody`,null,[i(`tr`,null,[i(`td`,null,`Transformer base`),i(`td`,null,`2017`),i(`td`,null,`6`),i(`td`,null,`512`),i(`td`,null,`8`),i(`td`,null,`512`),i(`td`,null,`65 M`)]),i(`tr`,null,[i(`td`,null,`BERT base`),i(`td`,null,`2018`),i(`td`,null,`12`),i(`td`,null,`768`),i(`td`,null,`12`),i(`td`,null,`512`),i(`td`,null,`110 M`)]),i(`tr`,null,[i(`td`,null,`GPT-2 XL`),i(`td`,null,`2019`),i(`td`,null,`48`),i(`td`,null,`1600`),i(`td`,null,`25`),i(`td`,null,`1024`),i(`td`,null,`1.5 B`)]),i(`tr`,null,[i(`td`,null,`GPT-3`),i(`td`,null,`2020`),i(`td`,null,`96`),i(`td`,null,`12288`),i(`td`,null,`96`),i(`td`,null,`2048`),i(`td`,null,`175 B`)]),i(`tr`,null,[i(`td`,null,`Llama 3.1 70B`),i(`td`,null,`2024`),i(`td`,null,`80`),i(`td`,null,`8192`),i(`td`,null,`64`),i(`td`,null,`128 k`),i(`td`,null,`70 B`)])])])],-1),i(`div`,m,[i(`div`,null,[(u(),o(`svg`,h,[...v[0]||=[i(`text`,{class:`dl-dg-small`,x:`4`,y:`12`},`width = d_model · height = blocks`,-1),i(`rect`,{class:`dl-dg-fill is-muted`,x:`10`,y:`94.4`,width:`6.2`,height:`5.6`},null,-1),i(`rect`,{class:`dl-dg-fill is-muted`,x:`75`,y:`88.8`,width:`9.4`,height:`11.2`},null,-1),i(`rect`,{class:`dl-dg-fill is-muted`,x:`135`,y:`55`,width:`19.5`,height:`45`},null,-1),i(`rect`,{class:`dl-dg-fill`,x:`190`,y:`10`,width:`150`,height:`90`},null,-1),i(`rect`,{class:`dl-dg-fill`,x:`360`,y:`25`,width:`100`,height:`75`},null,-1),i(`path`,{class:`dl-dg-split`,d:`M4 100 H476`},null,-1),i(`text`,{class:`dl-dg-small`,x:`13`,y:`118`,"text-anchor":`middle`},`2017`,-1),i(`text`,{class:`dl-dg-small`,x:`80`,y:`118`,"text-anchor":`middle`},`BERT`,-1),i(`text`,{class:`dl-dg-small`,x:`145`,y:`118`,"text-anchor":`middle`},`GPT-2 XL`,-1),i(`text`,{class:`dl-dg-small`,x:`265`,y:`118`,"text-anchor":`middle`},`GPT-3`,-1),i(`text`,{class:`dl-dg-small`,x:`410`,y:`118`,"text-anchor":`middle`},`Llama 3.1`,-1)]]))]),i(`div`,null,[e((u(),o(`div`,g,[...v[1]||=[i(`p`,null,[c(`Deeper, wider, longer — and the `),i(`strong`,null,`same block`),c(`.`)],-1)]])),[[y]]),e((u(),o(`div`,_,[...v[2]||=[i(`p`,null,[c(`Context grew 250-fold, so the `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msup`,null,[i(`mi`,null,`T`),i(`mn`,null,`2`)])]),i(`annotation`,{encoding:`application/x-tex`},`T^2`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.8141em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.8141em`}},[i(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`2`)])])])])])])])])])]),c(` cost grew too. Faster kernels and caching kept it affordable.`)],-1)]])),[[y]])])])]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-Cy5aODuI.js b/lecture-06/class/assets/md-Cy5aODuI.js new file mode 100644 index 0000000000000000000000000000000000000000..758f013e8764ab27509a8c51023181ad4c501c39 --- /dev/null +++ b/lecture-06/class/assets/md-Cy5aODuI.js @@ -0,0 +1,2 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,Y as o,_ as s,_t as c,b as l,bt as u,g as d,lt as f,m as p,v as m,vt as h,w as g,x as _,xt as v,y,yt as b,z as x}from"./modules/shiki-BFOesOFp.js";import{t as S}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as C,t as w}from"./slidev/context-DrkI8qiD.js";import{t as T}from"./slidev/VClicks-Dmx1KjZv.js";import{n as E,t as D}from"./interactive-CI8hm4xw.js";import{t as ee}from"./StepButton-BcP33F-1.js";import{t as O}from"./useConvolution-qO1u8ksh.js";import{i as k,u as A}from"./useAttention-Blk0c2BZ.js";var j={class:`dl-att`},te={class:`dl-att__query`},ne=[`onClick`],re={key:0,class:`dl-att__qvec`},M={class:`dl-att__grid`},N={class:`dl-att__given`},P={class:`dl-att__given`},F={key:0,class:`dl-att__step`},I={key:1,class:`dl-att__step`},L={key:2,class:`dl-att__step is-weights`},R={class:`dl-att__weight`},z={class:`dl-att__bar`},B={key:3,class:`dl-att__step`},V={class:`dl-att__outlabel`},H={class:`dl-att__outvec`},U={key:0,class:`dl-att__note`},W=5,G=S(g({__name:`AttentionTrace`,props:{sentence:{default:`river`},query:{default:2},switchable:{type:Boolean,default:!0},causal:{type:Boolean,default:!1}},setup(e){let{$slidev:t,$nav:a,$clicksContext:g,$clicks:b,$page:S,$renderContext:w,$frontmatter:T}=C(),D=e,G=f(D.sentence),K=f(D.query),q=f(0),J=d(()=>A(k[G.value],D.causal)),Y=d(()=>J.value.words),X=d(()=>J.value.rows[Math.min(K.value,Y.value.length-1)]),Z=d(()=>{let e=X.value.weights,t=e.indexOf(Math.max(...e));return{index:t,word:Y.value[t],weight:e[t]}}),Q=d(()=>q.value>=W);function ie(){q.value=Q.value?0:q.value+1}function ae(e){K.value=e,q.value=0}function oe(){G.value=G.value===`river`?`money`:`river`}o(G,()=>{q.value=0});function $(e){return e.toFixed(2)}let se=[`press Next step — the keys and values are already here, the query is what is new`,`the query: one vector, and the only thing about this step that is new`,`score it against every key — one dot product per position, including its own`,`divide by √d_k, so the softmax does not saturate once d_k gets large`,`softmax: the scores become weights that are positive and sum to exactly 1`,`multiply each value by its weight and add them up — that is the new vector`],ce=d(()=>se[q.value]);return(e,t)=>{let a=ee,o=E;return x(),m(o,{"max-width":`44rem`},{controls:n(()=>[r(a,{label:Q.value?`Start over`:`Next step`,glyph:`▸`,onClick:ie},null,8,[`label`]),D.switchable?(x(),m(a,{key:0,label:G.value===`river`?`Swap river → money`:`Swap money → river`,variant:`ghost`,glyph:`⇄`,onClick:oe},null,8,[`label`])):y(`v-if`,!0)]),readout:n(()=>[q.valuec(O)(e)).join(`, `))+`]. `,1),X.value.word===`bank`?(x(),l(`span`,U,[t[11]||=_(` Press `,-1),t[12]||=s(`em`,null,`Swap`,-1),t[13]||=_(`. The four matrices do not change and neither does the word — only its neighbour does — and `,-1),t[14]||=s(`em`,null,`bank`,-1),_(`’s output flips to [`+v([...X.value.out].reverse().map(e=>c(O)(e)).join(`, `))+`]. That is what “contextual” means, and it is the entire reason this mechanism exists. `,1)])):y(`v-if`,!0)],64))]),default:n(()=>[s(`div`,j,[y(` Who is asking. `),s(`div`,te,[t[0]||=s(`span`,{class:`dl-att__qlabel`},`query`,-1),(x(!0),l(p,null,i(Y.value,(e,t)=>(x(),l(`button`,{key:e+t,type:`button`,class:h([`dl-att__word`,{"is-current":t===K.value}]),onClick:e=>ae(t)},v(e),11,ne))),128)),q.value>=1?(x(),l(`span`,re,` q = [`+v(X.value.q.map(e=>c(O)(e)).join(`, `))+`] `,1)):y(`v-if`,!0)]),s(`table`,M,[s(`thead`,null,[s(`tr`,null,[t[1]||=s(`th`,{class:`dl-att__rowlabel`},null,-1),(x(!0),l(p,null,i(Y.value,(e,t)=>(x(),l(`th`,{key:e+t,class:h([`dl-att__col`,{"is-focus":q.value>=4&&t===Z.value.index}])},v(e),3))),128))])]),s(`tbody`,null,[y(` Present from the start: these are not recomputed per query. `),s(`tr`,N,[t[2]||=s(`th`,{class:`dl-att__rowlabel`},`key`,-1),(x(!0),l(p,null,i(J.value.k,(e,t)=>(x(),l(`td`,{key:`k${t}`},`[`+v(e.map(e=>c(O)(e)).join(`, `))+`]`,1))),128))]),s(`tr`,P,[t[3]||=s(`th`,{class:`dl-att__rowlabel`},`value`,-1),(x(!0),l(p,null,i(J.value.v,(e,t)=>(x(),l(`td`,{key:`v${t}`},`[`+v(e.map(e=>c(O)(e)).join(`, `))+`]`,1))),128))]),q.value>=2?(x(),l(`tr`,F,[t[4]||=s(`th`,{class:`dl-att__rowlabel`},[s(`span`,{class:`dl-att__n`},`1`),_(` q · k`)],-1),(x(!0),l(p,null,i(X.value.raw,(e,t)=>(x(),l(`td`,{key:`s${t}`},v(c(O)(e)),1))),128))])):y(`v-if`,!0),q.value>=3?(x(),l(`tr`,I,[t[5]||=s(`th`,{class:`dl-att__rowlabel`},[s(`span`,{class:`dl-att__n`},`2`),_(` ÷ √d`),s(`sub`,null,`k`)],-1),(x(!0),l(p,null,i(X.value.scaled,(e,t)=>(x(),l(`td`,{key:`c${t}`},v(e===null?`−∞`:c(O)(e)),1))),128))])):y(`v-if`,!0),q.value>=4?(x(),l(`tr`,L,[t[6]||=s(`th`,{class:`dl-att__rowlabel`},[s(`span`,{class:`dl-att__n`},`3`),_(` softmax`)],-1),(x(!0),l(p,null,i(X.value.weights,(e,t)=>(x(),l(`td`,{key:`w${t}`},[s(`div`,R,v($(e)),1),s(`div`,z,[s(`span`,{style:u({width:`${e*100}%`})},null,4)])]))),128))])):y(`v-if`,!0),q.value>=5?(x(),l(`tr`,B,[t[7]||=s(`th`,{class:`dl-att__rowlabel`},[s(`span`,{class:`dl-att__n`},`4`),_(` w · v`)],-1),(x(!0),l(p,null,i(X.value.terms,(e,t)=>(x(),l(`td`,{key:`t${t}`},`[`+v(e.map(e=>c(O)(e)).join(`, `))+`]`,1))),128))])):y(`v-if`,!0)])]),y(` Height reserved whether or not line 5 is showing, so the widget does + not walk down the slide as the room clicks through it. `),s(`div`,{class:h([`dl-att__out`,{"is-empty":q.value=W?(x(),l(p,{key:0},[t[8]||=s(`span`,{class:`dl-att__n`},`5`,-1),t[9]||=s(`span`,{class:`dl-att__sum`},`sum`,-1),t[10]||=s(`span`,{class:`dl-att__arrow`},`→`,-1),s(`span`,V,v(X.value.word)+`′ =`,1),s(`span`,H,[(x(!0),l(p,null,i(X.value.out,(e,t)=>(x(),l(`span`,{key:t,class:`dl-att__outcell`},v(c(O)(e)),1))),128))])],64)):y(`v-if`,!0)],2)])]),_:1})}}}),[[`__scopeId`,`data-v-284316ce`]]),K={class:`mt-2 dl-callout`},q={__name:`class.md__slidev_18`,setup(i){let{$slidev:o,$nav:u,$clicksContext:d,$clicks:f,$page:p,$renderContext:h,$frontmatter:g}=C();return d.setup(),(i,o)=>{let u=G,d=T,f=a(`click`);return x(),m(D,b(t(c(w)(c(g),17))),{aside:n(t=>[o[2]||=s(`p`,null,[_(`Walk to line 5, then press `),s(`strong`,null,`Swap river → money`),_(`.`)],-1),r(d,null,{default:n(()=>[...o[0]||=[s(`ul`,null,[s(`li`,null,[_(`The model did not change — same `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mi`,null,`W`),s(`mi`,null,`Q`)])]),s(`annotation`,{encoding:`application/x-tex`},`W_Q`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.9694em`,"vertical-align":`-0.2861em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3283em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`Q`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.2861em`}},[s(`span`)])])])])])])])]),_(`, `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mi`,null,`W`),s(`mi`,null,`K`)])]),s(`annotation`,{encoding:`application/x-tex`},`W_K`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3283em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0715em`}},`K`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])])])])]),_(`, `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mi`,null,`W`),s(`mi`,null,`V`)])]),s(`annotation`,{encoding:`application/x-tex`},`W_V`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3283em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.2222em`}},`V`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])])])])])]),s(`li`,null,[s(`em`,null,`bank`),_(` is the same word, with the same embedding`)]),s(`li`,null,[_(`Its output goes `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mo`,{stretchy:`false`},`[`),s(`mn`,null,`1.68`),s(`mo`,{separator:`true`},`,`),s(`mtext`,null,` `),s(`mn`,null,`0.33`),s(`mo`,{stretchy:`false`},`]`),s(`mo`,null,`→`),s(`mo`,{stretchy:`false`},`[`),s(`mn`,null,`0.33`),s(`mo`,{separator:`true`},`,`),s(`mtext`,null,` `),s(`mn`,null,`1.68`),s(`mo`,{stretchy:`false`},`]`)]),s(`annotation`,{encoding:`application/x-tex`},`[1.68,\\, 0.33] \\to [0.33,\\, 1.68]`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),s(`span`,{class:`mopen`},`[`),s(`span`,{class:`mord`},`1.68`),s(`span`,{class:`mpunct`},`,`),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},`0.33`),s(`span`,{class:`mclose`},`]`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`→`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),s(`span`,{class:`mopen`},`[`),s(`span`,{class:`mord`},`0.33`),s(`span`,{class:`mpunct`},`,`),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},`1.68`),s(`span`,{class:`mclose`},`]`)])])])])],-1)]]),_:1}),e((x(),l(`div`,K,[...o[1]||=[s(`p`,null,`Sense is not in the word. It is assembled, per sentence, by the layer.`,-1)]])),[[f]])]),default:n(()=>[r(u,{query:2})]),_:1},16)}}};export{q as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-Cyf0zl3n.js b/lecture-06/class/assets/md-Cyf0zl3n.js new file mode 100644 index 0000000000000000000000000000000000000000..31e87b49c2e4adbaa6f27f05ef721e9a2f312fbe --- /dev/null +++ b/lecture-06/class/assets/md-Cyf0zl3n.js @@ -0,0 +1 @@ +import{E as e,Q as t,S as n,_ as r,_t as i,v as a,yt as o,z as s}from"./modules/shiki-BFOesOFp.js";import{n as c,t as l}from"./slidev/context-DrkI8qiD.js";import{t as u}from"./TransformerGlyph-D9TehqNe.js";import{t as d}from"./section-C2g2VRmZ.js";var f={class:`absolute right-18 top-1/2 -translate-y-1/2`},p={__name:`class.md__slidev_30`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return s(),a(d,o(e(i(l)(i(b),29))),{default:t(()=>[p[0]||=r(`h1`,null,`Inside the decoder`,-1),p[1]||=r(`p`,null,`Two extras: a mask, and a wire into the encoder.`,-1),r(`div`,f,[n(m,{kind:`decoder`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-D-S0zhLV.js b/lecture-06/class/assets/md-D-S0zhLV.js new file mode 100644 index 0000000000000000000000000000000000000000..fba264e4bd6e9b6947088dd300ce4f3433e55587 --- /dev/null +++ b/lecture-06/class/assets/md-D-S0zhLV.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,W as r,_ as i,_t as a,b as o,v as s,yt as c,z as l}from"./modules/shiki-BFOesOFp.js";import{n as u,t as d}from"./slidev/context-DrkI8qiD.js";import{t as f}from"./default-Cq9fupKf.js";var p={class:`mt-1 flex justify-center`},m={viewBox:`0 0 680 250`,class:`dl-diagram`,style:{"max-width":`36rem`},role:`img`,"aria-label":`One transformer block on the river bank: attention mixes the three positions sideways, then the same small network processes each position alone, and the block repeats N times`},h={class:`mt-1 dl-callout`},g={__name:`class.md__slidev_8`,setup(g){let{$slidev:_,$nav:v,$clicksContext:y,$clicks:b,$page:x,$renderContext:S,$frontmatter:C}=u();return y.setup(),(u,g)=>{let _=r(`click`);return l(),s(f,c(t(a(d)(a(C),7))),{default:n(()=>[g[11]||=i(`h1`,null,`What a transformer is`,-1),g[12]||=i(`p`,null,`A stack of identical blocks. Each block does exactly two things.`,-1),i(`div`,p,[(l(),o(`svg`,m,[g[3]||=i(`defs`,null,[i(`marker`,{id:`l6s0-what-head`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),g[4]||=i(`rect`,{class:`dl-dg-box is-accent`,x:`120`,y:`204`,width:`90`,height:`30`,rx:`4`},null,-1),g[5]||=i(`rect`,{class:`dl-dg-box is-accent`,x:`280`,y:`204`,width:`90`,height:`30`,rx:`4`},null,-1),g[6]||=i(`rect`,{class:`dl-dg-box is-accent`,x:`440`,y:`204`,width:`90`,height:`30`,rx:`4`},null,-1),g[7]||=i(`text`,{class:`dl-dg-in`,x:`165`,y:`224`,"text-anchor":`middle`},`the`,-1),g[8]||=i(`text`,{class:`dl-dg-in`,x:`325`,y:`224`,"text-anchor":`middle`},`river`,-1),g[9]||=i(`text`,{class:`dl-dg-in`,x:`485`,y:`224`,"text-anchor":`middle`},`bank`,-1),e((l(),o(`g`,null,[...g[0]||=[i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-what-head)`,d:`M165 202 V174`},null,-1),i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-what-head)`,d:`M325 202 V174`},null,-1),i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-what-head)`,d:`M485 202 V174`},null,-1),i(`rect`,{class:`dl-dg-fill`,x:`110`,y:`130`,width:`430`,height:`42`,rx:`6`},null,-1),i(`path`,{class:`dl-dg-line`,d:`M165 168 L325 134 M325 168 L165 134 M325 168 L485 134 M485 168 L325 134 M165 168 L485 134 M485 168 L165 134`},null,-1),i(`text`,{class:`dl-dg-in`,x:`8`,y:`148`},`sideways`,-1),i(`text`,{class:`dl-dg-small`,x:`8`,y:`164`},`mix positions`,-1)]])),[[_]]),e((l(),o(`g`,null,[...g[1]||=[i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-what-head)`,d:`M165 128 V104`},null,-1),i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-what-head)`,d:`M325 128 V104`},null,-1),i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-what-head)`,d:`M485 128 V104`},null,-1),i(`polygon`,{class:`dl-dg-net`,points:`125,102 205,102 193,58 137,58`},null,-1),i(`polygon`,{class:`dl-dg-net`,points:`285,102 365,102 353,58 297,58`},null,-1),i(`polygon`,{class:`dl-dg-net`,points:`445,102 525,102 513,58 457,58`},null,-1),i(`text`,{class:`dl-dg-small`,x:`165`,y:`85`,"text-anchor":`middle`},`same net`,-1),i(`text`,{class:`dl-dg-small`,x:`325`,y:`85`,"text-anchor":`middle`},`same net`,-1),i(`text`,{class:`dl-dg-small`,x:`485`,y:`85`,"text-anchor":`middle`},`same net`,-1),i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-what-head)`,d:`M165 56 V26`},null,-1),i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-what-head)`,d:`M325 56 V26`},null,-1),i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-what-head)`,d:`M485 56 V26`},null,-1),i(`text`,{class:`dl-dg-in`,x:`8`,y:`76`},`upward`,-1),i(`text`,{class:`dl-dg-small`,x:`8`,y:`92`},`each position alone`,-1)]])),[[_]]),e((l(),o(`g`,null,[...g[2]||=[i(`path`,{class:`dl-dg-line is-muted`,d:`M572 56 H584 V172 H572`},null,-1),i(`text`,{class:`dl-dg-lab`,x:`594`,y:`114`},`× N`,-1),i(`text`,{class:`dl-dg-small`,x:`594`,y:`134`},`6 … 96 blocks`,-1)]])),[[_]])]))]),e((l(),o(`div`,h,[...g[10]||=[i(`p`,null,`Mix across positions, then process each position on its own. Repeat. The rest of the lecture is detail.`,-1)]])),[[_]])]),_:1},16)}}};export{g as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-D0ZW5T8G.js b/lecture-06/class/assets/md-D0ZW5T8G.js new file mode 100644 index 0000000000000000000000000000000000000000..50892c9c3fb81a0c9ed7f7d6b7f941a5f617dcb1 --- /dev/null +++ b/lecture-06/class/assets/md-D0ZW5T8G.js @@ -0,0 +1 @@ +import{$ as e,E as t,H as n,Q as r,S as i,W as a,_ as o,_t as s,b as c,m as l,v as u,w as d,x as f,xt as p,yt as m,z as h}from"./modules/shiki-BFOesOFp.js";import{t as g}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as _,t as v}from"./slidev/context-DrkI8qiD.js";import{t as y}from"./default-Cq9fupKf.js";var b={class:`dl-citation`},x=[`href`],S=g(d({__name:`Citation`,props:{source:{},url:{}},setup(e){let{$slidev:t,$nav:r,$clicksContext:i,$clicks:a,$page:o,$renderContext:s,$frontmatter:u}=_(),d=e;return(e,t)=>(h(),c(`span`,b,[d.url?(h(),c(`a`,{key:0,href:d.url,target:`_blank`,rel:`noopener`},p(d.source),9,x)):(h(),c(l,{key:1},[f(p(d.source),1)],64)),n(e.$slots,`default`,{},void 0,!0)]))}}),[[`__scopeId`,`data-v-11a8cabc`]]),C={class:`mt-1 flex justify-center`},w={viewBox:`0 0 680 200`,class:`dl-diagram`,style:{"max-width":`34rem`},role:`img`,"aria-label":`Left: attention sits on top of a recurrent chain. Right: the chain is gone and the words the, river, bank connect directly through attention`},T={class:`dl-tight`},E={class:`mt-2 dl-callout`},D={class:`mt-1`},O={__name:`class.md__slidev_5`,setup(n){let{$slidev:l,$nav:d,$clicksContext:p,$clicks:g,$page:b,$renderContext:x,$frontmatter:O}=_();return p.setup(),(n,l)=>{let d=S,p=a(`click`);return h(),u(y,m(t(s(v)(s(O),4))),{default:r(()=>[l[21]||=o(`h1`,null,`The move`,-1),l[22]||=o(`p`,null,[f(`Attention began as a `),o(`strong`,null,`passenger`),f(` on a recurrent model that did the real work.`)],-1),o(`div`,C,[(h(),c(`svg`,w,[l[1]||=o(`defs`,null,[o(`marker`,{id:`l6s0-move-head`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[o(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),l[2]||=o(`text`,{class:`dl-dg-small`,x:`8`,y:`16`},`before — attention on top`,-1),l[3]||=o(`circle`,{class:`dl-dg-op`,cx:`95`,cy:`48`,r:`16`},null,-1),l[4]||=o(`text`,{class:`dl-dg-lab is-sm`,x:`95`,y:`53`,"text-anchor":`middle`},`Σ`,-1),l[5]||=o(`text`,{class:`dl-dg-small`,x:`120`,y:`52`},`weighted sum`,-1),l[6]||=o(`path`,{class:`dl-dg-line`,d:`M85 61 L31 128`},null,-1),l[7]||=o(`path`,{class:`dl-dg-line`,d:`M95 64 L99 128`},null,-1),l[8]||=o(`path`,{class:`dl-dg-line`,d:`M105 61 L167 128`},null,-1),l[9]||=o(`rect`,{class:`dl-dg-box`,x:`8`,y:`130`,width:`46`,height:`30`,rx:`4`},null,-1),l[10]||=o(`rect`,{class:`dl-dg-box`,x:`76`,y:`130`,width:`46`,height:`30`,rx:`4`},null,-1),l[11]||=o(`rect`,{class:`dl-dg-box`,x:`144`,y:`130`,width:`46`,height:`30`,rx:`4`},null,-1),l[12]||=o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-move-head)`,d:`M54 145 H74`},null,-1),l[13]||=o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-move-head)`,d:`M122 145 H142`},null,-1),l[14]||=o(`text`,{class:`dl-dg-small`,x:`31`,y:`184`,"text-anchor":`middle`},`the`,-1),l[15]||=o(`text`,{class:`dl-dg-small`,x:`99`,y:`184`,"text-anchor":`middle`},`river`,-1),l[16]||=o(`text`,{class:`dl-dg-small`,x:`167`,y:`184`,"text-anchor":`middle`},`bank`,-1),l[17]||=o(`text`,{class:`dl-dg-small`,x:`200`,y:`150`},`the chain does the work`,-1),l[18]||=o(`line`,{class:`dl-dg-split`,x1:`340`,y1:`8`,x2:`340`,y2:`192`},null,-1),e((h(),c(`g`,null,[...l[0]||=[o(`text`,{class:`dl-dg-small is-good`,x:`360`,y:`16`},`2017 — keep the weighted sum, delete the chain`,-1),o(`path`,{class:`dl-dg-line`,d:`M415 128 Q460 92 505 128`},null,-1),o(`path`,{class:`dl-dg-line`,d:`M505 128 Q550 92 595 128`},null,-1),o(`path`,{class:`dl-dg-line`,d:`M415 128 Q505 46 595 128`},null,-1),o(`rect`,{class:`dl-dg-box is-accent`,x:`380`,y:`130`,width:`70`,height:`30`,rx:`4`},null,-1),o(`rect`,{class:`dl-dg-box is-accent`,x:`470`,y:`130`,width:`70`,height:`30`,rx:`4`},null,-1),o(`rect`,{class:`dl-dg-box is-accent`,x:`560`,y:`130`,width:`70`,height:`30`,rx:`4`},null,-1),o(`text`,{class:`dl-dg-in`,x:`415`,y:`150`,"text-anchor":`middle`},`the`,-1),o(`text`,{class:`dl-dg-in`,x:`505`,y:`150`,"text-anchor":`middle`},`river`,-1),o(`text`,{class:`dl-dg-in`,x:`595`,y:`150`,"text-anchor":`middle`},`bank`,-1),o(`text`,{class:`dl-dg-small`,x:`505`,y:`184`,"text-anchor":`middle`},`all positions at once — nothing waits`,-1)]])),[[p]])]))]),e((h(),c(`div`,T,[...l[19]||=[o(`ul`,null,[o(`li`,null,[f(`They removed the RNN (recurrent neural network) as a test. Translation quality went `),o(`strong`,null,`up`),f(`.`)])],-1)]])),[[p]]),e((h(),c(`div`,E,[...l[20]||=[o(`p`,null,[o(`strong`,null,`Attention Is All You Need`),f(` (Vaswani et al., 2017): keep the weighted sum, delete everything it was bolted to.`)],-1)]])),[[p]]),o(`div`,D,[i(d,{source:`Vaswani, Shazeer, Parmar, Uszkoreit, Jones, Gomez, Kaiser & Polosukhin, Attention Is All You Need (2017)`,url:`https://arxiv.org/abs/1706.03762`})])]),_:1},16)}}};export{O as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-D3MJsr7m.js b/lecture-06/class/assets/md-D3MJsr7m.js new file mode 100644 index 0000000000000000000000000000000000000000..68561d7dbb683f1ea5d85cc8f840800190e3c3ba --- /dev/null +++ b/lecture-06/class/assets/md-D3MJsr7m.js @@ -0,0 +1,3 @@ +import{$ as e,E as t,Q as n,S as r,W as i,_ as a,_t as o,b as s,v as c,x as l,yt as u,z as d}from"./modules/shiki-BFOesOFp.js";import{n as f,t as p}from"./slidev/context-DrkI8qiD.js";import{t as m}from"./slidev/VClicks-Dmx1KjZv.js";import{t as h}from"./default-Cq9fupKf.js";import{t as g}from"./slidev/CodeBlockWrapper-gsL5r1Ig.js";var _={class:`grid grid-cols-[1fr_1.05fr] gap-8 mt-1 items-start`},v={class:`dl-tight`},y={viewBox:`0 0 320 232`,class:`dl-diagram`,style:{"max-height":`16rem`},role:`img`,"aria-label":`Top: a dictionary query river matches one key exactly and returns one value. Bottom: an attention query is compared with every key, and every value is blended by how well its key matched`},b={class:`mt-2 dl-callout`},x={__name:`class.md__slidev_13`,setup(x){let{$slidev:S,$nav:C,$clicksContext:w,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=f();return w.setup(),(f,x)=>{let S=g,C=m,w=i(`click`);return d(),c(h,u(t(o(p)(o(O),12))),{default:n(()=>[x[18]||=a(`h1`,null,`Start from a lookup`,-1),a(`div`,_,[a(`div`,v,[x[2]||=a(`p`,null,[l(`A Python dictionary finds the `),a(`strong`,null,`exact`),l(` key and hands back its value.`)],-1),r(S,{title:``,ranges:[]},{default:n(()=>[...x[0]||=[a(`pre`,{class:`shiki shiki-themes vitesse-dark vitesse-light slidev-code`,style:{"--shiki-dark":`#dbd7caee`,"--shiki-light":`#393a34`,"--shiki-dark-bg":`#121212`,"--shiki-light-bg":`#ffffff`}},[a(`code`,{class:`language-python`},[a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`store `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},` {`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#C98A7D`,"--shiki-light":`#B56959`}},`river`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`:`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},` "`),a(`span`,{style:{"--shiki-dark":`#C98A7D`,"--shiki-light":`#B56959`}},`waterside`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},` "`),a(`span`,{style:{"--shiki-dark":`#C98A7D`,"--shiki-light":`#B56959`}},`money`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`:`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},` "`),a(`span`,{style:{"--shiki-dark":`#C98A7D`,"--shiki-light":`#B56959`}},`financial`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`}`)]),l(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`store`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`[`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#C98A7D`,"--shiki-light":`#B56959`}},`river`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`]`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # → 'waterside' one winner`)]),l(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`store`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`[`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#C98A7D`,"--shiki-light":`#B56959`}},`stream`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`]`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # → KeyError nothing at all`)])])],-1)]]),_:1}),r(C,null,{default:n(()=>[...x[1]||=[a(`ul`,null,[a(`li`,null,[l(`What you bring: the `),a(`strong`,null,`query`)]),a(`li`,null,[l(`What each entry advertises: its `),a(`strong`,null,`key`)]),a(`li`,null,[l(`What you get back: its `),a(`strong`,null,`value`)])],-1)]]),_:1})]),a(`div`,null,[(d(),s(`svg`,y,[x[4]||=a(`defs`,null,[a(`marker`,{id:`l6s1-lookup`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[a(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),x[5]||=a(`text`,{class:`dl-dg-small`,x:`4`,y:`14`},`dictionary`,-1),x[6]||=a(`rect`,{class:`dl-dg-box`,x:`4`,y:`34`,width:`64`,height:`26`,rx:`4`},null,-1),x[7]||=a(`text`,{class:`dl-dg-lab is-sm`,x:`36`,y:`52`,"text-anchor":`middle`,style:{"font-style":`italic`}},`river`,-1),x[8]||=a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s1-lookup)`,d:`M70 40 L110 35`},null,-1),x[9]||=a(`rect`,{class:`dl-dg-box is-accent`,x:`114`,y:`24`,width:`64`,height:`22`,rx:`3`},null,-1),x[10]||=a(`text`,{class:`dl-dg-small`,x:`146`,y:`39`,"text-anchor":`middle`},`river`,-1),x[11]||=a(`rect`,{class:`dl-dg-box`,x:`114`,y:`52`,width:`64`,height:`22`,rx:`3`},null,-1),x[12]||=a(`text`,{class:`dl-dg-small`,x:`146`,y:`67`,"text-anchor":`middle`},`money`,-1),x[13]||=a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s1-lookup)`,d:`M180 35 H218`},null,-1),x[14]||=a(`rect`,{class:`dl-dg-box is-accent`,x:`222`,y:`24`,width:`90`,height:`22`,rx:`3`},null,-1),x[15]||=a(`text`,{class:`dl-dg-small`,x:`267`,y:`39`,"text-anchor":`middle`},`waterside`,-1),x[16]||=a(`text`,{class:`dl-dg-small`,x:`114`,y:`92`},`exact match: one winner`,-1),e((d(),s(`g`,null,[...x[3]||=[a(`line`,{class:`dl-dg-split`,x1:`4`,y1:`104`,x2:`316`,y2:`104`},null,-1),a(`text`,{class:`dl-dg-small is-good`,x:`4`,y:`122`},`attention`,-1),a(`path`,{class:`dl-dg-line is-muted`,d:`M40 176 L116 145`,style:{strokeWidth:1.5}},null,-1),a(`path`,{class:`dl-dg-line`,d:`M40 176 L116 173`,style:{strokeWidth:6}},null,-1),a(`path`,{class:`dl-dg-line is-muted`,d:`M40 176 L116 201`,style:{strokeWidth:2.5}},null,-1),a(`circle`,{class:`dl-dg-dot is-accent`,cx:`30`,cy:`176`,r:`12`},null,-1),a(`text`,{x:`30`,y:`181`,"text-anchor":`middle`,style:{fill:`var(--dl-bg)`,"font-size":`13px`,"font-weight":`700`}},`q`,-1),a(`rect`,{class:`dl-dg-box`,x:`116`,y:`134`,width:`50`,height:`22`,rx:`3`},null,-1),a(`rect`,{class:`dl-dg-box is-accent`,x:`116`,y:`162`,width:`50`,height:`22`,rx:`3`},null,-1),a(`rect`,{class:`dl-dg-box`,x:`116`,y:`190`,width:`50`,height:`22`,rx:`3`},null,-1),a(`text`,{class:`dl-dg-small`,x:`141`,y:`149`,"text-anchor":`middle`},`key 1`,-1),a(`text`,{class:`dl-dg-small`,x:`141`,y:`177`,"text-anchor":`middle`},`key 2`,-1),a(`text`,{class:`dl-dg-small`,x:`141`,y:`205`,"text-anchor":`middle`},`key 3`,-1),a(`rect`,{class:`dl-dg-box`,x:`176`,y:`134`,width:`54`,height:`22`,rx:`3`},null,-1),a(`rect`,{class:`dl-dg-box is-accent`,x:`176`,y:`162`,width:`54`,height:`22`,rx:`3`},null,-1),a(`rect`,{class:`dl-dg-box`,x:`176`,y:`190`,width:`54`,height:`22`,rx:`3`},null,-1),a(`text`,{class:`dl-dg-small`,x:`203`,y:`149`,"text-anchor":`middle`},`value 1`,-1),a(`text`,{class:`dl-dg-small`,x:`203`,y:`177`,"text-anchor":`middle`},`value 2`,-1),a(`text`,{class:`dl-dg-small`,x:`203`,y:`205`,"text-anchor":`middle`},`value 3`,-1),a(`path`,{class:`dl-dg-line is-muted`,d:`M230 145 L262 170`,style:{strokeWidth:1.5}},null,-1),a(`path`,{class:`dl-dg-line`,d:`M230 173 L262 173`,style:{strokeWidth:6}},null,-1),a(`path`,{class:`dl-dg-line is-muted`,d:`M230 201 L262 176`,style:{strokeWidth:2.5}},null,-1),a(`rect`,{class:`dl-dg-box is-accent`,x:`262`,y:`160`,width:`52`,height:`26`,rx:`4`},null,-1),a(`text`,{class:`dl-dg-small`,x:`288`,y:`177`,"text-anchor":`middle`},`blend`,-1),a(`text`,{class:`dl-dg-small`,x:`116`,y:`228`},`similarity: every value, weighted`,-1)]])),[[w]])]))])]),e((d(),s(`div`,b,[...x[17]||=[a(`p`,null,[l(`Attention is this lookup made `),a(`strong`,null,`soft`),l(`: it matches by `),a(`em`,null,`similarity`),l(`, and returns a blend of `),a(`strong`,null,`every`),l(` value.`)],-1)]])),[[w]])]),_:1},16)}}};export{x as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-D4Ywsi6K.js b/lecture-06/class/assets/md-D4Ywsi6K.js new file mode 100644 index 0000000000000000000000000000000000000000..a987b3fb54d670f8bfa5eccfaffd399fdf922c37 --- /dev/null +++ b/lecture-06/class/assets/md-D4Ywsi6K.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,W as i,_ as a,_t as o,b as s,v as c,x as l,yt as u,z as d}from"./modules/shiki-BFOesOFp.js";import{n as f,t as p}from"./slidev/context-DrkI8qiD.js";import{t as m}from"./slidev/VClicks-Dmx1KjZv.js";import{t as h}from"./interactive-CI8hm4xw.js";import{t as g}from"./AttentionMatrix-D2xrh-OL.js";var _={class:`mt-2 dl-callout`},v={__name:`class.md__slidev_31`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=g,b=m,x=i(`click`);return d(),c(h,u(t(o(p)(o(T),30))),{aside:n(t=>[v[2]||=a(`p`,null,[l(`Position `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`t`)]),a(`annotation`,{encoding:`application/x-tex`},`t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),a(`span`,{class:`mord mathnormal`},`t`)])])]),l(` may read positions `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`),a(`mo`,null,`…`),a(`mi`,null,`t`)]),a(`annotation`,{encoding:`application/x-tex`},`1 \\ldots t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`minner`},`…`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`t`)])])]),l(` only.`)],-1),r(b,null,{default:n(()=>[...v[0]||=[a(`ul`,null,[a(`li`,null,[l(`Row `),a(`em`,null,`the`),l(` becomes `),a(`strong`,null,`1.00`),l(`: it can only see itself`)]),a(`li`,null,[l(`Rows still sum to 1: the softmax comes `),a(`strong`,null,`after`),l(` the `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`−`),a(`mi`,{mathvariant:`normal`},`∞`)]),a(`annotation`,{encoding:`application/x-tex`},`-\\infty`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`∞`)])])])]),a(`li`,null,`The button takes the mask off and puts it back`)],-1)]]),_:1}),e((d(),s(`div`,_,[...v[1]||=[a(`p`,null,`Without the mask, the model reads the answer off its own input.`,-1)]])),[[x]])]),default:n(()=>[r(y,{causal:!0})]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-DAJ_ecr1.js b/lecture-06/class/assets/md-DAJ_ecr1.js new file mode 100644 index 0000000000000000000000000000000000000000..9b11afd791e89d564e249174ba67e1937f70e02d --- /dev/null +++ b/lecture-06/class/assets/md-DAJ_ecr1.js @@ -0,0 +1 @@ +import{E as e,H as t,Q as n,S as r,_ as i,_t as a,b as o,v as s,w as c,x as l,xt as u,y as d,yt as f,z as p}from"./modules/shiki-BFOesOFp.js";import{t as m}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as h,t as g}from"./slidev/context-DrkI8qiD.js";import{t as _}from"./TransformerGlyph-D9TehqNe.js";var v={class:`slidev-layout dl-title`},y={class:`dl-title__eyebrow`},b={key:0,class:`dl-title__code`},x={key:1,class:`dl-title__lecture`},S={class:`dl-title__body`},C={class:`dl-title__meta`},w={key:0,class:`dl-title__author`},T=[`href`],E={key:2,class:`dl-title__date`},D=m(c({__name:`title`,props:{courseCode:{},lecture:{},author:{},email:{},date:{}},setup(e){let{$slidev:n,$nav:r,$clicksContext:a,$clicks:s,$page:c,$renderContext:l,$frontmatter:f}=h(),m=e;return(e,n)=>(p(),o(`div`,v,[i(`div`,y,[m.courseCode?(p(),o(`span`,b,u(m.courseCode),1)):d(`v-if`,!0),m.lecture?(p(),o(`span`,x,`Lecture `+u(m.lecture),1)):d(`v-if`,!0)]),i(`div`,S,[t(e.$slots,`default`,{},void 0,!0)]),n[0]||=i(`div`,{class:`dl-rule dl-title__rule`},null,-1),i(`div`,C,[m.author?(p(),o(`div`,w,u(m.author),1)):d(`v-if`,!0),m.email?(p(),o(`a`,{key:1,href:`mailto:${m.email}`,class:`dl-title__email`},u(m.email),9,T)):d(`v-if`,!0),m.date?(p(),o(`div`,E,u(m.date),1)):d(`v-if`,!0)])]))}}),[[`__scopeId`,`data-v-dc59a472`]]),O={class:`mt-6 flex items-center gap-6`},k={__name:`class.md__slidev_1`,setup(t){let{$slidev:o,$nav:c,$clicksContext:u,$clicks:d,$page:m,$renderContext:v,$frontmatter:y}=h();return u.setup(),(t,o)=>{let c=_;return p(),s(D,f(e(a(g)(a(y),0))),{default:n(()=>[o[3]||=i(`h1`,null,`Transformers`,-1),o[4]||=i(`p`,null,`A network that reads a sentence one word at a time is slow to train and forgets the start. Let every word look at every other word at once instead. Every large language model since 2017 is built on that idea.`,-1),i(`div`,O,[r(c,{kind:`cut`,size:110},{default:n(()=>[...o[0]||=[l(`read in order`,-1)]]),_:1}),o[2]||=i(`span`,{class:`text-3xl`,style:{color:`var(--dl-accent)`}},`→`,-1),r(c,{kind:`block`,size:110},{default:n(()=>[...o[1]||=[l(`look everywhere`,-1)]]),_:1})])]),_:1},16)}}};export{k as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-DCF9sEzr2.js b/lecture-06/class/assets/md-DCF9sEzr2.js new file mode 100644 index 0000000000000000000000000000000000000000..ea01f3deb13a87f101e38af0594c47bd87065775 --- /dev/null +++ b/lecture-06/class/assets/md-DCF9sEzr2.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,W as r,_ as i,_t as a,b as o,v as s,x as c,yt as l,z as u}from"./modules/shiki-BFOesOFp.js";import{n as d,t as f}from"./slidev/context-DrkI8qiD.js";import{t as p}from"./default-Cq9fupKf.js";var m={class:`mt-2 dl-callout`},h={__name:`class.md__slidev_40`,setup(h){let{$slidev:g,$nav:_,$clicksContext:v,$clicks:y,$page:b,$renderContext:x,$frontmatter:S}=d();return v.setup(),(d,h)=>{let g=r(`click`);return u(),s(p,l(t(a(f)(a(S),39))),{default:n(()=>[h[1]||=i(`h1`,null,`Shapes, end to end`,-1),h[2]||=i(`div`,{class:`grid grid-cols-[1fr_12rem] gap-6 items-center`},[i(`div`,{class:`dl-ledger`},[i(`table`,null,[i(`thead`,null,[i(`tr`,null,[i(`th`,null,`step`),i(`th`,null,`shape`),i(`th`,null,`what it is`)])]),i(`tbody`,null,[i(`tr`,null,[i(`td`,null,[i(`code`,null,`ids`)]),i(`td`,null,[i(`code`,null,`(32, 128)`)]),i(`td`,null,`token ids, padded`)]),i(`tr`,null,[i(`td`,null,[i(`code`,null,`embed(ids)`),c(` + position`)]),i(`td`,null,[i(`code`,null,`(32, 128, 512)`)]),i(`td`,null,`added: same width`)]),i(`tr`,null,[i(`td`,null,[i(`code`,null,`qkv(x)`)]),i(`td`,null,[i(`code`,null,`(32, 128, 1536)`)]),i(`td`,null,`Q, K, V in one tensor`)]),i(`tr`,null,[i(`td`,null,`reshape`),i(`td`,null,[i(`code`,null,`(32, 8, 128, 64)`)]),i(`td`,null,`heads as batch`)]),i(`tr`,null,[i(`td`,null,[i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`Q`),i(`msup`,null,[i(`mi`,null,`K`),i(`mi`,{mathvariant:`normal`},`⊤`)])]),i(`annotation`,{encoding:`application/x-tex`},`QK^\\top`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`1.0435em`,"vertical-align":`-0.1944em`}}),i(`span`,{class:`mord mathnormal`},`Q`),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0715em`}},`K`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.8491em`}},[i(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`⊤`)])])])])])])])])])])]),i(`td`,null,[i(`code`,null,`(32, 8, 128, 128)`)]),i(`td`,null,[i(`strong`,null,`the scores`)])]),i(`tr`,null,[i(`td`,null,`weights @ V`),i(`td`,null,[i(`code`,null,`(32, 8, 128, 64)`)]),i(`td`,null,`output per head`)]),i(`tr`,null,[i(`td`,null,[c(`merged + `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msub`,null,[i(`mi`,null,`W`),i(`mi`,null,`O`)])]),i(`annotation`,{encoding:`application/x-tex`},`W_O`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3283em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0278em`}},`O`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])])]),i(`td`,null,[i(`code`,null,`(32, 128, 512)`)]),i(`td`,null,`residual stream`)]),i(`tr`,null,[i(`td`,null,[i(`code`,null,`head(x)`)]),i(`td`,null,[i(`code`,null,`(32, 128, 50257)`)]),i(`td`,null,`logit per vocabulary entry`)])])])]),i(`div`,null,[i(`svg`,{class:`dl-diagram`,viewBox:`0 0 200 224`,role:`img`,"aria-label":`The scores tensor drawn to scale by area. At 128 tokens it is a tiny square of 4.2 million numbers in the corner. At 2048 tokens it is the large square, 1.07 billion numbers, 256 times the area.`},[i(`rect`,{x:`20`,y:`20`,width:`160`,height:`160`,class:`dl-dg-fill is-muted is-dashed`}),i(`rect`,{x:`20`,y:`20`,width:`10`,height:`10`,class:`dl-dg-fill`}),i(`text`,{x:`20`,y:`13`,class:`dl-dg-small is-good`},`T = 128: 4.2 M (corner)`),i(`text`,{x:`100`,y:`198`,class:`dl-dg-small`,"text-anchor":`middle`},`T = 2048: 1.07 billion`)])])],-1),e((u(),o(`div`,m,[...h[0]||=[i(`p`,null,[c(`Only the scores grow with `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`T`)]),i(`annotation`,{encoding:`application/x-tex`},`T`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`)])])]),c(),i(`strong`,null,`twice`),c(`. That row is the long-context problem.`)],-1)]])),[[g]])]),_:1},16)}}};export{h as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-DOad-2KZ.js b/lecture-06/class/assets/md-DOad-2KZ.js new file mode 100644 index 0000000000000000000000000000000000000000..644c262c23d7297196fb0e57e6af66345d87a324 --- /dev/null +++ b/lecture-06/class/assets/md-DOad-2KZ.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,_ as o,_t as s,b as c,bt as l,g as u,lt as d,m as f,v as p,vt as m,w as h,x as g,xt as _,y as v,yt as y,z as b}from"./modules/shiki-BFOesOFp.js";import{t as x}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as S,t as C}from"./slidev/context-DrkI8qiD.js";import{t as w}from"./slidev/VClicks-Dmx1KjZv.js";import{n as T,t as E}from"./interactive-CI8hm4xw.js";import{t as D}from"./StepButton-BcP33F-1.js";import{t as O}from"./useConvolution-qO1u8ksh.js";import{n as k,r as A}from"./useAttention-Blk0c2BZ.js";var j={class:`dl-mh`},M={class:`dl-mh__sentence`},N=[`onClick`],P={class:`dl-mh__rows`},F=[`onClick`],I={class:`dl-mh__headlabel`},L={class:`dl-mh__headreads`},R={class:`dl-mh__bars`},z=[`title`],B={class:`dl-mh__reads`},V={class:`dl-mh__concat`},H={class:`dl-mh__whole`},U={class:`dl-mh__whole is-out`},W=x(h({__name:`MultiHeadLab`,props:{query:{default:6},dModel:{default:512}},setup(e){let{$slidev:t,$nav:a,$clicksContext:h,$clicks:y,$page:x,$renderContext:C,$frontmatter:w}=S(),E=e,W=d(E.query),G=d(null),K=A,q=u(()=>k.map((e,t)=>({...e,index:t,weights:e.weights[W.value],top:e.weights[W.value].indexOf(Math.max(...e.weights[W.value]))}))),J=u(()=>G.value===null?q.value:[q.value[G.value]]),Y=u(()=>Math.round(E.dModel/k.length));function X(){W.value=(W.value+1)%K.length}function Z(e){return e<=W.value}return(e,t)=>{let a=D,u=T;return b(),p(u,{"max-width":`45rem`},{controls:n(()=>[r(a,{label:`Next query word`,glyph:`▸`,onClick:X}),G.value===null?v(`v-if`,!0):(b(),p(a,{key:0,label:`All heads`,variant:`ghost`,glyph:`▦`,onClick:t[0]||=e=>G.value=null}))]),readout:n(()=>[W.value===6?(b(),c(f,{key:0},[t[5]||=o(`strong`,null,`it`,-1),t[6]||=g(` asks four questions at once: head 1 takes the word before it, head 2 the nearby nouns, head 3 goes back five words to `,-1),t[7]||=o(`strong`,null,`cat`,-1),t[8]||=g(` — what `,-1),t[9]||=o(`em`,null,`it`,-1),t[10]||=g(` refers to — and head 4 parks on the first token. One softmax puts its mass in one place, so one head could answer only one of those. `,-1),t[11]||=o(`span`,{class:`dl-mh__note`},[g(` Head 4 is not a drawing error: heads that sit almost entirely on the first token turn up in every trained model. Nothing after `),o(`em`,null,`it`),g(` is drawn because this is a decoder, which may not look forward — section 03. `)],-1)],64)):(b(),c(f,{key:1},[o(`strong`,null,_(s(K)[W.value]),1),t[12]||=g(` asking, four heads answering differently: `,-1),(b(!0),c(f,null,i(q.value,(e,t)=>(b(),c(f,{key:e.name},[t>0?(b(),c(f,{key:0},[g(`, `)],64)):v(`v-if`,!0),g(` `+_(e.name)+` → `,1),o(`strong`,null,_(s(K)[e.top]),1)],64))),128)),t[13]||=g(`. Each head is its own W`,-1),t[14]||=o(`sub`,null,`Q`,-1),t[15]||=g(`, W`,-1),t[16]||=o(`sub`,null,`K`,-1),t[17]||=g(`, W`,-1),t[18]||=o(`sub`,null,`V`,-1),g(` at width `+_(Y.value)+` = `+_(E.dModel)+`/`+_(s(k).length)+`, so all `+_(s(k).length)+` together cost exactly what one head of width `+_(E.dModel)+` would. `,1)],64))]),default:n(()=>[o(`div`,j,[v(` The sentence, and which word is asking. `),o(`div`,M,[t[1]||=o(`span`,{class:`dl-mh__label`},`query`,-1),(b(!0),c(f,null,i(s(K),(e,t)=>(b(),c(`button`,{key:e+t,type:`button`,class:m([`dl-mh__word`,{"is-current":t===W.value}]),onClick:e=>W.value=t},_(e),11,N))),128))]),v(` One row per head: the same question, four different answers. `),o(`div`,P,[(b(!0),c(f,null,i(J.value,e=>(b(),c(`div`,{key:e.name,class:`dl-mh__row`},[o(`button`,{type:`button`,class:m([`dl-mh__headname`,{"is-solo":G.value===e.index}]),onClick:t=>G.value=G.value===e.index?null:e.index},[o(`span`,I,_(e.name),1),o(`span`,L,_(e.reads),1)],10,F),o(`div`,R,[(b(!0),c(f,null,i(e.weights,(t,n)=>(b(),c(`div`,{key:n,class:m([`dl-mh__bar`,{"is-top":n===e.top&&Z(n),"is-dead":!Z(n)}]),title:`${s(K)[n]}: ${s(O)(t)}`},[o(`span`,{class:`dl-mh__fill`,style:l({height:`${Z(n)?t*100:0}%`})},null,4)],10,z))),128))]),o(`div`,B,[e.weights[e.top]>.4?(b(),c(f,{key:0},[t[2]||=g(`→ `,-1),o(`strong`,null,_(s(K)[e.top]),1)],64)):(b(),c(f,{key:1},[g(`→ spread`)],64))])]))),128))]),v(` What happens to the four outputs. `),o(`div`,V,[(b(!0),c(f,null,i(q.value,e=>(b(),c(`span`,{key:`c${e.index}`,class:`dl-mh__slice`},_(Y.value),1))),128)),t[3]||=o(`span`,{class:`dl-mh__op`},`concat →`,-1),o(`span`,H,_(E.dModel),1),t[4]||=o(`span`,{class:`dl-mh__op`},[g(`× W`),o(`sub`,null,`O`),g(` →`)],-1),o(`span`,U,_(E.dModel),1)])])]),_:1})}}}),[[`__scopeId`,`data-v-d4d1022e`]]),G={class:`mt-2 dl-callout`},K={__name:`class.md__slidev_23`,setup(i){let{$slidev:l,$nav:u,$clicksContext:d,$clicks:f,$page:m,$renderContext:h,$frontmatter:_}=S();return d.setup(),(i,l)=>{let u=W,d=w,f=a(`click`);return b(),p(E,y(t(s(C)(s(_),22))),{aside:n(t=>[l[2]||=o(`p`,null,[o(`em`,null,`it`),g(` is asking. Four heads, four different answers.`)],-1),r(d,null,{default:n(()=>[...l[0]||=[o(`ul`,null,[o(`li`,null,[o(`strong`,null,`head 1`),g(` — the previous word`)]),o(`li`,null,[o(`strong`,null,`head 3`),g(` — five words back, to `),o(`em`,null,`cat`)]),o(`li`,null,[o(`strong`,null,`head 4`),g(` — parks on token 1 and does nothing`)])],-1)]]),_:1}),e((b(),c(`div`,G,[...l[1]||=[o(`p`,null,`Head 4 is not a drawing error. Nearly-dead heads are in every model anyone has looked inside.`,-1)]])),[[f]])]),default:n(()=>[r(u)]),_:1},16)}}};export{K as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-DRRRjQ4b.js b/lecture-06/class/assets/md-DRRRjQ4b.js new file mode 100644 index 0000000000000000000000000000000000000000..fa4540ed6c65bb8f12705bffac75a1c2dc2a8f0b --- /dev/null +++ b/lecture-06/class/assets/md-DRRRjQ4b.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,W as r,_ as i,_t as a,b as o,v as s,x as c,yt as l,z as u}from"./modules/shiki-BFOesOFp.js";import{n as d,t as f}from"./slidev/context-DrkI8qiD.js";import{t as p}from"./default-Cq9fupKf.js";var m={class:`mt-2 flex justify-center`},h={viewBox:`0 0 520 196`,class:`dl-diagram`,style:{"max-height":`14rem`},role:`img`,"aria-label":`One token vector x passes through three learned matrices W_Q, W_K and W_V and becomes a query, a key and a value`},g={class:`mt-2 dl-callout`},_={__name:`class.md__slidev_14`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=d();return b.setup(),(d,_)=>{let v=r(`click`);return u(),s(p,l(t(a(f)(a(w),13))),{default:n(()=>[_[2]||=i(`h1`,null,`Three roles, one vector`,-1),_[3]||=i(`p`,null,[c(`Each token makes all three from `),i(`strong`,null,`the same`),c(` vector `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,{mathvariant:`bold`},`x`)]),i(`annotation`,{encoding:`application/x-tex`},`\\mathbf{x}`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),i(`span`,{class:`mord mathbf`},`x`)])])]),c(`, through three `),i(`strong`,null,`learned`),c(` matrices: `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,{mathvariant:`bold`},`q`),i(`mo`,null,`=`),i(`mi`,{mathvariant:`bold`},`x`),i(`msub`,null,[i(`mi`,null,`W`),i(`mi`,null,`Q`)])]),i(`annotation`,{encoding:`application/x-tex`},`\\mathbf{q} = \\mathbf{x}W_Q`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6389em`,"vertical-align":`-0.1944em`}}),i(`span`,{class:`mord mathbf`},`q`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.9694em`,"vertical-align":`-0.2861em`}}),i(`span`,{class:`mord mathbf`},`x`),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3283em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`},`Q`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2861em`}},[i(`span`)])])])])])])])]),c(`, `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,{mathvariant:`bold`},`k`),i(`mo`,null,`=`),i(`mi`,{mathvariant:`bold`},`x`),i(`msub`,null,[i(`mi`,null,`W`),i(`mi`,null,`K`)])]),i(`annotation`,{encoding:`application/x-tex`},`\\mathbf{k} = \\mathbf{x}W_K`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),i(`span`,{class:`mord mathbf`},`k`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord mathbf`},`x`),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3283em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0715em`}},`K`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])]),c(`, `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,{mathvariant:`bold`},`v`),i(`mo`,null,`=`),i(`mi`,{mathvariant:`bold`},`x`),i(`msub`,null,[i(`mi`,null,`W`),i(`mi`,null,`V`)])]),i(`annotation`,{encoding:`application/x-tex`},`\\mathbf{v} = \\mathbf{x}W_V`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),i(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`v`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord mathbf`},`x`),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3283em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.1389em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.2222em`}},`V`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])]),c(`.`)],-1),i(`div`,m,[(u(),o(`svg`,h,[..._[0]||=[i(`defs`,null,[i(`marker`,{id:`l6s1-roles`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),i(`rect`,{class:`dl-dg-box is-accent`,x:`10`,y:`74`,width:`70`,height:`46`,rx:`4`},null,-1),i(`text`,{class:`dl-dg-lab`,x:`45`,y:`103`,"text-anchor":`middle`},`x`,-1),i(`text`,{class:`dl-dg-small`,x:`45`,y:`138`,"text-anchor":`middle`},`one token`,-1),i(`path`,{class:`dl-dg-arrow`,d:`M80 97 C 110 97, 110 34, 140 34`,"marker-end":`url(#l6s1-roles)`},null,-1),i(`path`,{class:`dl-dg-arrow`,d:`M80 97 H140`,"marker-end":`url(#l6s1-roles)`},null,-1),i(`path`,{class:`dl-dg-arrow`,d:`M80 97 C 110 97, 110 160, 140 160`,"marker-end":`url(#l6s1-roles)`},null,-1),i(`polygon`,{class:`dl-dg-net`,points:`146,16 206,24 206,44 146,52`},null,-1),i(`polygon`,{class:`dl-dg-net`,points:`146,79 206,87 206,107 146,115`},null,-1),i(`polygon`,{class:`dl-dg-net`,points:`146,142 206,150 206,170 146,178`},null,-1),i(`text`,{class:`dl-dg-in`,x:`174`,y:`39`,"text-anchor":`middle`},[c(`W`),i(`tspan`,{"baseline-shift":`sub`,style:{"font-size":`9px`}},`Q`)],-1),i(`text`,{class:`dl-dg-in`,x:`174`,y:`102`,"text-anchor":`middle`},[c(`W`),i(`tspan`,{"baseline-shift":`sub`,style:{"font-size":`9px`}},`K`)],-1),i(`text`,{class:`dl-dg-in`,x:`174`,y:`165`,"text-anchor":`middle`},[c(`W`),i(`tspan`,{"baseline-shift":`sub`,style:{"font-size":`9px`}},`V`)],-1),i(`path`,{class:`dl-dg-arrow`,d:`M206 34 H238`,"marker-end":`url(#l6s1-roles)`},null,-1),i(`path`,{class:`dl-dg-arrow`,d:`M206 97 H238`,"marker-end":`url(#l6s1-roles)`},null,-1),i(`path`,{class:`dl-dg-arrow`,d:`M206 160 H238`,"marker-end":`url(#l6s1-roles)`},null,-1),i(`rect`,{class:`dl-dg-box`,x:`244`,y:`20`,width:`44`,height:`28`,rx:`3`},null,-1),i(`rect`,{class:`dl-dg-box`,x:`244`,y:`83`,width:`44`,height:`28`,rx:`3`},null,-1),i(`rect`,{class:`dl-dg-box`,x:`244`,y:`146`,width:`44`,height:`28`,rx:`3`},null,-1),i(`text`,{class:`dl-dg-lab`,x:`266`,y:`40`,"text-anchor":`middle`},`q`,-1),i(`text`,{class:`dl-dg-lab`,x:`266`,y:`103`,"text-anchor":`middle`},`k`,-1),i(`text`,{class:`dl-dg-lab`,x:`266`,y:`166`,"text-anchor":`middle`},`v`,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`302`,y:`39`},`query: what am I looking for?`,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`302`,y:`102`},`key: what do I advertise?`,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`302`,y:`165`},`value: what do I hand over?`,-1)]]))]),e((u(),o(`div`,g,[..._[1]||=[i(`p`,null,[c(`Three `),i(`strong`,null,`projections`),c(` of one vector, not three stored things. Every token is a query, a key and a value at once.`)],-1)]])),[[v]])]),_:1},16)}}};export{_ as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-DSyIwSi7.js b/lecture-06/class/assets/md-DSyIwSi7.js new file mode 100644 index 0000000000000000000000000000000000000000..4aa4fb2433a5474a4911dbf487fe240cfd630a74 --- /dev/null +++ b/lecture-06/class/assets/md-DSyIwSi7.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,_ as o,_t as s,b as c,g as l,lt as u,m as d,v as f,vt as p,w as m,x as h,xt as g,y as _,yt as v,z as y}from"./modules/shiki-BFOesOFp.js";import{t as b}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as x,t as S}from"./slidev/context-DrkI8qiD.js";import{t as C}from"./slidev/VClicks-Dmx1KjZv.js";import{n as w,t as T}from"./interactive-CI8hm4xw.js";import{t as E}from"./StepButton-BcP33F-1.js";var D=[`viewBox`],O=[`x`,`width`],k=[`x`],A=[`x`,`width`],j=[`x`],M=[`d`],N=[`cx`],P=[`x`],F=[`x`],I=[`x`,`y`],L=[`x`,`y`],R=[`x`,`y`],z=640,B=372,V=218,H=56,U=366,W=30,G=b(m({__name:`TransformerStack`,props:{layers:{default:6}},setup(e){let{$slidev:t,$nav:a,$clicksContext:s,$clicks:m,$page:v,$renderContext:b,$frontmatter:S}=x(),C=e,T=[{id:`enc-emb`,x:H,y:300,label:`Input embedding`,sub:`one vector per source token`},{id:`enc-sa`,x:H,y:218,label:`Self-attention`,sub:`every token sees every token`},{id:`enc-ff`,x:H,y:180,label:`Feed-forward`,sub:`each position on its own`},{id:`dec-emb`,x:U,y:300,label:`Output embedding`,sub:`what has been written so far`},{id:`dec-sa`,x:U,y:218,label:`Masked self-attention`,sub:`no peeking at the future`},{id:`dec-ca`,x:U,y:180,label:`Cross-attention`,sub:`Q from here, K and V from the encoder`},{id:`dec-ff`,x:U,y:142,label:`Feed-forward`},{id:`dec-lin`,x:U,y:96,label:`Linear`,sub:`d → vocabulary size`},{id:`dec-sm`,x:U,y:58,label:`Softmax`,sub:`a probability per word in the vocabulary`}],G=[{title:`Embed the source`,lit:[`enc-in`,`enc-emb`],note:"The source sentence is split into tokens and each one is looked up in an embedding table (`nn.Embedding`), which turns a token id into a learned vector. Nothing here knows anything about order yet."},{title:`Add position`,lit:[`enc-in`,`enc-emb`,`enc-pe`],note:`A fixed positional vector is added to each embedding. Without it the encoder would treat the sentence as a bag of words, because a weighted sum has no order in it.`},{title:`Encoder self-attention`,lit:[`enc-sa`],note:`Every source token attends to every other, in both directions — there is no mask here, because the whole source is available at once. This is the step that makes each vector *contextual*.`},{title:`Encoder block, ×N`,lit:[`enc-sa`,`enc-ff`,`enc-stack`],note:`Attention and feed-forward, each wrapped in a residual and a LayerNorm, repeated N times. The output is one vector per source token — not one vector for the whole sentence, which is precisely the bottleneck this architecture removes.`},{title:`The decoder starts`,lit:[`dec-in`,`dec-emb`,`dec-pe`],note:`The decoder is fed what has been produced so far, shifted right by one and starting from a begin-of-sequence token. During training that is the true target sentence, so every position trains at once. This is teacher forcing: training on the true previous words instead of the model’s own guesses.`},{title:`Masked self-attention`,lit:[`dec-sa`],note:`The decoder attends to its own output, with position t forbidden from seeing anything after t. Without the mask the model could read the answer off its own input and the loss would collapse to nothing.`},{title:`Cross-attention`,lit:[`dec-ca`,`cross`],note:`The only place the two stacks meet. Queries come from the decoder — “what do I need next?” — and keys and values from the encoder’s output. This is Bahdanau’s 2014 attention for translation, with the recurrence removed from both sides.`},{title:`Decoder block, ×N`,lit:[`dec-sa`,`dec-ca`,`dec-ff`,`dec-stack`],note:`Three sub-layers now rather than two, again each with a residual and a norm, again repeated N times.`},{title:`Predict the next token`,lit:[`dec-lin`,`dec-sm`,`dec-out`],note:`A linear layer to vocabulary size and a softmax: a probability for every word. Take one, append it, and run the decoder again. The encoder runs once; the decoder runs once per output token — which is where “transformers are parallel” gets its asterisk.`}],K=u(0),q=l(()=>K.value>=G.length),J=l(()=>K.value===0?null:G[K.value-1]);function Y(){K.value=q.value?0:K.value+1}function X(e){return K.value===0?`idle`:J.value?.lit.includes(e)?`current`:G.slice(0,K.value).some(t=>t.lit.includes(e))?`seen`:`idle`}return(e,t)=>{let a=E,s=w;return y(),f(s,{"max-width":`43rem`},{controls:n(()=>[r(a,{label:q.value?`Start over`:K.value===0?`Walk the architecture`:`Next step`,glyph:`▸`,onClick:Y},null,8,[`label`])]),readout:n(()=>[J.value?(y(),c(d,{key:0},[o(`strong`,null,g(K.value)+`/`+g(G.length)+` · `+g(J.value.title),1),h(` — `+g(J.value.note),1)],64)):(y(),c(d,{key:1},[t[1]||=h(` Six boxes you have already met, arranged into two stacks. Press `,-1),t[2]||=o(`em`,null,`Walk the architecture`,-1),t[3]||=h(` and follow the data: up the encoder once, then up the decoder once for every word it writes. `,-1)],64))]),default:n(()=>[(y(),c(`svg`,{class:`dl-stack`,viewBox:`0 0 ${z} ${B}`,preserveAspectRatio:`xMidYMid meet`,role:`img`,"aria-label":`The 2017 encoder-decoder transformer: an encoder stack reading the source sentence and a decoder stack that attends to its own output and to the encoder's`},[t[0]||=o(`defs`,null,[o(`marker`,{id:`dl-stack-arrow`,viewBox:`0 0 8 8`,refX:`7`,refY:`4`,markerWidth:`5`,markerHeight:`5`,orient:`auto-start-reverse`},[o(`path`,{d:`M0,0 L8,4 L0,8 z`,fill:`currentColor`})])],-1),_(` Column spines, drawn first so the boxes sit on top of them. `),o(`line`,{class:`dl-stack__spine`,x1:165,y1:336,x2:165,y2:176}),o(`line`,{class:`dl-stack__spine`,x1:475,y1:336,x2:475,y2:54,"marker-end":`url(#dl-stack-arrow)`}),_(` Repeated-block brackets. `),o(`rect`,{class:p([`dl-stack__repeat`,`is-${X(`enc-stack`)}`]),x:44,y:`172`,width:242,height:`84`,rx:`8`},null,10,O),o(`text`,{class:p([`dl-stack__repeatlabel`,`is-${X(`enc-stack`)}`]),x:38,y:`214`,"text-anchor":`end`},`×`+g(C.layers),11,k),o(`rect`,{class:p([`dl-stack__repeat`,`is-${X(`dec-stack`)}`]),x:354,y:`134`,width:242,height:`122`,rx:`8`},null,10,A),o(`text`,{class:p([`dl-stack__repeatlabel`,`is-${X(`dec-stack`)}`]),x:602,y:`198`,"text-anchor":`start`},`×`+g(C.layers),11,j),_(` The one place the two stacks touch. `),o(`path`,{class:p([`dl-stack__cross`,`is-${X(`cross`)}`]),d:`M 165 176 V 158 H 320 V 195 H 362`,"marker-end":`url(#dl-stack-arrow)`},null,10,M),o(`text`,{class:p([`dl-stack__crosslabel`,`is-${X(`cross`)}`]),x:`318`,y:`152`,"text-anchor":`middle`},` K, V from the encoder `,2),_(` Positional-encoding adders. `),(y(!0),c(d,null,i([{id:`enc-pe`,x:165},{id:`dec-pe`,x:475}],e=>(y(),c(`g`,{key:e.id},[o(`circle`,{class:p([`dl-stack__add`,`is-${X(e.id)}`]),cx:e.x,cy:`272`,r:`11`},null,10,N),o(`text`,{class:`dl-stack__plus`,x:e.x,y:`277`,"text-anchor":`middle`},`+`,8,P),o(`text`,{class:p([`dl-stack__pe`,`is-${X(e.id)}`]),x:e.x-18,y:`276`,"text-anchor":`end`},`position`,10,F)]))),128)),_(` The boxes. `),(y(),c(d,null,i(T,e=>o(`g`,{key:e.id},[o(`rect`,{class:p([`dl-stack__box`,`is-${X(e.id)}`]),x:e.x,y:e.y,width:V,height:W,rx:`5`},null,10,I),o(`text`,{class:p([`dl-stack__label`,`is-${X(e.id)}`]),x:e.x+V/2,y:e.y+(e.sub?14:20),"text-anchor":`middle`},g(e.label),11,L),e.sub?(y(),c(`text`,{key:0,class:p([`dl-stack__sub`,`is-${X(e.id)}`]),x:e.x+V/2,y:e.y+25,"text-anchor":`middle`},g(e.sub),11,R)):_(`v-if`,!0)])),64)),_(` Ports. `),o(`text`,{class:p([`dl-stack__port`,`is-${X(`enc-in`)}`]),x:165,y:`350`,"text-anchor":`middle`},` source sentence `,2),o(`text`,{class:p([`dl-stack__port`,`is-${X(`dec-in`)}`]),x:475,y:`350`,"text-anchor":`middle`},` output so far, shifted right `,2),o(`text`,{class:p([`dl-stack__port`,`is-${X(`dec-out`)}`]),x:475,y:`44`,"text-anchor":`middle`},` probability of every next word `,2),o(`text`,{class:`dl-stack__side`,x:H,y:`18`},`ENCODER — reads once`),o(`text`,{class:`dl-stack__side`,x:U,y:`18`},`DECODER — runs once per output token`)],8,D))]),_:1})}}}),[[`__scopeId`,`data-v-66f48009`]]),K={class:`mt-2 dl-callout`},q={__name:`class.md__slidev_10`,setup(i){let{$slidev:l,$nav:u,$clicksContext:d,$clicks:p,$page:m,$renderContext:g,$frontmatter:_}=x();return d.setup(),(i,l)=>{let u=G,d=C,p=a(`click`);return y(),f(T,v(t(s(S)(s(_),9))),{aside:n(t=>[l[2]||=o(`p`,null,[h(`Press `),o(`strong`,null,`Walk the architecture`),h(` and follow the data: nine steps, no new boxes.`)],-1),r(d,null,{default:n(()=>[...l[0]||=[o(`ul`,null,[o(`li`,null,[h(`up the encoder `),o(`strong`,null,`once`)]),o(`li`,null,[h(`then up the decoder `),o(`strong`,null,`once per word it writes`)]),o(`li`,null,`cross-attention is the only wire between them`)],-1)]]),_:1}),e((y(),c(`div`,K,[...l[1]||=[o(`p`,null,`The famous figure, in the order the data actually moves.`,-1)]])),[[p]])]),default:n(()=>[r(u,{layers:6})]),_:1},16)}}};export{q as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-D_ZyssbS2.js b/lecture-06/class/assets/md-D_ZyssbS2.js new file mode 100644 index 0000000000000000000000000000000000000000..0bd922070f73334d0460fbb24514fd775bb77c67 --- /dev/null +++ b/lecture-06/class/assets/md-D_ZyssbS2.js @@ -0,0 +1,12 @@ +import{$ as e,E as t,Q as n,S as r,W as i,_ as a,_t as o,b as s,v as c,w as l,x as u,xt as d,y as f,yt as p,z as m}from"./modules/shiki-BFOesOFp.js";import{t as h}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as g,t as _}from"./slidev/context-DrkI8qiD.js";import{t as v}from"./TransformerGlyph-D9TehqNe.js";import{t as y}from"./default-Cq9fupKf.js";var b=[`href`],x={key:0,class:`dl-linkcard__icon`},S={class:`dl-linkcard__text`},C={class:`dl-linkcard__title`},w={key:0,class:`dl-linkcard__blurb`},T={class:`dl-linkcard__host`},E=h(l({__name:`LinkCard`,props:{href:{},title:{},blurb:{},icon:{}},setup(e){let{$slidev:t,$nav:n,$clicksContext:r,$clicks:i,$page:c,$renderContext:l,$frontmatter:u}=g(),p=e,h=p.href.replace(/^https?:\/\//,``).replace(/\/.*$/,``);return(e,t)=>(m(),s(`a`,{class:`dl-linkcard`,href:p.href,target:`_blank`,rel:`noopener`},[p.icon?(m(),s(`div`,x,d(p.icon),1)):f(`v-if`,!0),a(`div`,S,[a(`div`,C,d(p.title),1),p.blurb?(m(),s(`div`,w,d(p.blurb),1)):f(`v-if`,!0),a(`div`,T,d(o(h)),1)])],8,b))}}),[[`__scopeId`,`data-v-77ab5d10`]]),D={class:`grid grid-cols-3 gap-4 mt-4`},O={class:`mt-4 flex items-center gap-4 dl-tight`},k={class:`mt-2 dl-secondary`},A={__name:`class.md__slidev_43`,setup(l){let{$slidev:d,$nav:f,$clicksContext:h,$clicks:b,$page:x,$renderContext:S,$frontmatter:C}=g();return h.setup(),(l,d)=>{let f=E,h=v,g=i(`click`);return m(),c(y,p(t(o(_)(o(C),42))),{default:n(()=>[d[2]||=a(`h1`,null,`Reading, and the lab`,-1),a(`div`,D,[e((m(),s(`div`,null,[r(f,{href:`https://jalammar.github.io/illustrated-transformer/`,title:`The Illustrated Transformer`,blurb:`Alammar, 2018. The pictures everyone has seen, and still the best first read. Do this one before the lab.`,icon:`🖼️`})])),[[g]]),e((m(),s(`div`,null,[r(f,{href:`https://sebastianraschka.com/blog/2023/self-attention-from-scratch.html`,title:`Self-attention from scratch`,blurb:`Raschka, 2023. The same worked example as today's widgets, in NumPy and PyTorch, at full size.`,icon:`✍️`})])),[[g]]),e((m(),s(`div`,null,[r(f,{href:`https://github.com/karpathy/nanoGPT`,title:`nanoGPT`,blurb:`Karpathy. A complete, readable, trainable decoder-only transformer in about 300 lines. Its attention is our “Self-attention, written out”.`,icon:`💻`})])),[[g]])]),e((m(),s(`div`,O,[r(h,{kind:`decoder`,size:64}),d[0]||=a(`div`,null,[a(`p`,null,[a(`strong`,null,`In the lab.`),u(` Build the block from “A block, and a stack”. Train a small decoder-only model on character-level text. Then drop `),a(`code`,null,`is_causal`),u(`, the `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msqrt`,null,[a(`msub`,null,[a(`mi`,null,`d`),a(`mi`,null,`k`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\sqrt{d_k}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.04em`,"vertical-align":`-0.1828em`}}),a(`span`,{class:`mord sqrt`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8572em`}},[a(`span`,{class:`svg-align`,style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`,style:{"padding-left":`0.833em`}},[a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`d`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3361em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-2.8172em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`hide-tail`,style:{"min-width":`0.853em`,height:`1.08em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`1.08em`,viewBox:`0 0 400000 1080`,preserveAspectRatio:`xMinYMin slice`},[a(`path`,{d:`M95,702 +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l0 -0 +c5.3,-9.3,12,-14,20,-14 +H400000v40H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M834 80h400000v40h-400000z`})])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1828em`}},[a(`span`)])])])])])])]),u(` and the positional encoding, one at a time. Report what each one costs.`)])],-1)])),[[g]]),e((m(),s(`div`,k,[...d[1]||=[a(`p`,null,`Dropping the positional encoding is the interesting one. Predict first.`,-1)]])),[[g]])]),_:1},16)}}};export{A as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-DgIoPoNt.js b/lecture-06/class/assets/md-DgIoPoNt.js new file mode 100644 index 0000000000000000000000000000000000000000..a568d8a882af10e05ff1aee5d2f1facb22968cbb --- /dev/null +++ b/lecture-06/class/assets/md-DgIoPoNt.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,W as r,_ as i,_t as a,b as o,v as s,yt as c,z as l}from"./modules/shiki-BFOesOFp.js";import{n as u,t as d}from"./slidev/context-DrkI8qiD.js";import{t as f}from"./default-Cq9fupKf.js";var p={class:`mt-1 flex justify-center`},m={viewBox:`0 0 690 250`,class:`dl-diagram`,style:{"max-width":`40rem`},role:`img`,"aria-label":`Three columns. Encoder-only: a whole review in, one label out, as in sentiment, search embeddings and named entities. Decoder-only: a prompt in, text written word by word, as in chat, code and question answering. Encoder-decoder: a full source in, a different full sequence out, as in translation, summarisation and speech to text.`},h={class:`dl-callout`},g={__name:`class.md__slidev_35`,setup(g){let{$slidev:_,$nav:v,$clicksContext:y,$clicks:b,$page:x,$renderContext:S,$frontmatter:C}=u();return y.setup(),(u,g)=>{let _=r(`click`);return l(),s(f,c(t(a(d)(a(C),34))),{default:n(()=>[g[14]||=i(`h1`,null,`Which kind for which job`,-1),g[15]||=i(`p`,null,`Pick by the shape of the task: what goes in, what comes out.`,-1),i(`div`,p,[(l(),o(`svg`,m,[g[2]||=i(`defs`,null,[i(`marker`,{id:`l6s5-jobs-head`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dg-head`})])],-1),g[3]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`110`,y:`18`,"text-anchor":`middle`},`encoder-only`,-1),g[4]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`345`,y:`18`,"text-anchor":`middle`},`decoder-only`,-1),g[5]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`580`,y:`18`,"text-anchor":`middle`},`encoder–decoder`,-1),g[6]||=i(`rect`,{x:`50`,y:`34`,width:`120`,height:`70`,rx:`6`,class:`dl-dg-box`},null,-1),g[7]||=i(`text`,{class:`dl-dg-in`,x:`110`,y:`74`,"text-anchor":`middle`},`reads all`,-1),g[8]||=i(`rect`,{x:`285`,y:`34`,width:`120`,height:`70`,rx:`6`,class:`dl-dg-box is-accent`},null,-1),g[9]||=i(`text`,{class:`dl-dg-in`,x:`345`,y:`74`,"text-anchor":`middle`},`writes left → right`,-1),g[10]||=i(`rect`,{x:`510`,y:`34`,width:`62`,height:`70`,rx:`6`,class:`dl-dg-box`},null,-1),g[11]||=i(`rect`,{x:`588`,y:`34`,width:`62`,height:`70`,rx:`6`,class:`dl-dg-box is-accent`},null,-1),g[12]||=i(`path`,{d:`M572 69 H586`,class:`dl-dg-line`,"marker-end":`url(#l6s5-jobs-head)`},null,-1),e((l(),o(`g`,null,[...g[0]||=[i(`text`,{class:`dl-dg-small`,x:`110`,y:`128`,"text-anchor":`middle`},`in: a whole review`,-1),i(`text`,{class:`dl-dg-small`,x:`110`,y:`146`,"text-anchor":`middle`},`out: one label, "positive"`,-1),i(`text`,{class:`dl-dg-small`,x:`345`,y:`128`,"text-anchor":`middle`},`in: "Write a haiku about"`,-1),i(`text`,{class:`dl-dg-small`,x:`345`,y:`146`,"text-anchor":`middle`},`out: next word, again and again`,-1),i(`text`,{class:`dl-dg-small`,x:`580`,y:`128`,"text-anchor":`middle`},`in: "Ich habe es gelesen"`,-1),i(`text`,{class:`dl-dg-small`,x:`580`,y:`146`,"text-anchor":`middle`},`out: "I have read it"`,-1)]])),[[_]]),e((l(),o(`g`,null,[...g[1]||=[i(`text`,{class:`dl-dg-small is-good`,x:`110`,y:`180`,"text-anchor":`middle`},`sentiment, spam, topic`,-1),i(`text`,{class:`dl-dg-small is-good`,x:`110`,y:`198`,"text-anchor":`middle`},`search embeddings`,-1),i(`text`,{class:`dl-dg-small is-good`,x:`110`,y:`216`,"text-anchor":`middle`},`named entities`,-1),i(`text`,{class:`dl-dg-small is-good`,x:`345`,y:`180`,"text-anchor":`middle`},`chat assistants`,-1),i(`text`,{class:`dl-dg-small is-good`,x:`345`,y:`198`,"text-anchor":`middle`},`code completion`,-1),i(`text`,{class:`dl-dg-small is-good`,x:`345`,y:`216`,"text-anchor":`middle`},`question answering`,-1),i(`text`,{class:`dl-dg-small is-good`,x:`580`,y:`180`,"text-anchor":`middle`},`translation`,-1),i(`text`,{class:`dl-dg-small is-good`,x:`580`,y:`198`,"text-anchor":`middle`},`summarisation`,-1),i(`text`,{class:`dl-dg-small is-good`,x:`580`,y:`216`,"text-anchor":`middle`},`speech to text`,-1),i(`text`,{class:`dl-dg-small`,x:`110`,y:`242`,"text-anchor":`middle`},`BERT`,-1),i(`text`,{class:`dl-dg-small`,x:`345`,y:`242`,"text-anchor":`middle`},`GPT, Llama`,-1),i(`text`,{class:`dl-dg-small`,x:`580`,y:`242`,"text-anchor":`middle`},`T5, Whisper`,-1)]])),[[_]])]))]),e((l(),o(`div`,h,[...g[13]||=[i(`p`,null,`Label it → encoder. Write it → decoder. Turn it into another sequence → both.`,-1)]])),[[_]])]),_:1},16)}}};export{g as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-DhsPSwrk.css b/lecture-06/class/assets/md-DhsPSwrk.css new file mode 100644 index 0000000000000000000000000000000000000000..26095b4fe5c0a58d332cebcb010703ba8207f3e5 --- /dev/null +++ b/lecture-06/class/assets/md-DhsPSwrk.css @@ -0,0 +1 @@ +.dl-blk[data-v-c465f205]{width:100%;height:100%}.dl-blk__spine[data-v-c465f205]{stroke:var(--dl-border);stroke-width:2px;color:var(--dl-border)}.dl-blk__residual[data-v-c465f205]{fill:none;stroke:var(--dl-border);stroke-width:1.6px;stroke-dasharray:4 3;color:var(--dl-border);transition:stroke .2s}.dl-blk__residual.is-lit[data-v-c465f205]{stroke:var(--dl-accent);color:var(--dl-accent)}.dl-blk__box[data-v-c465f205]{fill:var(--dl-bg);stroke:var(--dl-border);stroke-width:1.3px;transition:fill .2s,stroke .2s}.dl-blk__box.is-sublayer[data-v-c465f205]{stroke-dasharray:none;stroke-width:1.8px}.dl-blk__box.is-lit[data-v-c465f205]{fill:var(--dl-surface);stroke:var(--dl-body)}.dl-blk__box.is-current[data-v-c465f205]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:2.2px}.dl-blk__add[data-v-c465f205]{fill:var(--dl-bg);stroke:var(--dl-border);stroke-width:1.5px;transition:fill .2s,stroke .2s}.dl-blk__add.is-lit[data-v-c465f205]{stroke:var(--dl-body)}.dl-blk__add.is-current[data-v-c465f205]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:2.2px}.dl-blk__plus[data-v-c465f205]{fill:var(--dl-heading);font-size:14px;font-weight:700}.dl-blk__label[data-v-c465f205]{fill:var(--dl-muted);font-size:12.5px;font-weight:600;transition:fill .2s}.dl-blk__label.is-lit[data-v-c465f205]{fill:var(--dl-heading)}.dl-blk__sub[data-v-c465f205]{fill:var(--dl-muted);font-size:9.5px}.dl-blk__sub.is-lit[data-v-c465f205]{fill:var(--dl-body)}.dl-blk__port[data-v-c465f205]{fill:var(--dl-muted);font-size:10px}.dl-blk__rail[data-v-c465f205]{fill:var(--dl-muted);letter-spacing:.08em;font-size:9.5px} diff --git a/lecture-06/class/assets/md-Dnd6WsWa2.js b/lecture-06/class/assets/md-Dnd6WsWa2.js new file mode 100644 index 0000000000000000000000000000000000000000..4439475449f5c4825e3dcc597a7a3a67cc27fbcb --- /dev/null +++ b/lecture-06/class/assets/md-Dnd6WsWa2.js @@ -0,0 +1,9 @@ +import{E as e,M as t,Q as n,S as r,_ as i,_t as a,v as o,x as s,yt as c,z as l}from"./modules/shiki-BFOesOFp.js";import{n as u,t as d}from"./slidev/context-DrkI8qiD.js";import{t as f}from"./slidev/VClicks-Dmx1KjZv.js";import{t as p}from"./default-Cq9fupKf.js";import{t as m}from"./slidev/CodeBlockWrapper-gsL5r1Ig.js";var h={class:`grid grid-cols-[1fr_1fr] gap-6 mt-2 items-center`},g={class:`dl-tight`},_={__name:`class.md__slidev_39`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=u();return b.setup(),(u,_)=>{let v=m,y=f;return l(),o(p,c(e(a(d)(a(w),38))),{default:n(()=>[_[3]||=i(`h1`,null,`The mechanism is one function call`,-1),r(v,t({lines:!0},{title:``,ranges:[`all`,`1-4`,`6`,`8-9`,`all`]}),{default:n(()=>[..._[0]||=[i(`pre`,{class:`shiki shiki-themes vitesse-dark vitesse-light slidev-code`,style:{"--shiki-dark":`#dbd7caee`,"--shiki-light":`#393a34`,"--shiki-dark-bg":`#121212`,"--shiki-light-bg":`#ffffff`}},[i(`code`,{class:`language-python`},[i(`span`,{class:`line`},[i(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`import`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`)]),s(` +`),i(`span`,{class:`line`},[i(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`import`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`nn`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`functional `),i(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`as`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` F`)]),s(` +`),i(`span`,{class:`line`}),s(` +`),i(`span`,{class:`line`},[i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`q`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` k`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` v `),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},` (`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`torch`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`randn`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),i(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`32`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),i(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 8`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),i(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 128`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),i(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 64`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),i(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` for`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` _ `),i(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`in`),i(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` range`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),i(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`3`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`))`),i(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # (B, heads, T, d_k)`)]),s(` +`),i(`span`,{class:`line`}),s(` +`),i(`span`,{class:`line`},[i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`out `),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` F`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`scaled_dot_product_attention`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`q`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` k`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` v`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),i(`span`,{style:{"--shiki-dark":`#BD976A`,"--shiki-light":`#B07D48`}},` is_causal`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),i(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`True`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),s(` +`),i(`span`,{class:`line`}),s(` +`),i(`span`,{class:`line`},[i(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},`print`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`out`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),i(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`shape`),i(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),i(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # torch.Size([32, 8, 128, 64])`)]),s(` +`),i(`span`,{class:`line`},[i(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},`# scores (32, 8, 128, 128) are never built — that is what FlashAttention buys`)])])],-1)]]),_:1},16),i(`div`,h,[_[2]||=i(`div`,null,[i(`svg`,{class:`dl-diagram`,viewBox:`0 0 440 130`,role:`img`,"aria-label":`q, k and v, each of shape 32 by 8 by 128 by 64, go into one attention call that scales, masks, applies softmax and multiplies by v. The output has the same shape. The scores tensor, 32 by 8 by 128 by 128, is drawn dashed in red: it is never stored.`},[i(`defs`,null,[i(`marker`,{id:`l6s5-a1`,markerWidth:`8`,markerHeight:`8`,refX:`7`,refY:`4`,orient:`auto`},[i(`path`,{d:`M0 0 L8 4 L0 8 z`,class:`dl-dg-head`})])]),i(`rect`,{x:`4`,y:`8`,width:`70`,height:`24`,rx:`3`,class:`dl-dg-box`}),i(`text`,{x:`39`,y:`25`,class:`dl-dg-lab is-sm`,"text-anchor":`middle`},`q`),i(`rect`,{x:`4`,y:`38`,width:`70`,height:`24`,rx:`3`,class:`dl-dg-box`}),i(`text`,{x:`39`,y:`55`,class:`dl-dg-lab is-sm`,"text-anchor":`middle`},`k`),i(`rect`,{x:`4`,y:`68`,width:`70`,height:`24`,rx:`3`,class:`dl-dg-box`}),i(`text`,{x:`39`,y:`85`,class:`dl-dg-lab is-sm`,"text-anchor":`middle`},`v`),i(`text`,{x:`44`,y:`112`,class:`dl-dg-small`,"text-anchor":`middle`},`(32, 8, 128, 64)`),i(`path`,{d:`M78 50 H122`,class:`dl-dg-arrow`,"marker-end":`url(#l6s5-a1)`}),i(`rect`,{x:`126`,y:`26`,width:`176`,height:`48`,rx:`6`,class:`dl-dg-op`}),i(`text`,{x:`214`,y:`46`,class:`dl-dg-lab is-sm`,"text-anchor":`middle`},`attention`),i(`text`,{x:`214`,y:`64`,class:`dl-dg-small`,"text-anchor":`middle`},`scale, mask, softmax, @ v`),i(`rect`,{x:`144`,y:`88`,width:`140`,height:`38`,rx:`4`,class:`dl-dg-box is-bad`}),i(`text`,{x:`214`,y:`103`,class:`dl-dg-small is-bad`,"text-anchor":`middle`},`scores (32, 8, 128, 128)`),i(`text`,{x:`214`,y:`119`,class:`dl-dg-small is-bad`,"text-anchor":`middle`},`never stored`),i(`path`,{d:`M306 50 H340`,class:`dl-dg-arrow`,"marker-end":`url(#l6s5-a1)`}),i(`rect`,{x:`344`,y:`38`,width:`70`,height:`24`,rx:`3`,class:`dl-dg-box is-accent`}),i(`text`,{x:`379`,y:`55`,class:`dl-dg-lab is-sm`,"text-anchor":`middle`},`out`),i(`text`,{x:`384`,y:`80`,class:`dl-dg-small`,"text-anchor":`middle`},`(32, 8, 128, 64)`)])],-1),i(`div`,g,[r(y,null,{default:n(()=>[..._[1]||=[i(`ul`,null,[i(`li`,null,[s(`Scaling, the mask and the softmax all happen inside; `),i(`code`,null,`is_causal=True`),s(` is the triangle`)]),i(`li`,null,[s(`A fused kernel never stores the `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`T`),i(`mo`,null,`×`),i(`mi`,null,`T`)]),i(`annotation`,{encoding:`application/x-tex`},`T \\times T`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.7667em`,"vertical-align":`-0.0833em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),i(`span`,{class:`mbin`},`×`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`)])])]),s(` scores`)]),i(`li`,null,[s(`Heads are a `),i(`strong`,null,`batch dimension`),s(`: `),i(`code`,null,`(B, heads, T, d_k)`)])],-1)]]),_:1})])])]),_:1},16)}}};export{_ as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-DnwIl7Jl.js b/lecture-06/class/assets/md-DnwIl7Jl.js new file mode 100644 index 0000000000000000000000000000000000000000..ff1b5b95b7b13bd7922b6304f95e3876200e6670 --- /dev/null +++ b/lecture-06/class/assets/md-DnwIl7Jl.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,W as r,_ as i,_t as a,b as o,v as s,x as c,yt as l,z as u}from"./modules/shiki-BFOesOFp.js";import{n as d,t as f}from"./slidev/context-DrkI8qiD.js";import{t as p}from"./default-Cq9fupKf.js";var m={class:`mt-1 flex justify-center`},h={viewBox:`0 0 640 250`,class:`dl-diagram`,style:{"max-width":`38rem`},role:`img`,"aria-label":`The two-stack transformer with five numbered parts: 1 attention, 2 several heads and position, 3 the feed-forward network, 4 residual and norm wrappers, 5 the decoder's mask and cross-attention`},g={class:`dl-tight`},_={__name:`class.md__slidev_11`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=d();return b.setup(),(d,_)=>{let v=r(`click`);return u(),s(p,l(t(a(f)(a(w),10))),{default:n(()=>[_[19]||=i(`h1`,null,`The parts, one at a time`,-1),_[20]||=i(`p`,null,`Every box is one of five parts. The next three sections open them in order.`,-1),i(`div`,m,[(u(),o(`svg`,h,[_[1]||=i(`defs`,null,[i(`marker`,{id:`l6s1-parts-head`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dg-head`})])],-1),_[2]||=i(`rect`,{x:`40`,y:`70`,width:`200`,height:`130`,rx:`8`,class:`dl-dg-box`},null,-1),_[3]||=i(`text`,{class:`dl-dg-small`,x:`50`,y:`62`},`encoder`,-1),_[4]||=i(`rect`,{x:`58`,y:`88`,width:`164`,height:`30`,rx:`5`,class:`dl-dg-box`},null,-1),_[5]||=i(`text`,{class:`dl-dg-in`,x:`140`,y:`108`,"text-anchor":`middle`},`feed-forward`,-1),_[6]||=i(`rect`,{x:`58`,y:`150`,width:`164`,height:`30`,rx:`5`,class:`dl-dg-box is-accent`},null,-1),_[7]||=i(`text`,{class:`dl-dg-in`,x:`140`,y:`170`,"text-anchor":`middle`},`self-attention`,-1),_[8]||=i(`path`,{d:`M48 196 V80`,class:`dl-dg-line`,style:{"stroke-dasharray":`4 3`}},null,-1),_[9]||=i(`rect`,{x:`380`,y:`40`,width:`220`,height:`160`,rx:`8`,class:`dl-dg-box`},null,-1),_[10]||=i(`text`,{class:`dl-dg-small`,x:`390`,y:`32`},`decoder`,-1),_[11]||=i(`rect`,{x:`398`,y:`56`,width:`184`,height:`28`,rx:`5`,class:`dl-dg-box`},null,-1),_[12]||=i(`text`,{class:`dl-dg-in`,x:`490`,y:`75`,"text-anchor":`middle`},`feed-forward`,-1),_[13]||=i(`rect`,{x:`398`,y:`100`,width:`184`,height:`28`,rx:`5`,class:`dl-dg-box is-accent`},null,-1),_[14]||=i(`text`,{class:`dl-dg-in`,x:`490`,y:`119`,"text-anchor":`middle`},`cross-attention`,-1),_[15]||=i(`rect`,{x:`398`,y:`146`,width:`184`,height:`28`,rx:`5`,class:`dl-dg-box is-accent`},null,-1),_[16]||=i(`text`,{class:`dl-dg-in`,x:`490`,y:`165`,"text-anchor":`middle`},`masked self-attention`,-1),_[17]||=i(`path`,{d:`M240 104 C 310 104, 320 114, 396 114`,class:`dl-dg-line`,"marker-end":`url(#l6s1-parts-head)`},null,-1),e((u(),o(`g`,null,[..._[0]||=[i(`circle`,{cx:`20`,cy:`165`,r:`12`,class:`dl-dg-op`},null,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`20`,y:`170`,"text-anchor":`middle`},`1`,-1),i(`circle`,{cx:`140`,cy:`226`,r:`12`,class:`dl-dg-op`},null,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`140`,y:`231`,"text-anchor":`middle`},`2`,-1),i(`text`,{class:`dl-dg-small`,x:`158`,y:`231`},`heads + position`,-1),i(`circle`,{cx:`20`,cy:`103`,r:`12`,class:`dl-dg-op`},null,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`20`,y:`108`,"text-anchor":`middle`},`3`,-1),i(`circle`,{cx:`48`,cy:`226`,r:`12`,class:`dl-dg-op`},null,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`48`,y:`231`,"text-anchor":`middle`},`4`,-1),i(`text`,{class:`dl-dg-small`,x:`64`,y:`231`},`residual`,-1),i(`circle`,{cx:`620`,cy:`140`,r:`12`,class:`dl-dg-op`},null,-1),i(`text`,{class:`dl-dg-lab is-sm`,x:`620`,y:`145`,"text-anchor":`middle`},`5`,-1)]])),[[v]])]))]),e((u(),o(`div`,g,[..._[18]||=[i(`p`,null,[c(`Parts `),i(`strong`,null,`1`),c(` and `),i(`strong`,null,`2`),c(` → sections 02 and 03. Parts `),i(`strong`,null,`3`),c(` and `),i(`strong`,null,`4`),c(` → section 03. Part `),i(`strong`,null,`5`),c(` → section 04.`)],-1)]])),[[v]])]),_:1},16)}}};export{_ as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-Dw-XEgB42.js b/lecture-06/class/assets/md-Dw-XEgB42.js new file mode 100644 index 0000000000000000000000000000000000000000..8c72e59800d84149acfabed7b81546eac3ede671 --- /dev/null +++ b/lecture-06/class/assets/md-Dw-XEgB42.js @@ -0,0 +1 @@ +import{E as e,Q as t,S as n,_ as r,_t as i,v as a,yt as o,z as s}from"./modules/shiki-BFOesOFp.js";import{n as c,t as l}from"./slidev/context-DrkI8qiD.js";import{t as u}from"./TransformerGlyph-D9TehqNe.js";import{t as d}from"./section-C2g2VRmZ.js";var f={class:`absolute right-18 top-1/2 -translate-y-1/2`},p={__name:`class.md__slidev_33`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return s(),a(d,o(e(i(l)(i(b),32))),{default:t(()=>[p[0]||=r(`h1`,null,`Three kinds of transformer`,-1),p[1]||=r(`p`,null,`The same parts, wired three ways, for different jobs.`,-1),r(`div`,f,[n(m,{kind:`fork`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-K0Oycy6G.js b/lecture-06/class/assets/md-K0Oycy6G.js new file mode 100644 index 0000000000000000000000000000000000000000..a1fa60471965aae617e4b2b7b711292e300fc67c --- /dev/null +++ b/lecture-06/class/assets/md-K0Oycy6G.js @@ -0,0 +1 @@ +import{E as e,Q as t,S as n,_ as r,_t as i,v as a,yt as o,z as s}from"./modules/shiki-BFOesOFp.js";import{n as c,t as l}from"./slidev/context-DrkI8qiD.js";import{t as u}from"./TransformerGlyph-D9TehqNe.js";import{t as d}from"./section-C2g2VRmZ.js";var f={class:`absolute right-18 top-1/2 -translate-y-1/2`},p={__name:`class.md__slidev_12`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return s(),a(d,o(e(i(l)(i(b),11))),{default:t(()=>[p[0]||=r(`h1`,null,`Query, key, value`,-1),p[1]||=r(`p`,null,`A dictionary lookup, made soft.`,-1),r(`div`,f,[n(m,{kind:`qkv`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-KdnLugHx2.js b/lecture-06/class/assets/md-KdnLugHx2.js new file mode 100644 index 0000000000000000000000000000000000000000..f81e7ba0b86542e19760e95384116c38fedd3eab --- /dev/null +++ b/lecture-06/class/assets/md-KdnLugHx2.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,V as i,W as a,_ as o,_t as s,b as c,g as l,lt as u,m as d,v as f,vt as p,w as m,x as h,xt as g,y as _,yt as v,z as y}from"./modules/shiki-BFOesOFp.js";import{t as b}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as x,t as S}from"./slidev/context-DrkI8qiD.js";import{t as C}from"./slidev/VClicks-Dmx1KjZv.js";import{n as w,t as T}from"./interactive-CI8hm4xw.js";var E={class:`dl-fam`},D={class:`dl-fam__tabs`,role:`tablist`},O=[`aria-selected`,`onClick`],k={class:`dl-fam__tabname`},A={class:`dl-fam__tabshape`},j={class:`dl-fam__panel`},M={class:`dl-fam__masks`},N={key:0,class:`dl-fam__mask`},P={class:`dl-fam__maskcap`},F={class:`dl-fam__grid`},I={key:1,class:`dl-fam__mask`},L={class:`dl-fam__maskcap`},R={class:`dl-fam__grid`},z={key:2,class:`dl-fam__mask`},B={class:`dl-fam__grid`},V={class:`dl-fam__facts`},H={class:`dl-fam__examples`},U={class:`dl-fam__year`},W=5,G=b(m({__name:`ModelFamilies`,setup(e){let{$slidev:t,$nav:r,$clicksContext:a,$clicks:s,$page:m,$renderContext:v,$frontmatter:b}=x(),S=[{key:`enc`,name:`Encoder-only`,shape:`the encoder stack, on its own`,mask:`full`,trained:`Mask out 15% of the tokens and predict them from both sides — “masked language modelling”.`,good:`Understanding a text you already have in full: classification, sentiment, named entities, retrieval embeddings, reranking.`,bad:`Cannot generate. There is no notion of “next”, because every position was trained while seeing the future.`,examples:[{name:`BERT`,year:2018},{name:`RoBERTa`,year:2019},{name:`DeBERTa`,year:2020},{name:`ModernBERT`,year:2024}]},{key:`dec`,name:`Decoder-only`,shape:`the decoder stack, with the cross-attention removed`,mask:`causal`,trained:`Predict the next token, over and over, on everything ever written. Every position is a training example, and no labels are needed.`,good:`Generation — and, as it turned out, nearly everything else, because any task phrased as text becomes next-token prediction.`,bad:`Each position only ever sees its left context, so a pure embedding of a whole sentence is weaker than an encoder’s.`,examples:[{name:`GPT-2`,year:2019},{name:`GPT-3`,year:2020},{name:`Llama`,year:2023},{name:`everything since`,year:2024}]},{key:`encdec`,name:`Encoder–decoder`,shape:`the 2017 original, both stacks`,mask:`both`,trained:`Map one sequence to another: translation, summarisation, or a span-corruption objective that rewrites the whole task as text-to-text.`,good:`Problems with a clear source and a clear target, where the source should be read bidirectionally and the target written left to right.`,bad:`Two stacks to train and serve, and a strict source/target split that a general-purpose chat model does not want.`,examples:[{name:`the 2017 paper`,year:2017},{name:`T5`,year:2019},{name:`BART`,year:2019},{name:`Whisper`,year:2022}]}],C=u(1),T=l(()=>S[C.value]);function G(e,t,n){return n===`full`||t<=e}return(e,t)=>{let r=w;return y(),f(r,{"max-width":`44rem`},{readout:n(()=>[T.value.key===`dec`?(y(),c(d,{key:0},[t[7]||=h(` One stack, one mask, one objective — and it ate the field. Not because it is the most expressive of the three, but because “predict the next token” needs `,-1),t[8]||=o(`strong`,null,`no labelled data at all`,-1),t[9]||=h(`, so it is the only one of the three whose training set is the whole internet. `,-1)],64)):T.value.key===`enc`?(y(),c(d,{key:1},[h(` Still the right answer when you have the whole text and want a vector for it. A sentence-embedding or reranking model in production today is far more likely to be encoder-only than to be a chat model. `)],64)):(y(),c(d,{key:2},[h(` The original, and the one all three of these descend from. It is still what you want when the source and the target are genuinely different things — which is why speech recognition and translation kept it long after chat models stopped using it. `)],64))]),default:n(()=>[o(`div`,E,[o(`div`,D,[(y(),c(d,null,i(S,(e,t)=>o(`button`,{key:e.key,type:`button`,role:`tab`,class:p([`dl-fam__tab`,{"is-current":t===C.value}]),"aria-selected":t===C.value,onClick:e=>C.value=t},[o(`span`,k,g(e.name),1),o(`span`,A,g(e.shape),1)],10,O)),64))]),o(`div`,j,[_(` The mask is the difference, so it leads. `),o(`div`,M,[T.value.mask===`causal`?_(`v-if`,!0):(y(),c(`div`,N,[o(`div`,P,g(T.value.mask===`both`?`source`:`all positions`),1),o(`div`,F,[(y(!0),c(d,null,i(25,e=>(y(),c(`span`,{key:e,class:p([`dl-fam__cell`,{"is-on":G(Math.floor((e-1)/W),(e-1)%W,`full`)}])},null,2))),128))]),t[0]||=o(`div`,{class:`dl-fam__maskrole`},`sees both ways`,-1)])),T.value.mask===`full`?_(`v-if`,!0):(y(),c(`div`,I,[o(`div`,L,g(T.value.mask===`both`?`target`:`all positions`),1),o(`div`,R,[(y(!0),c(d,null,i(25,e=>(y(),c(`span`,{key:e,class:p([`dl-fam__cell`,{"is-on":G(Math.floor((e-1)/W),(e-1)%W,`causal`)}])},null,2))),128))]),t[1]||=o(`div`,{class:`dl-fam__maskrole`},`left context only`,-1)])),T.value.mask===`both`?(y(),c(`div`,z,[t[2]||=o(`div`,{class:`dl-fam__maskcap`},`cross`,-1),o(`div`,B,[(y(!0),c(d,null,i(25,e=>(y(),c(`span`,{key:e,class:`dl-fam__cell is-on is-cross`}))),128))]),t[3]||=o(`div`,{class:`dl-fam__maskrole`},`target reads all of source`,-1)])):_(`v-if`,!0)]),o(`dl`,V,[o(`div`,null,[t[4]||=o(`dt`,null,`trained by`,-1),o(`dd`,null,g(T.value.trained),1)]),o(`div`,null,[t[5]||=o(`dt`,null,`use it for`,-1),o(`dd`,null,g(T.value.good),1)]),o(`div`,null,[t[6]||=o(`dt`,null,`cannot`,-1),o(`dd`,null,g(T.value.bad),1)])])]),o(`div`,H,[(y(!0),c(d,null,i(T.value.examples,e=>(y(),c(`span`,{key:e.name,class:`dl-fam__ex`},[h(g(e.name),1),o(`span`,U,g(e.year),1)]))),128))])])]),_:1})}}}),[[`__scopeId`,`data-v-be69a577`]]),K={class:`mt-2 dl-callout`},q={__name:`class.md__slidev_34`,setup(i){let{$slidev:l,$nav:u,$clicksContext:d,$clicks:p,$page:m,$renderContext:g,$frontmatter:_}=x();return d.setup(),(i,l)=>{let u=G,d=C,p=a(`click`);return y(),f(T,v(t(s(S)(s(_),33))),{aside:n(t=>[l[2]||=o(`p`,null,[h(`One paper, three descendants. The difference is `),o(`strong`,null,`the mask`),h(`, not the layer.`)],-1),r(d,null,{default:n(()=>[...l[0]||=[o(`ul`,null,[o(`li`,null,[o(`strong`,null,`encoder-only`),h(` — sees both ways, cannot generate`)]),o(`li`,null,[o(`strong`,null,`decoder-only`),h(` — left context only, generates`)]),o(`li`,null,[o(`strong`,null,`encoder–decoder`),h(` — the 2017 original, both`)])],-1)]]),_:1}),e((y(),c(`div`,K,[...l[1]||=[o(`p`,null,`Same blocks, same attention. Click through all three.`,-1)]])),[[p]])]),default:n(()=>[r(u)]),_:1},16)}}};export{q as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-kE1uizXw.js b/lecture-06/class/assets/md-kE1uizXw.js new file mode 100644 index 0000000000000000000000000000000000000000..0385ef273c95e2f3e88a794238d6acb7a40092ff --- /dev/null +++ b/lecture-06/class/assets/md-kE1uizXw.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,S as r,W as i,_ as a,_t as o,b as s,v as c,yt as l,z as u}from"./modules/shiki-BFOesOFp.js";import{n as d,t as f}from"./slidev/context-DrkI8qiD.js";import{t as p}from"./TransformerGlyph-D9TehqNe.js";import{t as m}from"./default-Cq9fupKf.js";var h={class:`grid grid-cols-4 gap-x-4 gap-y-2 mt-3`},g={class:`flex flex-col items-center text-center gap-1`},_={class:`flex flex-col items-center text-center gap-1`},v={class:`flex flex-col items-center text-center gap-1`},y={class:`flex flex-col items-center text-center gap-1`},b={class:`flex flex-col items-center text-center gap-1`},x={class:`flex flex-col items-center text-center gap-1`},S={class:`flex flex-col items-center text-center gap-1`},C={class:`flex flex-col items-center text-center gap-1`},w={class:`mt-3 dl-callout`},T={__name:`class.md__slidev_2`,setup(T){let{$slidev:E,$nav:D,$clicksContext:O,$clicks:k,$page:A,$renderContext:j,$frontmatter:M}=d();return O.setup(),(d,T)=>{let E=p,D=i(`click`);return u(),c(m,l(t(o(f)(o(M),1))),{default:n(()=>[T[9]||=a(`h1`,null,`Today, in eight parts`,-1),T[10]||=a(`p`,null,`The whole machine first, then each part, then the kinds of transformer in use.`,-1),a(`div`,h,[a(`div`,g,[r(E,{kind:`cut`,size:64}),T[0]||=a(`span`,{class:`dl-secondary`},`00 Why a new design`,-1)]),a(`div`,_,[r(E,{kind:`encdec`,size:64}),T[1]||=a(`span`,{class:`dl-secondary`},`01 The whole architecture`,-1)]),a(`div`,v,[r(E,{kind:`qkv`,size:64}),T[2]||=a(`span`,{class:`dl-secondary`},`02 Attention: query, key, value`,-1)]),a(`div`,y,[r(E,{kind:`block`,size:64}),T[3]||=a(`span`,{class:`dl-secondary`},`03 One block`,-1)]),a(`div`,b,[r(E,{kind:`decoder`,size:64}),T[4]||=a(`span`,{class:`dl-secondary`},`04 Inside the decoder`,-1)]),a(`div`,x,[r(E,{kind:`fork`,size:64}),T[5]||=a(`span`,{class:`dl-secondary`},`05 Three kinds, and their uses`,-1)]),a(`div`,S,[r(E,{kind:`code`,size:64}),T[6]||=a(`span`,{class:`dl-secondary`},`06 In PyTorch`,-1)]),a(`div`,C,[r(E,{kind:`block`,size:64}),T[7]||=a(`span`,{class:`dl-secondary`},`07 Where that leaves us`,-1)])]),e((u(),s(`div`,w,[...T[8]||=[a(`p`,null,`Section 01 shows the full picture. Sections 02 to 04 open its boxes one by one.`,-1)]])),[[D]])]),_:1},16)}}};export{T as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/md-m6ElLsWQ.js b/lecture-06/class/assets/md-m6ElLsWQ.js new file mode 100644 index 0000000000000000000000000000000000000000..85790d247124fa32be9ea902ec7745f1cbc1c97f --- /dev/null +++ b/lecture-06/class/assets/md-m6ElLsWQ.js @@ -0,0 +1 @@ +import{$ as e,E as t,Q as n,W as r,_ as i,_t as a,b as o,v as s,yt as c,z as l}from"./modules/shiki-BFOesOFp.js";import{n as u,t as d}from"./slidev/context-DrkI8qiD.js";import{t as f}from"./default-Cq9fupKf.js";var p={class:`mt-2 flex justify-center`},m={viewBox:`0 0 680 220`,class:`dl-diagram`,role:`img`,"aria-label":`Wall one: the encoder squeezes the source into one vector c, and attention lines fix it. Wall two: a chain of 200 states, each waiting for the one before`},h={class:`mt-2 dl-callout`},g={__name:`class.md__slidev_4`,setup(g){let{$slidev:_,$nav:v,$clicksContext:y,$clicks:b,$page:x,$renderContext:S,$frontmatter:C}=u();return y.setup(),(u,g)=>{let _=r(`click`);return l(),s(f,c(t(a(d)(a(C),3))),{default:n(()=>[g[40]||=i(`h1`,null,`Two walls in reading one word at a time`,-1),g[41]||=i(`p`,null,`A recurrent encoder–decoder reads one word at a time. It hits two walls (hard limits). Attention removed only one.`,-1),i(`div`,p,[(l(),o(`svg`,m,[g[2]||=i(`defs`,null,[i(`marker`,{id:`l6s0-walls-head`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),g[3]||=i(`text`,{class:`dl-dg-small`,x:`8`,y:`16`},`wall one — the bottleneck`,-1),g[4]||=i(`rect`,{class:`dl-dg-box`,x:`8`,y:`120`,width:`46`,height:`34`,rx:`4`},null,-1),g[5]||=i(`rect`,{class:`dl-dg-box`,x:`72`,y:`120`,width:`46`,height:`34`,rx:`4`},null,-1),g[6]||=i(`rect`,{class:`dl-dg-box`,x:`136`,y:`120`,width:`46`,height:`34`,rx:`4`},null,-1),g[7]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`31`,y:`142`,"text-anchor":`middle`},`h₁`,-1),g[8]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`95`,y:`142`,"text-anchor":`middle`},`h₂`,-1),g[9]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`159`,y:`142`,"text-anchor":`middle`},`h₃`,-1),g[10]||=i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-walls-head)`,d:`M54 137 H70`},null,-1),g[11]||=i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-walls-head)`,d:`M118 137 H134`},null,-1),g[12]||=i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-walls-head)`,d:`M182 137 H202`},null,-1),g[13]||=i(`rect`,{class:`dl-dg-box`,x:`204`,y:`124`,width:`30`,height:`26`,rx:`3`},null,-1),g[14]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`219`,y:`142`,"text-anchor":`middle`},`c`,-1),g[15]||=i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-walls-head)`,d:`M234 137 H254`},null,-1),g[16]||=i(`rect`,{class:`dl-dg-box is-accent`,x:`256`,y:`120`,width:`46`,height:`34`,rx:`4`},null,-1),g[17]||=i(`rect`,{class:`dl-dg-box is-accent`,x:`316`,y:`120`,width:`30`,height:`34`,rx:`4`},null,-1),g[18]||=i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-walls-head)`,d:`M302 137 H314`},null,-1),g[19]||=i(`text`,{class:`dl-dg-small`,x:`95`,y:`174`,"text-anchor":`middle`},`encoder`,-1),g[20]||=i(`text`,{class:`dl-dg-small`,x:`219`,y:`174`,"text-anchor":`middle`},`one vector`,-1),g[21]||=i(`text`,{class:`dl-dg-small`,x:`301`,y:`174`,"text-anchor":`middle`},`decoder`,-1),e((l(),o(`g`,null,[...g[0]||=[i(`path`,{class:`dl-dg-line`,d:`M331 118 C 290 40, 70 40, 31 118`},null,-1),i(`path`,{class:`dl-dg-line`,d:`M331 118 C 300 60, 125 60, 95 118`},null,-1),i(`path`,{class:`dl-dg-line`,d:`M331 118 C 310 80, 180 80, 159 118`},null,-1),i(`text`,{class:`dl-dg-small is-good`,x:`8`,y:`204`},`attention fixed it: a fresh weighted sum at every step`,-1)]])),[[_]]),g[22]||=i(`line`,{class:`dl-dg-split`,x1:`360`,y1:`8`,x2:`360`,y2:`212`},null,-1),g[23]||=i(`text`,{class:`dl-dg-small`,x:`378`,y:`16`},`wall two — no parallelism`,-1),g[24]||=i(`rect`,{class:`dl-dg-box`,x:`378`,y:`120`,width:`42`,height:`34`,rx:`4`},null,-1),g[25]||=i(`rect`,{class:`dl-dg-box`,x:`436`,y:`120`,width:`42`,height:`34`,rx:`4`},null,-1),g[26]||=i(`rect`,{class:`dl-dg-box`,x:`494`,y:`120`,width:`42`,height:`34`,rx:`4`},null,-1),g[27]||=i(`rect`,{class:`dl-dg-box`,x:`552`,y:`120`,width:`42`,height:`34`,rx:`4`},null,-1),g[28]||=i(`rect`,{class:`dl-dg-box`,x:`610`,y:`120`,width:`54`,height:`34`,rx:`4`},null,-1),g[29]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`399`,y:`142`,"text-anchor":`middle`},`h₁`,-1),g[30]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`457`,y:`142`,"text-anchor":`middle`},`h₂`,-1),g[31]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`515`,y:`142`,"text-anchor":`middle`},`h₃`,-1),g[32]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`573`,y:`142`,"text-anchor":`middle`},`…`,-1),g[33]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`637`,y:`142`,"text-anchor":`middle`},`h₂₀₀`,-1),g[34]||=i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-walls-head)`,d:`M420 137 H434`},null,-1),g[35]||=i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-walls-head)`,d:`M478 137 H492`},null,-1),g[36]||=i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-walls-head)`,d:`M536 137 H550`},null,-1),g[37]||=i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l6s0-walls-head)`,d:`M594 137 H608`},null,-1),g[38]||=i(`text`,{class:`dl-dg-small`,x:`378`,y:`182`},`200 tokens = 200 steps in a row`,-1),e((l(),o(`g`,null,[...g[1]||=[i(`rect`,{class:`dl-dg-box is-bad`,x:`370`,y:`110`,width:`302`,height:`54`,rx:`6`},null,-1),i(`text`,{class:`dl-dg-small is-bad`,x:`378`,y:`208`},`attention on top leaves this chain in place`,-1)]])),[[_]])]))]),e((l(),o(`div`,h,[...g[39]||=[i(`p`,null,`Two walls, one fix. This lecture removes the chain itself.`,-1)]])),[[_]])]),_:1},16)}}};export{g as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/404-Dkk3G2sr.js b/lecture-06/class/assets/slidev/404-Dkk3G2sr.js new file mode 100644 index 0000000000000000000000000000000000000000..fbf775200240f5f07df95187fbbd5fa1d93a2895 --- /dev/null +++ b/lecture-06/class/assets/slidev/404-Dkk3G2sr.js @@ -0,0 +1 @@ +import{Q as e,U as t,_ as n,_t as r,b as i,g as a,v as o,w as s,x as c,xt as l,y as u,z as d}from"../modules/shiki-BFOesOFp.js";import{t as f}from"../useNav-D8SbgLr9.js";import{t as p}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{V as m}from"../modules/vue-Ymwlffw_.js";var h={class:`grid justify-center text-center pt-15% gap-5`},g={class:`text-2xl`},_={class:`op-60`},v={class:`mt-3 flex flex-col gap-2 max-w-xs mx-auto w-full`},y=p(s({__name:`404`,setup(s){let p=/\d+/,{currentRoute:y}=m(),{total:b}=f(),x=a(()=>{let e=y.value.path.match(p);if(e){let t=+e[0];if(t>0&&t<=b.value)return t}return null});return(a,s)=>{let f=t(`RouterLink`);return d(),i(`div`,h,[n(`div`,null,[s[2]||=n(`h1`,{class:`text-9xl font-light`},` 404 `,-1),n(`p`,g,[s[0]||=c(` Page `,-1),n(`code`,_,l(r(y).path),1),s[1]||=c(` not found `,-1)])]),n(`div`,v,[x.value===1?u(`v-if`,!0):(d(),o(f,{key:0,to:`/`,class:`page-link`},{default:e(()=>[...s[3]||=[c(` Go Home `,-1)]]),_:1})),x.value?(d(),o(f,{key:1,to:`/${x.value}`,class:`page-link`},{default:e(()=>[c(` Go to Slide `+l(x.value),1)]),_:1},8,[`to`])):u(`v-if`,!0)])])}}}),[[`__scopeId`,`data-v-b584852f`]]);export{y as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/CodeBlockWrapper-gsL5r1Ig.js b/lecture-06/class/assets/slidev/CodeBlockWrapper-gsL5r1Ig.js new file mode 100644 index 0000000000000000000000000000000000000000..017460092c79961402399190690b0ad91ae38e10 --- /dev/null +++ b/lecture-06/class/assets/slidev/CodeBlockWrapper-gsL5r1Ig.js @@ -0,0 +1 @@ +import{H as e,L as t,R as n,S as r,X as i,_ as a,_t as o,b as s,bt as c,g as l,k as u,lt as d,v as f,vt as p,w as m,xt as h,y as g,z as _}from"../modules/shiki-BFOesOFp.js";import{tt as v}from"../useNav-D8SbgLr9.js";import{u as y}from"../modules/vue-Ymwlffw_.js";import{a as b,l as x,n as S}from"./context-DrkI8qiD.js";import{d as C,u as w}from"../index-DvHcJSI0.js";import{a as T,i as E}from"../modules/unplugin-icons-BIrNarL0.js";var D=m({__name:`TitleIcon`,props:{title:{}},setup(e){let t={pnpm:`i-vscode-icons:file-type-light-pnpm`,npm:`i-vscode-icons:file-type-npm`,yarn:`i-vscode-icons:file-type-yarn`,bun:`i-vscode-icons:file-type-bun`,deno:`i-vscode-icons:file-type-deno`,vue:`i-vscode-icons:file-type-vue`,svelte:`i-vscode-icons:file-type-svelte`,angular:`i-vscode-icons:file-type-angular`,react:`i-vscode-icons:file-type-reactjs`,next:`i-vscode-icons:file-type-light-next`,nuxt:`i-vscode-icons:file-type-nuxt`,solid:`logos:solidjs-icon`,astro:`i-vscode-icons:file-type-light-astro`,rollup:`i-vscode-icons:file-type-rollup`,webpack:`i-vscode-icons:file-type-webpack`,vite:`i-vscode-icons:file-type-vite`,esbuild:`i-vscode-icons:file-type-esbuild`,"package.json":`i-vscode-icons:file-type-node`,"tsconfig.json":`i-vscode-icons:file-type-tsconfig`,".npmrc":`i-vscode-icons:file-type-npm`,".editorconfig":`i-vscode-icons:file-type-editorconfig`,".eslintrc":`i-vscode-icons:file-type-eslint`,".eslintignore":`i-vscode-icons:file-type-eslint`,"eslint.config":`i-vscode-icons:file-type-eslint`,".gitignore":`i-vscode-icons:file-type-git`,".gitattributes":`i-vscode-icons:file-type-git`,".env":`i-vscode-icons:file-type-dotenv`,".env.example":`i-vscode-icons:file-type-dotenv`,".vscode":`i-vscode-icons:file-type-vscode`,"tailwind.config":`vscode-icons:file-type-tailwind`,"uno.config":`i-vscode-icons:file-type-unocss`,"unocss.config":`i-vscode-icons:file-type-unocss`,".oxlintrc":`i-vscode-icons:file-type-oxlint`,"vue.config":`i-vscode-icons:file-type-vueconfig`,".mts":`i-vscode-icons:file-type-typescript`,".cts":`i-vscode-icons:file-type-typescript`,".ts":`i-vscode-icons:file-type-typescript`,".tsx":`i-vscode-icons:file-type-typescript`,".mjs":`i-vscode-icons:file-type-js`,".cjs":`i-vscode-icons:file-type-js`,".json":`i-vscode-icons:file-type-json`,".js":`i-vscode-icons:file-type-js`,".jsx":`i-vscode-icons:file-type-js`,".md":`i-vscode-icons:file-type-markdown`,".py":`i-vscode-icons:file-type-python`,".ico":`i-vscode-icons:file-type-favicon`,".html":`i-vscode-icons:file-type-html`,".css":`i-vscode-icons:file-type-css`,".scss":`i-vscode-icons:file-type-scss`,".yml":`i-vscode-icons:file-type-light-yaml`,".yaml":`i-vscode-icons:file-type-light-yaml`,".php":`i-vscode-icons:file-type-php`,".svg":`i-vscode-icons:file-type-svg`};function n(e){let n=e.match(/~([^~]+)~/g);if(n&&n.length>0)return n[0].slice(1,-1);let r=Object.keys(t).sort((e,t)=>t.length-e.length);for(let n of r)if(e.toLowerCase().includes(n.toLowerCase()))return t[n];return``}return(t,r)=>n(e.title)?(_(),s(`div`,{key:0,class:p([`w-3.5 h-3.5 relative`,n(e.title)])},null,2)):g(`v-if`,!0)}}),O=[`data-title`],k={key:0,class:`slidev-code-block-title`},A={class:`leading-1em`},j=[`title`],M=m({__name:`CodeBlockWrapper`,props:{ranges:{type:Array,default:()=>[]},finally:{type:[String,Number],default:`last`},startLine:{type:Number,default:1},lines:{type:Boolean,default:v.lineNumbers},at:{type:[String,Number],default:`+1`},maxHeight:{type:String,default:void 0},title:{type:String,default:``}},setup(m){let M=m,{$frontmatter:N,$clicksContext:P}=S(),F=l(()=>N?.codeCopy??v.codeCopy),I=d(),L=w();n(()=>{P.unregister(L)}),i(()=>{I.value?.classList.toggle(`slidev-code-line-numbers`,M.lines)}),t(()=>{if(!P||!M.ranges?.length)return;let e=P.calculateSince(M.at,M.ranges.length-1);P.register(L,e);let t=l(()=>e?Math.max(0,P.current-e.start+1):x),n=l(()=>M.finally===`last`?M.ranges.at(-1):M.finally.toString());i(()=>{if(!I.value)return;let e=M.ranges[t.value]??n.value,r=e===`hide`;I.value.classList.toggle(b,r),r&&(e=M.ranges[t.value+1]??n.value);let i=I.value.querySelector(`.shiki`),a=Array.from(i.querySelectorAll(`code > .line`)),o=a.length;if(C(e,o,M.startLine,e=>[a[e]]),M.maxHeight){let e=Array.from(i.querySelectorAll(`.line.highlighted`));e.reduce((e,t)=>t.offsetHeight+e,0)>I.value.offsetHeight?e[0].scrollIntoView({behavior:`smooth`,block:`start`}):e.length>0&&e[Math.round((e.length-1)/2)].scrollIntoView({behavior:`smooth`,block:`center`})}})});let{copied:R,copy:z}=y();function B(){let e=I.value?.querySelector(`.slidev-code`)?.textContent;e&&z(e)}let V=u(`activeTitle`,null),H=l(()=>V===null&&M.title);return(t,n)=>{let i=E,l=T;return _(),s(`div`,{ref_key:`el`,ref:I,class:p([`slidev-code-wrapper relative group`,{"slidev-code-line-numbers":M.lines,active:o(V)===m.title}]),style:c({"max-height":M.maxHeight,"overflow-y":M.maxHeight?`scroll`:void 0,"--start":M.startLine}),"data-title":m.title},[H.value?(_(),s(`div`,k,[r(D,{title:m.title},null,8,[`title`]),a(`div`,A,h(m.title.replace(/~([^~]+)~/g,``).trim()),1)])):g(`v-if`,!0),e(t.$slots,`default`),F.value?(_(),s(`button`,{key:1,class:p([`slidev-code-copy absolute right-0 transition opacity-0 group-hover:opacity-20 hover:!opacity-100`,H.value?`top-10`:`top-0`]),title:o(R)?`Copied`:`Copy`,onClick:n[0]||=e=>B()},[o(R)?(_(),f(i,{key:0,class:`p-2 w-8 h-8`})):(_(),f(l,{key:1,class:`p-2 w-8 h-8`}))],10,j)):g(`v-if`,!0)],14,O)}}});export{M as t}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/DrawingControls-cUpksemn.js b/lecture-06/class/assets/slidev/DrawingControls-cUpksemn.js new file mode 100644 index 0000000000000000000000000000000000000000..ca9efdf2784d6c88523d60dfa9bacf9a80d1754a --- /dev/null +++ b/lecture-06/class/assets/slidev/DrawingControls-cUpksemn.js @@ -0,0 +1 @@ +import{n as e}from"../rolldown-runtime-hePW80VL.js";import{$ as t,H as n,Q as r,S as i,V as a,_ as o,_t as s,b as c,bt as l,l as u,lt as d,m as f,r as p,u as m,v as h,vt as g,w as _,xt as v,y,z as b}from"../modules/shiki-BFOesOFp.js";import{d as x,g as S}from"../modules/vue-Ymwlffw_.js";import{t as C}from"../useDrawings-BkbsP5qo.js";import{t as w}from"./IconButton-B5keGFol.js";import{t as T}from"./VerticalDivider-D_ScNBWw.js";var E=_({__name:`Draggable`,props:{storageKey:{},initial:{}},setup(e){let t=e,r=d(null),i=t.initial??{x:0,y:0},a=t.storageKey?S(t.storageKey,i):d(i),{style:o}=x(r,{initialValue:a});return(e,t)=>(b(),c(`div`,{ref_key:`el`,ref:r,class:`fixed`,style:l(s(o))},[n(e.$slots,`default`)],4))}}),D={class:`flex bg-main p-2`},O={class:`inline-block w-7 text-center`},k={class:`pt-.5`},A={class:`i-carbon:pin-filled transform -rotate-45`},j={class:`i-carbon:pin`},M={class:`i-carbon:error`},N={class:`i-carbon:close-outline`},P=_({__name:`DrawingControls`,setup(e){let{brush:n,canClear:_,canRedo:x,canUndo:S,clear:P,drauu:F,drawingEnabled:I,drawingMode:L,drawingPinned:R,brushColors:z}=C(),B=d(!1);function V(e){e.preventDefault(),e.stopPropagation(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{B.value=!0})})}function H(e){e.pointerType!==`mouse`&&V(e)}function U(){F.undo()}function W(){F.redo()}let G=`stylus`;function K(e){L.value=e,I.value=!0,e!==`eraseLine`&&(G=e)}function q(e){n.value.color=e,I.value=!0,L.value=G}return(e,d)=>s(I)||s(R)?(b(),h(E,{key:0,class:g([`flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200 z-nav border border-main`,!s(I)&&s(R)?`opacity-40 hover:opacity-90`:``]),"storage-key":`slidev-drawing-pos`,"initial-x":10,"initial-y":10},{default:r(()=>[i(w,{title:`Draw with stylus`,class:g({shallow:s(L)!==`stylus`}),onClick:d[0]||=e=>K(`stylus`)},{default:r(()=>[...d[14]||=[o(`div`,{class:`i-carbon:pen`},null,-1)]]),_:1},8,[`class`]),i(w,{title:`Draw a line`,class:g({shallow:s(L)!==`line`}),onClick:d[1]||=e=>K(`line`)},{default:r(()=>[...d[15]||=[o(`svg`,{width:`1em`,height:`1em`,class:`-mt-0.5`,preserveAspectRatio:`xMidYMid meet`,viewBox:`0 0 24 24`},[o(`path`,{d:`M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z`,fill:`currentColor`})],-1)]]),_:1},8,[`class`]),i(w,{title:`Draw an arrow`,class:g({shallow:s(L)!==`arrow`}),onClick:d[2]||=e=>K(`arrow`)},{default:r(()=>[...d[16]||=[o(`div`,{class:`i-carbon:arrow-up-right`},null,-1)]]),_:1},8,[`class`]),i(w,{title:`Draw an ellipse`,class:g({shallow:s(L)!==`ellipse`}),onClick:d[3]||=e=>K(`ellipse`)},{default:r(()=>[...d[17]||=[o(`div`,{class:`i-carbon:radio-button`},null,-1)]]),_:1},8,[`class`]),i(w,{title:`Draw a rectangle`,class:g({shallow:s(L)!==`rectangle`}),onClick:d[4]||=e=>K(`rectangle`)},{default:r(()=>[...d[18]||=[o(`div`,{class:`i-carbon:checkbox`},null,-1)]]),_:1},8,[`class`]),i(w,{title:`Erase`,class:g({shallow:s(L)!==`eraseLine`}),onClick:d[5]||=e=>K(`eraseLine`)},{default:r(()=>[...d[19]||=[o(`div`,{class:`i-carbon:erase`},null,-1)]]),_:1},8,[`class`]),i(T),i(s(p),{shown:B.value,"onUpdate:shown":d[8]||=e=>B.value=e,triggers:[]},{popper:r(()=>[o(`div`,D,[o(`div`,O,v(s(n).size),1),o(`div`,k,[t(o(`input`,{"onUpdate:modelValue":d[6]||=e=>s(n).size=e,type:`range`,min:`1`,max:`15`,onChange:d[7]||=e=>L.value=s(G)},null,544),[[u,s(n).size]])])])]),default:r(()=>[i(w,{title:`Adjust stroke width`,class:g({shallow:s(L)===`eraseLine`}),onClick:V,onPointerdown:H,onPointerup:H,onTouchend:V},{default:r(()=>[...d[20]||=[o(`svg`,{viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`},[o(`line`,{x1:`2`,y1:`15`,x2:`22`,y2:`4`,stroke:`currentColor`,"stroke-width":`1`,"stroke-linecap":`round`}),o(`line`,{x1:`2`,y1:`24`,x2:`28`,y2:`10`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`}),o(`line`,{x1:`7`,y1:`31`,x2:`29`,y2:`19`,stroke:`currentColor`,"stroke-width":`3`,"stroke-linecap":`round`})],-1)]]),_:1},8,[`class`])]),_:1},8,[`shown`]),(b(!0),c(f,null,a(s(z),e=>(b(),h(w,{key:e,title:`Set brush color`,class:g(s(n).color===e&&s(L)!==`eraseLine`?`active`:`shallow`),onClick:t=>q(e)},{default:r(()=>[o(`div`,{class:g([`w-6 h-6 transition-all transform border`,s(n).color===e?`rounded-md border-gray-300/50`:`rounded-1/2 scale-85 border-white`]),style:l(s(I)?{background:e}:{borderColor:e})},null,6)]),_:2},1032,[`class`,`onClick`]))),128)),i(T),i(w,{title:`Undo`,class:g({disabled:!s(S)}),onClick:d[9]||=e=>U()},{default:r(()=>[...d[21]||=[o(`div`,{class:`i-carbon:undo`},null,-1)]]),_:1},8,[`class`]),i(w,{title:`Redo`,class:g({disabled:!s(x)}),onClick:d[10]||=e=>W()},{default:r(()=>[...d[22]||=[o(`div`,{class:`i-carbon:redo`},null,-1)]]),_:1},8,[`class`]),i(w,{title:`Delete`,class:g({disabled:!s(_)}),onClick:d[11]||=e=>s(P)()},{default:r(()=>[...d[23]||=[o(`div`,{class:`i-carbon:trash-can`},null,-1)]]),_:1},8,[`class`]),i(T),i(w,{title:s(R)?`Unpin drawing`:`Pin drawing`,class:g({shallow:!s(R)}),onClick:d[12]||=e=>R.value=!s(R)},{default:r(()=>[t(o(`div`,A,null,512),[[m,s(R)]]),t(o(`div`,j,null,512),[[m,!s(R)]])]),_:1},8,[`title`,`class`]),s(I)?(b(),h(w,{key:0,title:s(R)?`Drawing pinned`:`Drawing unpinned`,class:g({shallow:!s(I)}),onClick:d[13]||=e=>I.value=!s(I)},{default:r(()=>[t(o(`div`,M,null,512),[[m,s(R)]]),t(o(`div`,N,null,512),[[m,!s(R)]])]),_:1},8,[`title`,`class`])):y(`v-if`,!0)]),_:1},8,[`class`])):y(`v-if`,!0)}}),F=e({default:()=>I}),I=P;export{F as n,I as t}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/DrawingLayer-BLLWTnj4.js b/lecture-06/class/assets/slidev/DrawingLayer-BLLWTnj4.js new file mode 100644 index 0000000000000000000000000000000000000000..88034d3af5ede5b7855e4444a72d95586c2258b6 --- /dev/null +++ b/lecture-06/class/assets/slidev/DrawingLayer-BLLWTnj4.js @@ -0,0 +1 @@ +import{F as e,L as t,Y as n,_t as r,b as i,lt as a,vt as o,w as s,z as c}from"../modules/shiki-BFOesOFp.js";import{n as l}from"./context-DrkI8qiD.js";import{t as u}from"../useDrawings-BkbsP5qo.js";var d=s({__name:`DrawingLayer`,setup(s){let{drauu:d,drawingEnabled:f,loadCanvas:p}=u(),m=l().$scale,h=a();return t(()=>{d.mount(h.value,h.value.parentElement),n(m,e=>d.options.coordinateScale=1/e,{immediate:!0}),p()}),e(()=>{d.unmount()}),(e,t)=>(c(),i(`svg`,{ref_key:`svg`,ref:h,class:o([`w-full h-full absolute top-0`,{"pointer-events-none":!r(f),"touch-none":r(f)}])},null,2))}});export{d as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/KaTexBlockWrapper-BIlBldVC.js b/lecture-06/class/assets/slidev/KaTexBlockWrapper-BIlBldVC.js new file mode 100644 index 0000000000000000000000000000000000000000..8ef32b6b80ea63900be58b5b91afa667cd731377 --- /dev/null +++ b/lecture-06/class/assets/slidev/KaTexBlockWrapper-BIlBldVC.js @@ -0,0 +1 @@ +import{H as e,L as t,R as n,X as r,b as i,g as a,lt as o,w as s,z as c}from"../modules/shiki-BFOesOFp.js";import{H as l}from"../useNav-D8SbgLr9.js";import{a as u,c as d,l as f,n as p}from"./context-DrkI8qiD.js";import{u as m}from"../index-DvHcJSI0.js";var h=`.mtable > [class*=col-align]`,g=`:scope > .vlist-t > .vlist-r > .vlist > span > .mord`;function _(e){let t=Array.from(e.querySelectorAll(h)).filter(e=>!e.parentElement?.closest(h)),n=[];for(let e of t)Array.from(e.querySelectorAll(g)).forEach((e,t)=>{e&&(Array.isArray(n[t])?n[t].push(e):n[t]=[e])});return n}var v=s({__name:`KaTexBlockWrapper`,props:{ranges:{type:Array,default:()=>[]},finally:{type:[String,Number],default:`last`},startLine:{type:Number,default:1},at:{type:[String,Number],default:`+1`}},setup(s){let h=s,{$clicksContext:g}=p(),v=o(),y=m();return n(()=>{g.unregister(y)}),t(()=>{if(!g||!h.ranges?.length)return;let e=g.calculateSince(h.at,h.ranges.length-1);g.register(y,e);let t=a(()=>e?Math.max(0,g.current-e.start+1):f),n=a(()=>h.finally===`last`?h.ranges.at(-1):h.finally.toString());r(()=>{if(!v.value)return;let e=h.ranges[t.value]??n.value,r=e===`hide`;v.value.classList.toggle(u,r),r&&(e=h.ranges[t.value+1]??n.value);let i=_(v.value);if(!i.length)return;let a=h.startLine,o=l(i.length+a-1,e);i.forEach((e,t)=>{let n=o.includes(t+a);e.forEach(e=>{e.classList.toggle(d,!0),e.classList.toggle(`highlighted`,n),e.classList.toggle(`dishonored`,!n)})})})}),(t,n)=>(c(),i(`div`,{ref_key:`el`,ref:v,class:`slidev-katex-wrapper`},[e(t.$slots,`default`)],512))}});export{v as t}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/NoteDisplay-6LSM8xpP.js b/lecture-06/class/assets/slidev/NoteDisplay-6LSM8xpP.js new file mode 100644 index 0000000000000000000000000000000000000000..fb8432a80b3b3f7b01ebb90c6c8b712ca2c6e0b0 --- /dev/null +++ b/lecture-06/class/assets/slidev/NoteDisplay-6LSM8xpP.js @@ -0,0 +1 @@ +import{L as e,N as t,V as n,X as r,Y as i,_ as a,_t as o,b as s,bt as c,g as l,it as u,lt as d,m as f,vt as p,w as m,xt as h,y as g,z as _}from"../modules/shiki-BFOesOFp.js";import{nt as v,rt as y}from"../useNav-D8SbgLr9.js";import{l as b}from"./context-DrkI8qiD.js";var x=[`title`],S={key:0,"flex-auto":``},C={"text-primary":``},w={op50:``,"text-sm":``},T={key:0,absolute:``,"inset-y-0":``,"right-0":``,"w-0.5":``,"bg-primary":``,"z-1":``},E=m({__name:`ClicksSlider`,props:{clicksContext:{},readonly:{type:Boolean},active:{type:Boolean,default:!0},resettable:{type:Boolean},compact:{type:Boolean},attached:{type:Boolean}},emits:[`activate`,`reset`],setup(e,{emit:t}){let r=e,i=t,m=l(()=>r.clicksContext.total),E=l(()=>v(0,r.clicksContext.clicksStart,m.value)),D=l(()=>m.value-E.value+1),O=l({get(){return r.resettable&&!r.active||r.clicksContext.current>m.value?-1:r.clicksContext.current},set(e){if(r.resettable&&e<0){i(`reset`),r.clicksContext.current=b;return}i(`activate`),r.clicksContext.current=e}}),k=l(()=>r.resettable&&O.value<0),A=l(()=>y(E.value,m.value+1)),j=d(),M;function N(e){let t=j.value.getBoundingClientRect();return(e.clientX-t.left)/Math.max(1,t.width)}function P(e,t){if(r.readonly||!j.value||!t&&!(e.buttons&1))return;let n=N(e);if(r.resettable&&n<0){O.value=-1;return}let i=v(0,n,t?.999999:1)*D.value,a=v(0,O.value-E.value,D.value-1),o=t?E.value+Math.floor(i):O.value;!t&&i>=a+1.5?o=E.value+Math.floor(i-.5):!t&&i(_(),s(`div`,{class:p([`flex gap-1 select-none`,[e.attached?`items-end`:`items-center`,D.value&&r.clicksContext.isMounted?``:`op50`]]),title:`Clicks in this slide: ${D.value}`},[a(`div`,{class:p([`flex items-center font-mono`,[e.compact?`gap-1 min-w-0 mr0`:`gap-0.2 min-w-16 mr1`,e.attached?`h-[22px]`:``]])},[a(`div`,{class:p([`i-carbon:cursor-1 text-sm op50`,e.compact?`ml-1`:``])},null,2),O.value>=0&&O.value!==o(999999)&&e.active?(_(),s(f,{key:0},[e.compact?g(`v-if`,!0):(_(),s(`div`,S)),a(`span`,null,[a(`span`,C,h(O.value),1),i[2]||=a(`span`,{op25:``,"text-sm":``},`/`,-1),a(`span`,w,h(m.value),1)])],64)):(_(),s(`div`,{key:1,op50:``,class:p(e.compact?``:`flex-auto pl1`)},[a(`span`,{class:p(e.compact?`inline-block text-center`:``),style:c(e.compact?{width:`${String(m.value).length*2+1}ch`,marginLeft:`-0.25ch`}:void 0)},h(m.value),7)],2))],2),a(`div`,{ref_key:`sliderEl`,ref:j,relative:``,"flex-auto":``,"font-mono":``,flex:`~`,"touch-none":``,class:p([e.attached?`h-[22px]`:`h5`,k.value?`op80`:``]),onPointerdownCapture:F,onPointermove:I,onPointerup:i[0]||=e=>u(M)?M.value=void 0:M=void 0,onPointercancel:i[1]||=e=>u(M)?M.value=void 0:M=void 0},[(_(!0),s(f,null,n(A.value,t=>(_(),s(`div`,{key:t,border:`y main`,"of-hidden":``,relative:``,class:p([t===0?`border-l`:``,t===0?e.attached?`rounded-tl`:`rounded-l`:``,t===m.value?`border-r`:``,t===m.value&&+t!=+O.value?e.attached?`rounded-tr`:`rounded-r`:``,e.attached?`border-b-0`:``]),style:c({width:D.value>0?`${1/D.value*100}%`:`100%`})},[a(`div`,{absolute:``,"inset-0":``,class:p(t<=O.value&&e.active?`bg-primary op15`:``)},null,2),+t==+O.value&&e.active?(_(),s(`div`,T)):g(`v-if`,!0),a(`div`,{class:p([+t==+O.value&&e.active?`text-primary font-bold op100`:`op30`,t===m.value?``:`border-r-2 border-main`]),"w-full":``,"h-full":``,"text-xs":``,flex:``,"items-center":``,"justify-center":``,"z-1":``},h(t),3)],6))),128))],34)],10,x))}}),D=[`innerHTML`],O=[`textContent`],k=[`textContent`],A=`slidev-note-fade`,j=`slidev-note-click-mark`,M=m({__name:`NoteDisplay`,props:{class:{},noteHtml:{},note:{},highlight:{type:Boolean,default:!0},placeholder:{},clicksContext:{},autoScroll:{type:Boolean}},emits:[`markerDblclick`,`markerClick`],setup(n,{emit:o}){let c=n,u=o,f=l(()=>c.clicksContext!=null&&c.noteHtml?.includes(j)),m=d(null);function g(){if(!m.value||!f.value)return;let e=Array.from(m.value.querySelectorAll(`.${j}`)),t=new Map,n=new Map,r=0;for(let i of e){let e=Number(i.dataset.clicks);t.set(i,e);let a=i,o=i.parentElement;for(;o&&a!==m.value;)n.has(o)||n.set(o,[[null,r]]),n.get(o).push([a,e]),a=o,o=o.parentElement;r=e}let i=new Map;for(let[e,t]of n){let n=!1,r=0;for(let a of Array.from(e.childNodes)){let o=!1;for(;a===t[r+1]?.[0];)o=!0,r++;if(o)continue;let s=a;if(a.nodeType===3){if(!a.textContent?.trim())continue;s=document.createElement(`span`),s.textContent=a.textContent,e.insertBefore(s,a),a.remove()}n||=r===0,i.set(s,t[r][1])}n||(t[0][1]=-1)}return e=>{let r=c.highlight;for(let[t,i]of n)t.classList.toggle(A,r&&!i.some(([t,n])=>n===e));for(let[t,n]of i)t.classList.toggle(A,r&&n!==e);for(let[n,i]of t)n.classList.remove(A),n.classList.toggle(`${j}-past`,r&&ie+1),n.ondblclick=e=>{r&&(u(`markerDblclick`,e,i),!e.defaultPrevented&&(c.clicksContext.current=i,e.stopPropagation(),e.stopImmediatePropagation()))},n.onclick=e=>{r&&u(`markerClick`,e,i)},r&&c.autoScroll&&i===e&&n.scrollIntoView({block:`center`,behavior:`smooth`})}}let v=d();return i(()=>[c.noteHtml,c.highlight],()=>{t(()=>{v.value=g()})},{immediate:!0}),e(()=>{g()}),r(()=>{let e=c.clicksContext?.current??999999;v.value?.(e)}),(e,t)=>n.noteHtml?(_(),s(`div`,{key:0,ref_key:`noteDisplay`,ref:m,class:p([`prose dark:prose-invert overflow-auto outline-none slidev-note`,[c.class,f.value?`slidev-note-with-clicks`:``]]),innerHTML:n.noteHtml},null,10,D)):n.note?(_(),s(`div`,{key:1,class:p([`prose dark:prose-invert overflow-auto outline-none slidev-note`,c.class])},[a(`p`,{textContent:h(n.note)},null,8,O)],2)):(_(),s(`div`,{key:2,class:p([`prose dark:prose-invert overflow-auto outline-none opacity-50 italic select-none slidev-note`,c.class])},[a(`p`,{textContent:h(c.placeholder||`No notes.`)},null,8,k)],2))}});export{E as n,M as t}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/NoteEditable-DTwQcEqa.js b/lecture-06/class/assets/slidev/NoteEditable-DTwQcEqa.js new file mode 100644 index 0000000000000000000000000000000000000000..21102ff651dfaea708fe2aa63996febd8713b254 --- /dev/null +++ b/lecture-06/class/assets/slidev/NoteEditable-DTwQcEqa.js @@ -0,0 +1 @@ +import{$ as e,N as t,X as n,Y as r,_t as i,b as a,bt as o,d as s,l as c,lt as l,mt as u,v as d,vt as f,w as p,z as m}from"../modules/shiki-BFOesOFp.js";import{C as h,k as g,o as _}from"../modules/vue-Ymwlffw_.js";import{t as v}from"../index-DvHcJSI0.js";import{t as y}from"./NoteDisplay-6LSM8xpP.js";var b=[`placeholder`],x=p({__name:`NoteEditable`,props:{no:{type:Number,required:!0},class:{default:``},editing:{default:!1},style:{default:()=>({})},placeholder:{default:`No notes for this slide`},clicksContext:{type:Object},highlight:{default:!0},autoHeight:{default:!1}},emits:[`update:editing`,`markerDblclick`,`markerClick`],setup(p,{emit:x}){let S=p,C=x,w=h(S,`editing`,C,{passive:!0}),{info:T,update:E}=v(u(S,`no`)),D=l(``),O,{ignoreUpdates:k}=g(D,e=>{if(!w.value)return;let t=S.no;clearTimeout(O),O=setTimeout(()=>{E({note:e},t)},500)});r(()=>T.value?.note,(e=``)=>{w.value||(clearTimeout(O),k(()=>{D.value=e}))},{immediate:!0,flush:`sync`});let A=l(),j=l();n(()=>{w.value&&A.value?.focus()}),_(A,()=>{w.value=!1});function M(){!S.autoHeight||!A.value||!w.value||A.value.scrollHeight>A.value.clientHeight&&(A.value.style.height=`${A.value.scrollHeight}px`)}function N(e){w.value&&e.metaKey&&e.key===`s`&&(e.preventDefault(),E({note:D.value},S.no))}return r([D,w],()=>{t(()=>{M()})},{flush:`post`,immediate:!0}),(t,n)=>i(w)?e((m(),a(`textarea`,{key:1,ref_key:`inputEl`,ref:A,"onUpdate:modelValue":n[2]||=e=>D.value=e,class:f([`prose dark:prose-invert resize-none overflow-auto outline-none bg-transparent block border-primary border-2 slidev-note placeholder:op25`,[S.class,D.value?``:`italic`]]),style:o([S.style,j.value==null?{}:{height:`${j.value}px`}]),placeholder:p.placeholder,onKeydown:[n[3]||=s(e=>w.value=!1,[`esc`]),N]},null,46,b)),[[c,D.value]]):(m(),d(y,{key:0,class:f([`border-transparent border-2`,[S.class,D.value?``:`opacity-25 italic select-none`]]),style:o(S.style),note:D.value||p.placeholder,"note-html":i(T)?.noteHTML,"clicks-context":p.clicksContext,"auto-scroll":!p.autoHeight,highlight:S.highlight,onMarkerClick:n[0]||=(e,t)=>C(`markerClick`,e,t),onMarkerDblclick:n[1]||=(e,t)=>C(`markerDblclick`,e,t)},null,8,[`class`,`style`,`note`,`note-html`,`clicks-context`,`auto-scroll`,`highlight`]))}});export{x as t}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/TimerBar-1xtsicrJ.js b/lecture-06/class/assets/slidev/TimerBar-1xtsicrJ.js new file mode 100644 index 0000000000000000000000000000000000000000..8bc2818ba5bfa5dfa622a89ebd96665171153b69 --- /dev/null +++ b/lecture-06/class/assets/slidev/TimerBar-1xtsicrJ.js @@ -0,0 +1 @@ +import{Q as e,S as t,V as n,_t as r,a as i,b as a,bt as o,g as s,m as c,mt as l,st as u,vt as d,w as f,y as p,z as m}from"../modules/shiki-BFOesOFp.js";import{U as h,t as g,tt as _}from"../useNav-D8SbgLr9.js";import{F as v}from"../modules/vue-Ymwlffw_.js";import{o as y}from"../index-DvHcJSI0.js";var b={class:`relative flex gap-px`},x=f({__name:`CurrentProgressBar`,props:{clicksContext:{},current:{}},setup(l){let u=l,f=g(),h=s(()=>u.clicksContext??f.clicksContext.value),_=s(()=>u.current??f.currentSlideNo.value),{total:v}=f;return(s,l)=>(m(),a(`div`,b,[(m(!0),a(c,null,n(r(v)-1,n=>(m(),a(`div`,{key:n,class:d([`border-x border-b border-main h-4px transition-all`,n<_.value?`bg-primary border-primary`:``]),style:o({width:`${1/(r(v)-1)*100}%`})},[t(i,{name:`fade`},{default:e(()=>[n===_.value?(m(),a(`div`,{key:0,class:`h-full bg-primary op75 transition-all`,style:o({width:`${h.value.total===0?0:h.value.current/(h.value.total+1)*100}%`})},null,4)):p(`v-if`,!0)]),_:2},1024)],6))),128))]))}});function S(){let e=s(()=>_.timer||`stopwatch`),t=s(()=>h(_.duration).seconds),n=v(100,{controls:!0}),r=l(y,`timer`),i=s(()=>r.value?.status),a=s(()=>(n.counter.value,r.value.status===`stopped`||!r.value.startedAt?0:r.value.status===`paused`?r.value.pausedAt-r.value.startedAt:Date.now()-r.value.startedAt)),o=s(()=>a.value/1e3),c=s(()=>o.value/t.value*100),u=s(()=>{if(e.value===`stopwatch`&&(r.value.status===`stopped`||!r.value.startedAt))return{h:``,m:`-`,s:`--`,ms:`-`};let n=e.value===`countdown`?t.value*1e3-a.value:a.value,i=Math.floor(n/1e3/60/60).toString();i===`0`&&(i=``);let o=Math.floor(n/1e3/60%60).toString();i&&(o=o.padStart(2,`0`));let s=Math.floor(n/1e3%60).toString().padStart(2,`0`),c=Math.floor(n%1e3/100).toString();return{h:i,m:o,s,ms:c}});function d(){n.pause(),r.value={status:`stopped`,slides:{},startedAt:0,pausedAt:0}}function f(){r.value&&(r.value?.status===`stopped`?(r.value.status=`running`,r.value.startedAt=Date.now()):r.value.status===`paused`&&(r.value.status=`running`,r.value.startedAt=Date.now()-(r.value.pausedAt-r.value.startedAt)),n.resume())}function p(){r.value.status=`paused`,r.value.pausedAt=Date.now(),n.pause()}function m(){r.value.status===`running`?p():f()}return{state:r,status:i,timer:u,reset:d,toggle:m,resume:f,pause:p,passed:o,percentage:c,duration:t,mode:e}}var C={class:`border-b mt-px border-main relative flex h-4px`},w=f({__name:`TimerBar`,setup(e){let t=u(S()),n=s(()=>t.status===`stopped`?`op50`:t.status===`paused`?`bg-blue`:t.percentage>100?`bg-red`:t.percentage>80?`bg-yellow`:`bg-green`);return(e,r)=>(m(),a(`div`,C,[t.status===`stopped`?p(`v-if`,!0):(m(),a(`div`,{key:0,class:d([`h-4px`,n.value]),style:o({width:`${t.percentage}%`})},null,6)),p(` {{ timesplits }} `)]))}});export{S as n,x as r,w as t}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/VClicks-Dmx1KjZv.js b/lecture-06/class/assets/slidev/VClicks-Dmx1KjZv.js new file mode 100644 index 0000000000000000000000000000000000000000..1e578114c98473a3e80258bc196d3a9e1671b156 --- /dev/null +++ b/lecture-06/class/assets/slidev/VClicks-Dmx1KjZv.js @@ -0,0 +1 @@ +import{$ as e,A as t,D as n,L as r,R as i,S as a,W as o,m as s,p as c,v as l,w as u,z as d}from"../modules/shiki-BFOesOFp.js";import{K as f,it as p}from"../useNav-D8SbgLr9.js";import{n as m}from"./context-DrkI8qiD.js";import{u as h}from"../index-DvHcJSI0.js";var g=u({__name:`VClickGap`,props:{size:{type:[String,Number],default:1}},setup(e){let t=e,{$clicksContext:n}=m(),a=h(),o=+t.size;return Number.isNaN(o)&&(console.warn(`[slidev] Invalid size for VClickGap: ${t.size}`),o=1),r(()=>{let e=n.currentOffset+o-1;n.register(a,{max:e,delta:o})}),i(()=>{n.unregister(a)}),(e,t)=>(d(),l(s))}}),_=[`ul`,`ol`],v=/[\s,]+/,y=u({props:{depth:{type:[Number,String],default:1},every:{type:[Number,String],default:1},at:{type:[Number,String],default:`+1`},hide:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},animation:{type:[String,Array],default:void 0},handleSpecialElements:{type:Boolean,default:!0}},render(){let r=+this.every,i=f(this.at),s=typeof i==`string`,l=this.$slots.default?.();if(i==null||!l)return l;let u=o(`click`),d=(t,n)=>{let r={hide:this.hide};return typeof this.animation==`string`?this.animation.split(v).forEach(e=>{e&&(r[e]=!0)}):Array.isArray(this.animation)&&this.animation.forEach(e=>r[e]=!0),this.fade&&(r.fade=!0),e(t,[[u,n,``,r]])},m=e=>e.flatMap(e=>t(e)&&typeof e.type==`symbol`&&Array.isArray(e.children)?m(e.children):[e]);l=m(p(l));let h=(e,r=1)=>m(e).map(e=>{if(!t(e))return e;if(_.includes(e.type)&&Array.isArray(e.children)){let t=x(e.children,r+1);return n(e,{},t)}return n(e)}),y=1,b=0,x=(e,a=1)=>m(e).map(e=>{if(!t(e)||e.type===c)return e;let o=+i+Math.ceil(y++/r)-1,l;l=a<+this.depth&&Array.isArray(e.children)?n(e,{},h(e.children,a)):n(e);let u=o-b;return b=o,d(l,s?u>=0?`+${u}`:`${u}`:o)}),S=()=>a(g,{size:+i+Math.ceil((y-1)/r)-1-b});if(this.handleSpecialElements){if(l.length===1&&_.includes(l[0].type)&&Array.isArray(l[0].children))return n(l[0],{},[...x(l[0].children),S()]);if(l.length===1&&l[0].type===`table`){let e=l[0];if(Array.isArray(e.children))return n(e,{},e.children.map(e=>t(e)?e.type===`tbody`&&Array.isArray(e.children)?n(e,{},[...x(e.children),S()]):n(e):e))}}return[...x(l),S()]}});export{y as t}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/client-CJjt9xn-.js b/lecture-06/class/assets/slidev/client-CJjt9xn-.js new file mode 100644 index 0000000000000000000000000000000000000000..223c98c6c1a3a29a6a3dee3ce82e775526f67688 --- /dev/null +++ b/lecture-06/class/assets/slidev/client-CJjt9xn-.js @@ -0,0 +1 @@ +import"../useNav-D8SbgLr9.js";import"./context-DrkI8qiD.js";import"../syncState-BrWO1mSt.js";import"../index-DvHcJSI0.js";import"../useDrawings-BkbsP5qo.js"; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/notes-DN2C0Uce.js b/lecture-06/class/assets/slidev/notes-DN2C0Uce.js new file mode 100644 index 0000000000000000000000000000000000000000..0ca67207ed2dd1601711e2c7efddb62ef5c05d68 --- /dev/null +++ b/lecture-06/class/assets/slidev/notes-DN2C0Uce.js @@ -0,0 +1 @@ +import{Q as e,S as t,Y as n,_ as r,_t as i,b as a,bt as o,g as s,lt as c,m as l,w as u,x as d,xt as f,z as p}from"../modules/shiki-BFOesOFp.js";import{$ as m,W as h,t as g,u as _}from"../useNav-D8SbgLr9.js";import{g as v}from"../modules/vue-Ymwlffw_.js";import{h as y,o as b}from"../index-DvHcJSI0.js";import{t as x}from"./IconButton-B5keGFol.js";import{t as S}from"./Modal-CjKJrPTu.js";import{n as C,t as w}from"./NoteDisplay-6LSM8xpP.js";import{r as T,t as E}from"./TimerBar-1xtsicrJ.js";var D={class:`flex my-1`},O={class:`h-full flex flex-col`},k={class:`flex-none border-t border-main`,px3:``,py2:``},A={class:`flex-none border-t border-main`},j={class:`flex gap-1 items-center px-6 py-3`},M={key:0,class:`i-carbon:minimize`},N={key:1,class:`i-carbon:maximize`},P={class:`px2 my-auto`},F={class:`text-lg`},I={class:`opacity-50 text-sm`},L=u({__name:`notes`,setup(u){y({title:`Notes - ${m}`});let{slides:L,total:R}=g(),{isFullscreen:z,toggle:B}=_,V=c(),H=v(`slidev-notes-font-size`,18),U=s(()=>b.page),W=c(!1),G=s(()=>L.value.find(e=>e.no===U.value));n(U,()=>{V.value?.scrollTo({left:0,top:0,behavior:`smooth`}),window.scrollTo({left:0,top:0,behavior:`smooth`})});function K(){H.value+=1}function q(){--H.value}let J=s(()=>{let e=b.clicks,t=b.clicksTotal;return h(c(e),void 0,t)});return(n,s)=>(p(),a(l,null,[t(S,{modelValue:W.value,"onUpdate:modelValue":s[1]||=e=>W.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:e(()=>[s[3]||=r(`div`,{class:`flex gap-2 text-xl`},[r(`div`,{class:`i-carbon:information my-auto`}),d(` Help `)],-1),s[4]||=r(`div`,{class:`prose dark:prose-invert`},[r(`p`,null,`This is the hands-free live notes viewer.`),r(`p`,null,`It's designed to be used in a separate view or device. The progress is controlled by and auto synced with the main presenter or slide.`)],-1),r(`div`,D,[r(`button`,{class:`slidev-form-button`,onClick:s[0]||=e=>W.value=!1},` Close `)])]),_:1},8,[`modelValue`]),r(`div`,O,[t(T,{"clicks-context":J.value,current:U.value},null,8,[`clicks-context`,`current`]),t(E),r(`div`,{ref_key:`scroller`,ref:V,class:`px-5 py-3 flex-auto h-full overflow-auto`,style:o({fontSize:`${i(H)}px`})},[t(w,{note:G.value?.meta.slide.note,"note-html":G.value?.meta.slide.noteHTML,placeholder:`No notes for Slide ${U.value}.`,"clicks-context":J.value,"auto-scroll":!0},null,8,[`note`,`note-html`,`placeholder`,`clicks-context`])],4),r(`div`,k,[t(C,{"clicks-context":J.value,readonly:``},null,8,[`clicks-context`])]),r(`div`,A,[r(`div`,j,[t(x,{title:i(z)?`Close fullscreen`:`Enter fullscreen`,onClick:i(B)},{default:e(()=>[i(z)?(p(),a(`div`,M)):(p(),a(`div`,N))]),_:1},8,[`title`,`onClick`]),t(x,{title:`Increase font size`,onClick:K},{default:e(()=>[...s[5]||=[r(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1}),t(x,{title:`Decrease font size`,onClick:q},{default:e(()=>[...s[6]||=[r(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1}),t(x,{title:`Edit notes`,to:`/notes-edit`,target:`_blank`},{default:e(()=>[...s[7]||=[r(`div`,{class:`i-carbon:edit`},null,-1)]]),_:1}),t(x,{title:`Help`,class:`rounded-full`,onClick:s[2]||=e=>W.value=!0},{default:e(()=>[...s[8]||=[r(`div`,{class:`i-carbon:help`},null,-1)]]),_:1}),s[9]||=r(`div`,{class:`flex-auto`},null,-1),r(`div`,P,[r(`span`,F,f(U.value),1),r(`span`,I,` / `+f(i(R)),1)])])])])],64))}});export{L as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/notes-edit-7rz7gno0.js b/lecture-06/class/assets/slidev/notes-edit-7rz7gno0.js new file mode 100644 index 0000000000000000000000000000000000000000..b726b4a8cfb9377ca010fd63920c1022ef44b618 --- /dev/null +++ b/lecture-06/class/assets/slidev/notes-edit-7rz7gno0.js @@ -0,0 +1,2 @@ +import{$ as e,Q as t,S as n,_ as r,b as i,l as a,lt as o,m as s,w as c,x as l,z as u}from"../modules/shiki-BFOesOFp.js";import{$ as d,t as f}from"../useNav-D8SbgLr9.js";import{O as p}from"../modules/vue-Ymwlffw_.js";import{h as m,t as h}from"../index-DvHcJSI0.js";import{t as g}from"./IconButton-B5keGFol.js";import{t as _}from"./Modal-CjKJrPTu.js";var v={class:`flex my-1`},y={class:`h-full`},b={class:`slidev-glass-effect fixed bottom-5 right-5 rounded-full border border-main`},x=c({__name:`notes-edit`,setup(c){let x=/^---\s*#(\d+)\s*$/;m({title:`Notes Edit - ${d}`});let{slides:S}=f(),C=o(!1),w=o(T(S.value));function T(e){let t=[];for(let n of e)n.meta.slide.note?.trim()&&(t.push(`--- #${n.no}`),t.push(``),t.push(n.meta.slide.note),t.push(``));return t.join(` +`)}function E(e,t){let n=e.split(/^(---\s*#\d+\s*)$/gm);n.forEach((e,r)=>{let i=e.match(x);if(i){let e=Number.parseInt(i[1]),a=n[r+1].trim(),o=t.find(t=>t.no===e);o&&(o.meta.slide.note=a,h(e).update({note:a}))}})}return p(w,e=>{E(e,S.value)},{debounce:300}),(o,c)=>(u(),i(s,null,[n(_,{modelValue:C.value,"onUpdate:modelValue":c[1]||=e=>C.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:t(()=>[c[4]||=r(`div`,{class:`flex gap-2 text-xl`},[r(`div`,{class:`i-carbon:information my-auto`}),l(` Help `)],-1),c[5]||=r(`div`,{class:`prose dark:prose-invert`},[r(`p`,null,`This is the batch notes editor. You can edit the notes for all the slides at once here.`),r(`p`,null,[l(`The note for each slide are separated by `),r(`code`,null,`--- #[no]`),l(` lines, you might want to keep them while editing.`)])],-1),r(`div`,v,[r(`button`,{class:`slidev-form-button`,onClick:c[0]||=e=>C.value=!1},` Close `)])]),_:1},8,[`modelValue`]),r(`div`,y,[r(`div`,b,[n(g,{title:`Help`,class:`rounded-full`,onClick:c[2]||=e=>C.value=!0},{default:t(()=>[...c[6]||=[r(`div`,{class:`i-carbon:help text-2xl`},null,-1)]]),_:1})]),e(r(`textarea`,{"onUpdate:modelValue":c[3]||=e=>w.value=e,class:`prose dark:prose-invert resize-none p5 outline-none bg-transparent block h-full w-full! max-w-full! max-h-full! min-h-full! min-w-full!`},null,512),[[a,w.value]])])],64))}});export{x as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/overview-CvZmPTvX.js b/lecture-06/class/assets/slidev/overview-CvZmPTvX.js new file mode 100644 index 0000000000000000000000000000000000000000..542d18700b4ae2c2e6af3ad7b84915132bc34725 --- /dev/null +++ b/lecture-06/class/assets/slidev/overview-CvZmPTvX.js @@ -0,0 +1 @@ +import{L as e,N as t,Q as n,R as r,S as i,V as a,_ as o,_t as s,b as c,bt as l,ft as u,g as d,lt as f,m as p,st as m,v as h,vt as g,w as ee,xt as _,y as v,z as y}from"../modules/shiki-BFOesOFp.js";import{$ as te,B as b,G as ne,R as x,X as re,Y as S,t as ie}from"../useNav-D8SbgLr9.js";import{t as C}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{B as ae,V as oe}from"../modules/vue-Ymwlffw_.js";import{l as w}from"./context-DrkI8qiD.js";import{f as se,h as ce,m as le,p as T}from"../index-DvHcJSI0.js";import{n as ue,r as de}from"../modules/unplugin-icons-BIrNarL0.js";import{t as E}from"./IconButton-B5keGFol.js";import{n as D}from"./NoteDisplay-6LSM8xpP.js";import{i as fe,o as pe,t as me}from"../SlideWrapper-LdbrkItj.js";import{t as he}from"./NoteEditable-DTwQcEqa.js";var ge={class:`h-screen w-screen of-hidden flex`},_e={key:0,class:`grid grid-rows-[auto_max-content] border-r border-main select-none max-h-full h-full`},ve={class:`relative`},ye={class:`absolute left-0 top-0 bottom-0 w-200 flex flex-col flex-auto items-end group p-6px md:p-10px gap-1 max-h-full of-x-visible of-y-auto`,style:{direction:`rtl`}},be=[`onClick`],xe={p2:``,border:`t main`},Se={class:`flex flex-col gap-1 mx-1 items-end`},Ce={key:0,class:`flex items-end gap-2`},we=[`onClick`],Te=[`onDblclick`],Ee={key:2,class:`select-none absolute bottom-0 right-0 bg-main rounded-tl p2 op35 text-xs`},De={key:1,class:`absolute z-2 top-0 right-0 px3 py1.5 border-b border-l rounded-lb bg-main/80 backdrop-blur border-main select-none`},Oe={class:`text-xs op50`},O=450,k=C(ee({__name:`overview`,setup(ee){ce({title:`Overview - ${te}`});let C=ae(),k=oe(),{openInEditor:ke,slides:A,isEmbedded:j}=ie(),M=d(()=>C.query.mode===`preview`),N=d(()=>M.value&&j.value),P=d(()=>M.value?N.value?Math.max(0,x.width.value-16):Math.min(900,Math.max(320,x.width.value-160)):O),Ae=d(()=>P.value/re.value),F=m(new Map),je=m(new Map),I=f([]),L=f(),R=f(null),z=0,B,V,H=d(()=>A.value.map(e=>Fe(e.meta?.slide?.note||``))),Me=d(()=>H.value.reduce((e,t)=>e+t,0)),Ne=d(()=>A.value.map(e=>K(e)).reduce((e,t)=>e+t,0)),Pe=d(()=>String(Math.max(1,A.value.length)).length),U=u(),W=new WeakMap;function G(e){return W.has(e)||W.set(e,ne(e,w)),W.get(e)}function K(e){return e.meta?.clicks||G(e)?.total}function q(e){U.value===e?U.value=void 0:U.value=e}function Fe(e){let t=e.match(/[\w`'\-\u0392-\u03C9\u00C0-\u00FF\u0600-\u06FF\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF]+/g),n=0;if(!t)return 0;for(let e=0;e=19968?n+=t[e].length:n+=1;return n}function J(){let e=window.innerHeight||document.documentElement.clientHeight,t,n=[];for(let[r,i]of F.entries()){let a=i.getBoundingClientRect(),o=Math.max(0,Math.min(a.bottom,e)-Math.max(a.top,0));o!==0&&(o>=a.height&&n.push(r),(!t||o>t.visibleHeight)&&(t={idx:r,visibleHeight:o}))}I.value=n.length?n:t?[t.idx]:[]}function Y(e){let t=document.createElement(`a`);t.target=`_blank`,t.href=S+e.slice(1),t.click()}function Ie(e){let t=new URL(S+e.slice(1),location.href).href;if(j.value){window.parent.postMessage({target:`slidev`,sender:`slidev`,type:`open-external`,url:t},`*`);return}Y(e)}function Le(e){let t=F.get(e);t&&t.scrollIntoView({behavior:`smooth`,block:`start`})}function X(e){let t=je.get(e)||F.get(e);if(!t||!L.value)return null;let n=L.value.getBoundingClientRect();return t.getBoundingClientRect().top-n.top+L.value.scrollTop}function Z(e){if(!L.value||A.value.length===0)return;let t=Math.min(Math.max(e,1),A.value.length),n=Math.floor(t)-1,r=t-(n+1),i=X(n),a=X(n+1);if(i==null)return;let o=i+(a==null?0:(a-i)*r)-L.value.clientHeight*.5;Math.abs(L.value.scrollTop-o)<1||L.value.scrollTo({top:o})}function Re(){let e=C.query.slideNo,t=Number(Array.isArray(e)?e[0]:e);return Number.isFinite(t)&&t>0?t:void 0}function Q(e){if(!N.value)return;let t=Number(e.toFixed(3)).toString();C.query.slideNo!==t&&k.replace({query:{...C.query,slideNo:t}})}function ze(){if(!L.value||A.value.length===0)return null;let e=L.value.scrollTop+L.value.clientHeight*.5,t=A.value.map((e,t)=>X(t)).filter(e=>e!=null);if(t.length===0)return null;if(t.length===1||e<=t[0])return 1;for(let n=1;n{V=void 0;let e=B;B=void 0,e!=null&&(Q(e),!(Date.now()0&&(z=Date.now()+300,B=void 0,Q(t),Z(t))}function He(e,t,n){let r=G(n);r.current=r.current===t?w:t,e.preventDefault()}function Ue(e,t){if(e.ctrlKey||e.metaKey){e.preventDefault(),Ie(b(t,!1));return}let n=t.meta?.slide;n&&window.parent.postMessage({target:`slidev`,type:`command`,command:`goto`,args:[n.filepath,n.sourceIndex]},`*`)}return e(()=>{window.addEventListener(`message`,$);let e=N.value?Re():void 0;e!=null&&(z=Date.now()+300,Z(e)),t(()=>{e!=null&&Z(e),J()})}),r(()=>{window.removeEventListener(`message`,$),V&&clearTimeout(V)}),(e,t)=>{let r=ue,u=de;return y(),c(`div`,ge,[s(j)?v(`v-if`,!0):(y(),c(`nav`,_e,[o(`div`,ve,[o(`div`,ye,[(y(!0),c(p,null,a(s(A),(e,t)=>(y(),c(`div`,{key:e.no,class:`relative`,style:{direction:`ltr`}},[o(`button`,{class:g([`relative transition duration-300 w-8 h-8 rounded hover:bg-active hover:op100`,I.value.includes(t)?`op100 text-primary bg-gray:5`:`op20`]),onClick:e=>Le(t)},[o(`div`,null,_(t+1),1)],10,be),e.meta?.slide?.title?(y(),c(`div`,{key:0,class:g([`pointer-events-none select-none absolute left-110% top-50% translate-y--50% ws-nowrap z-label px2 slidev-glass-effect transition duration-400 op0 group-hover:op100`,I.value.includes(t)?`text-primary`:`text-main important-text-op-50`])},_(e.meta?.slide?.title),3)):v(`v-if`,!0)]))),128))])]),o(`div`,xe,[s(se)?(y(),h(E,{key:1,title:s(T)?`Dark mode`:`Light mode`,"pointer-events-none":``,op50:``},{default:n(()=>[s(T)?(y(),h(r,{key:0})):(y(),h(u,{key:1}))]),_:1},8,[`title`])):(y(),h(E,{key:0,title:s(T)?`Switch to light mode theme`:`Switch to dark mode theme`,onClick:t[0]||=e=>s(le)()},{default:n(()=>[s(T)?(y(),h(r,{key:0})):(y(),h(u,{key:1}))]),_:1},8,[`title`]))])])),o(`main`,{ref_key:`scroller`,ref:L,class:`flex-1 h-full of-auto`,style:l(`grid-template-columns: repeat(auto-fit,minmax(${O}px,1fr))`),onScroll:Ve},[(y(!0),c(p,null,a(s(A),(e,r)=>(y(),c(`div`,{key:e.no,ref_for:!0,ref:e=>F.set(r,e),class:g([`overview-slide-block relative of-hidden flex gap-4 min-h-50`,[r===0&&!N.value?`pt2`:``,N.value?`justify-center`:`border-t border-main`]])},[N.value?v(`v-if`,!0):(y(),c(`div`,{key:0,class:g([`select-none text-right my5 flex flex-col justify-between items-end`,M.value?`w-9`:`w-13`]),style:l({height:`${Ae.value}px`})},[o(`div`,{class:`self-center text-3xl op20 mb2 text-center mr--14px tabular-nums`,style:l({width:`${Pe.value}ch`})},_(r+1),5),o(`div`,Se,[i(E,{class:g([`overview-slide-action mr--4 op0`,M.value?`text-lg`:``]),title:`Play in new tab`,onClick:t=>Y(s(b)(e,!1))},{default:n(()=>[...t[4]||=[o(`div`,{class:`i-carbon:presentation-file`},null,-1)]]),_:1},8,[`class`,`onClick`]),v(`v-if`,!0)])],6)),o(`div`,{class:g([`flex flex-col`,N.value?`my1 gap-0`:`my5 gap-2`]),style:l({width:`${P.value}px`})},[N.value?(y(),c(`div`,Ce,[o(`button`,{type:`button`,class:`select-none pl-1 text-lg leading-tight op60 tabular-nums hover:op90 hover:underline underline-offset-2`,onClick:t=>Ue(t,e)},_(r+1),9,we),K(e)?(y(),h(D,{key:0,active:U.value===e,"clicks-context":G(e),resettable:``,compact:``,attached:``,class:`ml-auto w-88 min-w-[70%] max-w-[calc(100%-3rem)]`,onDblclick:t=>q(e),onActivate:t=>U.value=e,onReset:t[1]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`onDblclick`,`onActivate`])):v(`v-if`,!0)])):v(`v-if`,!0),o(`div`,{ref_for:!0,ref:e=>je.set(r,e),class:g([`border rounded border-main overflow-hidden bg-main h-max`,[N.value&&K(e)?`rounded-tr-0`:``,N.value?``:`select-none`]]),onDblclick:t=>!N.value&&Y(s(b)(e,!1))},[(y(),h(fe,{key:e.no,width:P.value,class:g(N.value?``:`pointer-events-none important:[&_*]:select-none`)},{default:n(()=>[i(me,{"clicks-context":G(e),route:e,"render-context":`overview`},null,8,[`clicks-context`,`route`]),i(pe,{page:e.no},null,8,[`page`])]),_:2},1032,[`width`,`class`]))],42,Te),K(e)&&!N.value?(y(),h(D,{key:1,active:U.value===e,"clicks-context":G(e),resettable:``,class:g([`ml-1 w-[calc(100%-0.25rem)]`,M.value?``:`mt-2`]),onDblclick:t=>q(e),onActivate:t=>U.value=e,onReset:t[2]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`class`,`onDblclick`,`onActivate`])):v(`v-if`,!0)],6),M.value?v(`v-if`,!0):(y(),h(he,{key:1,no:e.no,class:`relative z-1 max-w-250 w-250 text-lg rounded p3`,"auto-height":!0,highlight:U.value===e,editing:R.value===e.no,"clicks-context":G(e),onDblclick:t=>R.value===e.no?null:R.value=e.no,"onUpdate:editing":t[3]||=e=>R.value=null,onMarkerClick:(t,n)=>He(t,n,e)},null,8,[`no`,`highlight`,`editing`,`clicks-context`,`onDblclick`,`onMarkerClick`])),!M.value&&H.value[r]>0?(y(),c(`div`,Ee,_(H.value[r])+` words `,1)):v(`v-if`,!0)],2))),128))],36),s(j)?v(`v-if`,!0):(y(),c(`div`,De,[o(`div`,Oe,_(s(A).length)+` slides · `+_(Ne.value+s(A).length-1)+` clicks · `+_(Me.value)+` words `,1)]))])}}}),[[`__scopeId`,`data-v-47f32601`]]);export{k as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/play-D8F3Hqg1.js b/lecture-06/class/assets/slidev/play-D8F3Hqg1.js new file mode 100644 index 0000000000000000000000000000000000000000..a87c84b2a822a24de9383d55c46424a3b2f4a893 --- /dev/null +++ b/lecture-06/class/assets/slidev/play-D8F3Hqg1.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DrawingControls-cUpksemn.js","../rolldown-runtime-hePW80VL.js","../modules/shiki-BFOesOFp.js","../modules/shiki-BrmBd2_v.css","../modules/vue-Ymwlffw_.js","../useDrawings-BkbsP5qo.js","../useNav-D8SbgLr9.js","../_plugin-vue_export-helper-BDNMzG2s.js","./context-DrkI8qiD.js","../index-DvHcJSI0.js","../syncState-BrWO1mSt.js","../index-BSlCwQE7.css","./IconButton-B5keGFol.js","./VerticalDivider-D_ScNBWw.js","../DrawingControls-Dhbx0szf.css"])))=>i.map(i=>d[i]); +import{Q as e,S as t,Y as n,_ as r,_t as i,b as a,bt as o,ft as s,g as c,it as l,lt as u,m as d,ot as f,v as p,vt as m,w as h,x as g,y as _,z as v}from"../modules/shiki-BFOesOFp.js";import{E as y,F as b,I as x,f as S,h as C,k as w,q as T,t as E,tt as D,v as O,w as k}from"../useNav-D8SbgLr9.js";import{C as A,m as j}from"../modules/vue-Ymwlffw_.js";import{o as M}from"../index-DvHcJSI0.js";import{t as N}from"../useDrawings-BkbsP5qo.js";import{t as P}from"../modules/unplugin-icons-BIrNarL0.js";import{t as F}from"./Modal-CjKJrPTu.js";import{i as I}from"../SlideWrapper-LdbrkItj.js";import{a as L,c as R,d as z,f as B,l as V,n as H,r as U,s as W,t as G,u as K}from"./shortcuts-DN6ExGde.js";var q=2e3;function J(e){let t=c(()=>e.value&&S.value);function r(){document.body.style.cursor=`none`}function i(){document.body.style.cursor=``}let a=null;n(t,e=>{e||(i(),a&&clearTimeout(a),a=null)}),f(()=>{i(),a&&clearTimeout(a),a=null}),j(document.body,[`pointermove`,`pointerdown`],()=>{i(),a&&clearTimeout(a),a=t.value?setTimeout(r,q):null},{passive:!0})}``+new URL(`../logo-BYkHSa_O.png`,import.meta.url).href;var Y={class:`slidev-info-dialog slidev-layout flex flex-col gap-4 text-base`},X=[`innerHTML`],Z=h({__name:`InfoDialog`,props:{modelValue:{default:!1}},emits:[`update:modelValue`],setup(t,{emit:n}){let o=A(t,`modelValue`,n),s=c(()=>typeof D.info==`string`);return(t,n)=>(v(),p(F,{modelValue:i(o),"onUpdate:modelValue":n[0]||=e=>l(o)?o.value=e:null,class:`px-6 py-4`},{default:e(()=>[r(`div`,Y,[s.value?(v(),a(`div`,{key:0,class:`mb-4`,innerHTML:i(D).info},null,8,X)):_(`v-if`,!0),n[1]||=r(`a`,{href:`https://github.com/slidevjs/slidev`,target:`_blank`,class:`!opacity-100 !border-none !text-current`},[r(`div`,{class:`flex gap-1 children:my-auto`},[r(`div`,{class:`opacity-50 text-sm mr-2`},`Powered by`),r(`img`,{class:`w-5 h-5`,src:``+new URL(`../logo-BYkHSa_O.png`,import.meta.url).href,alt:`Slidev logo`}),r(`div`,{style:{color:`#2082A6`}},[r(`b`,null,`Sli`),g(`dev `)])])],-1)])]),_:1},8,[`modelValue`]))}}),Q=h({__name:`Controls`,setup(e){let{isEmbedded:n}=E(),r=!D.drawings.presenterOnly&&!n.value,o=s();r&&T(()=>import(`./DrawingControls-cUpksemn.js`).then(e=>e.n).then(e=>o.value=e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url);let c=s(),u=s();return(e,n)=>(v(),a(d,null,[o.value?(v(),p(i(o),{key:0})):_(`v-if`,!0),t(W),t(R),c.value?(v(),p(i(c),{key:1})):_(`v-if`,!0),u.value?(v(),p(i(u),{key:2,modelValue:i(w),"onUpdate:modelValue":n[0]||=e=>l(w)?w.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),i(D).info?(v(),p(Z,{key:3,modelValue:i(y),"onUpdate:modelValue":n[1]||=e=>l(y)?y.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),t(V)],64))}}),$={key:0,class:`absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl`},ee=h({__name:`PresenterMouse`,setup(e){return(e,n)=>{let r=P;return i(M).cursor?.style===`cursor`?(v(),a(`div`,$,[t(r,{class:`absolute stroke-white dark:stroke-black`,style:o({left:`${i(M).cursor.x}%`,top:`${i(M).cursor.y}%`,strokeWidth:16})},null,8,[`style`])])):_(`v-if`,!0)}}}),te=h({__name:`play`,setup(n){let{next:o,prev:l,isPrintMode:f,isPlaying:h,isEmbedded:g}=E(),{isDrawing:y}=N(),S=u();function w(e){k.value||e.button===0&&e.target?.id===`slide-container`&&(e.pageX/window.innerWidth>.5?o():l())}B(S),G(),z(),J(c(()=>h.value&&!g.value&&!k.value));let T=c(()=>O.value||k.value),D=s(),A=c(()=>{let e=``;return b.value.brightness!==x.brightness&&(e+=`brightness(${b.value.brightness}) `),b.value.contrast!==x.contrast&&(e+=`contrast(${b.value.contrast}) `),b.value.sepia!==x.sepia&&(e+=`sepia(${b.value.sepia}) `),b.value.hueRotate!==x.hueRotate&&(e+=`hue-rotate(${b.value.hueRotate}deg) `),b.value.invert&&(e+=`invert(1) `),{filter:e}});return(n,o)=>(v(),a(d,null,[r(`div`,{id:`page-root`,ref_key:`root`,ref:S,class:m([`grid`,i(C)?`grid-rows-[1fr_max-content]`:`grid-cols-[1fr_max-content]`])},[t(I,{style:{background:`var(--slidev-slide-container-background, black)`},"is-main":``,"content-style":A.value,onPointerdown:w,onContextmenu:i(K)},{default:e(()=>[t(H,{"render-context":`slide`}),t(ee),t(L)]),controls:e(()=>[i(f)?_(`v-if`,!0):(v(),a(`div`,{key:0,class:m([`absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100 focus-within:opacity-100 focus-visible:opacity-100`,[T.value?`!opacity-100 right-0`:`opacity-0 p-2`,i(y)?`pointer-events-none`:``]])},[t(U,{persist:T.value},null,8,[`persist`])],2))]),_:1},8,[`content-style`,`onContextmenu`]),D.value&&i(k)?(v(),p(i(D),{key:0,resize:!0})):_(`v-if`,!0)],2),i(f)?_(`v-if`,!0):(v(),p(Q,{key:0})),o[0]||=r(`div`,{id:`twoslash-container`},null,-1)],64))}});export{te as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/presenter-DD9vQFpb.js b/lecture-06/class/assets/slidev/presenter-DD9vQFpb.js new file mode 100644 index 0000000000000000000000000000000000000000..7685e469695486656a9409e1208b968758d0e936 --- /dev/null +++ b/lecture-06/class/assets/slidev/presenter-DD9vQFpb.js @@ -0,0 +1 @@ +import{$ as e,J as t,L as n,Q as r,S as i,X as a,Y as o,_ as s,_t as c,b as l,bt as u,ft as d,g as f,it as ee,lt as p,m as te,u as ne,v as m,vt as h,w as g,x as _,xt as v,y,z as b}from"../modules/shiki-BFOesOFp.js";import{$ as re,O as ie,W as ae,a as oe,b as x,m as se,o as ce,t as le,w as ue,x as de}from"../useNav-D8SbgLr9.js";import{t as S}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{T as C,g as w,m as T,v as fe}from"../modules/vue-Ymwlffw_.js";import{h as pe,n as E,o as me}from"../index-DvHcJSI0.js";import{t as he}from"../useDrawings-BkbsP5qo.js";import{t as ge}from"./DrawingControls-cUpksemn.js";import{t as _e}from"./IconButton-B5keGFol.js";import{n as ve,t as D}from"./NoteDisplay-6LSM8xpP.js";import{n as O,r as ye,t as be}from"./TimerBar-1xtsicrJ.js";import{i as k,t as xe}from"../SlideWrapper-LdbrkItj.js";import"./NoteEditable-DTwQcEqa.js";import{a as Se,c as Ce,d as we,f as Te,i as Ee,l as De,n as Oe,o as ke,r as Ae,s as je,t as Me,u as Ne}from"./shortcuts-DN6ExGde.js";var Pe=g({__name:`NoteStatic`,props:{no:{},class:{},clicksContext:{}},setup(e){let t=e,{info:n}=E(t.no);return(r,i)=>(b(),m(D,{class:h(t.class),note:c(n)?.note,"note-html":c(n)?.noteHTML,"clicks-context":e.clicksContext},null,8,[`class`,`note`,`note-html`,`clicks-context`]))}}),A={"h-full":``,"w-full":``},j={key:0,"w-full":``,"h-full":``,flex:`~ col gap-4 items-center justify-center`},Fe=g({__name:`ScreenCaptureMirror`,setup(n){let r=t(`video`),i=d(null),a=d(!1);async function o(){i.value=await navigator.mediaDevices.getDisplayMedia({video:{cursor:`always`},audio:!1,selfBrowserSurface:`include`,preferCurrentTab:!1}),r.value.srcObject=i.value,r.value.play(),a.value=!0,i.value.addEventListener(`inactive`,()=>{r.value.srcObject=null,a.value=!1}),i.value.addEventListener(`ended`,()=>{r.value.srcObject=null,a.value=!1})}return(t,n)=>(b(),l(`div`,A,[e(s(`video`,{ref_key:`video`,ref:r,class:`w-full h-full object-contain`},null,512),[[ne,a.value]]),a.value?y(`v-if`,!0):(b(),l(`div`,j,[n[0]||=s(`div`,{op50:``},[_(` Use screen capturing to mirror your main screen back to presenter view.`),s(`br`),_(` Click the button below and `),s(`b`,null,`select your other monitor or window`),_(`. `)],-1),s(`button`,{class:`slidev-form-button`,onClick:o},` Start Screen Mirroring `)]))]))}}),M={class:`w-22px cursor-pointer`},N={class:`group-not-hover:hidden flex flex-col items-center`},P={key:0,class:`i-carbon:pause text-lg`},F={key:1,class:`i-carbon:play`},I={class:`text-3xl px-3 my-auto font-mono`},Ie=g({__name:`TimerInlined`,setup(e){let{status:t,percentage:n,mode:r,timer:i,reset:a,toggle:o}=O(),u=f(()=>t.value===`stopped`?`op50`:t.value===`paused`?`text-blue6 dark:text-blue3`:n.value>100?`text-red6 dark:text-red3`:n.value>80?`text-yellow6 dark:text-yellow3`:`text-green6 dark:text-green3`);return(e,n)=>(b(),l(`div`,{class:h([`group flex items-center justify-center pl-4 select-none`,u.value])},[s(`div`,M,[s(`div`,{class:h([`group-hover:hidden text-2xl`,c(r)===`countdown`?`i-carbon:timer`:`i-carbon:time`])},null,2),s(`div`,N,[s(`div`,{class:`relative op-80 hover:op-100`,onClick:n[0]||=(...e)=>c(o)&&c(o)(...e)},[c(t)===`running`?(b(),l(`div`,P)):(b(),l(`div`,F))]),s(`div`,{class:`op-80 hover:op-100`,onClick:n[1]||=(...e)=>c(a)&&c(a)(...e)},[...n[2]||=[s(`div`,{class:`i-carbon:renew`},null,-1)]])])]),s(`div`,I,[c(i).h?(b(),l(te,{key:0},[s(`span`,null,v(c(i).h),1),n[3]||=s(`span`,{op50:``},`:`,-1)],64)):y(`v-if`,!0),s(`span`,null,v(c(i).m),1),n[4]||=s(`span`,{op50:``},`:`,-1),s(`span`,null,v(c(i).s),1)])],2))}}),Le={class:`bg-main h-full slidev-presenter grid grid-rows-[max-content_1fr] of-hidden`},Re={flex:`~ gap-4 items-center`,border:`b main`,p1:``},ze={class:`relative grid-section next flex flex-col p-2 lg:p-4`},Be={key:2,class:`h-full flex justify-center items-center`},Ve={key:3,class:`h-full grid grid-rows-[1fr_min-content]`},L=S(g({__name:`presenter`,setup(t){let g=C(),_=p(),v=p(),S=p(),E=p();Me(),Te(_),we();let{clicksContext:D,currentSlideNo:O,currentSlideRoute:A,hasNext:j,nextRoute:M,slides:N,getPrimaryClicks:P}=le(),{isDrawing:F}=he();pe({title:`Presenter - ${re}`}),p(!1);let I=f(()=>N.value.map(e=>{let t=p(0);return{context:ae(t,e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks),clicks:t}})),L=f(()=>D.value.currentL.value&&I.value[L.value[0].no-1]);o(L,()=>{R.value&&L.value&&(R.value.clicks.value=L.value[1])},{immediate:!0});let z=w(`slidev-presenter-main-slide-mode`,`slides`),B=w(`slidev-presenter-notes-width`,360),V=w(`slidev-presenter-notes-row-size`,280),He=p(0),H=p(!1),U=p(!1),Ue=p(0),W=p(360),We=p(0),G=p(280),K={minNotesWidth:240,maxNotesWidth:720,minNotesRowSize:160,maxNotesWidthRatio:.7,maxNotesRowHeightRatio:.75},Ge=fe(`(min-aspect-ratio: 1/1)`),q=fe(`(max-aspect-ratio: 3/5)`),J=f(()=>x.value===1&&Ge.value),Y=f(()=>!(x.value===1&&q.value)),X=f(()=>x.value===1&&!q.value||x.value===2||x.value===3),Ke=f(()=>x.value===1&&!q.value);function qe(e){return Number.isFinite(e)?Math.max(K.minNotesWidth,Math.min(K.maxNotesWidth,Math.round(e))):K.minNotesWidth}function Je(e){let t=v.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-Ue.value,i=qe(J.value?W.value-r:W.value+r),a=Math.round(n.width*K.maxNotesWidthRatio);B.value=Math.min(i,Math.max(K.minNotesWidth,a))}function Z(e){Y.value&&e.button===0&&(e.preventDefault(),Ue.value=e.clientX,W.value=B.value,H.value=!0)}function Q(e){return Number.isFinite(e)?Math.max(K.minNotesRowSize,Math.round(e)):K.minNotesRowSize}function Ye(e){let t=v.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-We.value,i=Ke.value?G.value-r:G.value+r,a=Math.round(n.height*K.maxNotesRowHeightRatio);V.value=Math.min(Q(i),Math.max(K.minNotesRowSize,a))}function Xe(e){if(!X.value||e.button!==0)return;e.preventDefault();let t=x.value===2?_.value?.getBoundingClientRect().height:S.value?.getBoundingClientRect().height;We.value=e.clientY,G.value=Q(t??V.value),U.value=!0}function Ze(){let e=E.value;e&&(He.value=Math.round(e.getBoundingClientRect().height))}function Qe(){H.value=!1,U.value=!1}function $e(){Ze(),et()}T(window,`pointermove`,e=>{H.value&&Je(e.clientX),U.value&&Ye(e.clientY)}),T(window,`pointerup`,Qe),T(window,`pointercancel`,Qe),n(()=>{$e()}),T(window,`resize`,()=>{$e()});function et(){B.value=qe(B.value),V.value=Q(V.value);let e=v.value;if(!e)return;let t=e.getBoundingClientRect(),n=Math.round(t.width*K.maxNotesWidthRatio),r=Math.round(t.height*K.maxNotesRowHeightRatio);B.value=Math.min(B.value,Math.max(K.minNotesWidth,n)),V.value=Math.min(V.value,Math.max(K.minNotesRowSize,r))}let $=d();return n(()=>{let e=ke(),t=C();a(()=>{!e.value||!t.value||F.value||!ie.value?me.cursor=void 0:me.cursor={...e.value,style:oe.value}})}),(t,n)=>(b(),l(te,null,[s(`div`,Le,[s(`div`,null,[i(ye),i(be)]),s(`div`,{ref_key:`gridContainer`,ref:v,class:h([`grid-container`,`layout${c(x)}`]),style:u({"--slidev-presenter-notes-width":`${c(B)}px`,"--slidev-presenter-notes-row-size":`${c(V)}px`,"--slidev-presenter-bottom-height":`${He.value}px`})},[y(` Unified vertical resizer for wide layout `),Y.value&&J.value?(b(),l(`div`,{key:0,class:`notes-vertical-resizer`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Z},null,32)):y(`v-if`,!0),y(` Unified vertical resizer for layout 3 `),Y.value&&c(x)===3?(b(),l(`div`,{key:1,class:`notes-vertical-resizer-left`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Z},null,32)):y(`v-if`,!0),s(`div`,{ref_key:`main`,ref:_,class:`relative grid-section main flex flex-col`},[s(`div`,Re,[n[3]||=s(`span`,{op50:``,px2:``},`Current`,-1),n[4]||=s(`div`,{"flex-auto":``},null,-1),i(Ee,{modelValue:c(z),"onUpdate:modelValue":n[0]||=e=>ee(z)?z.value=e:null,options:[{label:`Slides`,value:`slides`},{label:`Screen Mirror`,value:`mirror`}]},null,8,[`modelValue`])]),c(z)===`mirror`?(b(),m(Fe,{key:0})):y(`v-if`,!0),y(` We use v-show here to still infer the clicks context `),e(i(k,{key:`main`,class:`p-2 lg:p-4 flex-auto`,"is-main":``,onContextmenu:c(Ne)},{default:r(()=>[i(Oe,{"render-context":`presenter`}),i(Se)]),_:1},8,[`onContextmenu`]),[[ne,c(z)===`slides`]]),(b(),m(ve,{key:c(A)?.no,"clicks-context":c(P)(c(A)),class:`w-full pb2 px4 flex-none`},null,8,[`clicks-context`]))],512),s(`div`,ze,[X.value&&c(x)===2?(b(),l(`div`,{key:0,class:`notes-row-resizer top-[-6px]`,role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Xe},null,32)):y(`v-if`,!0),L.value&&R.value?(b(),m(k,{key:`next`},{default:r(()=>[(b(),m(xe,{key:L.value[0].no,"clicks-context":R.value.context,route:L.value[0],"render-context":`previewNext`},null,8,[`clicks-context`,`route`]))]),_:1})):(b(),l(`div`,Be,[...n[5]||=[s(`div`,{class:`text-gray-500`},` End of the presentation `,-1)]])),n[6]||=s(`div`,{class:`absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm`},` Next `,-1)]),s(`div`,{ref_key:`noteSection`,ref:S,class:`relative grid-section note overflow-hidden`},[Y.value&&!J.value&&c(x)!==3?(b(),l(`div`,{key:0,class:`notes-resizer right-[-6px]`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Z},null,32)):y(`v-if`,!0),X.value&&c(x)!==2?(b(),l(`div`,{key:1,class:h([`notes-row-resizer`,Ke.value?`top-[-6px]`:`bottom-[-6px]`]),role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Xe},null,34)):y(`v-if`,!0),$.value&&c(ue)?(b(),m(c($),{key:2,class:`h-full`})):(b(),l(`div`,Ve,[(b(),m(Pe,{key:`static-${c(O)}`,no:c(O),class:`w-full max-w-full h-full overflow-auto p-2 lg:p-4`,style:u({fontSize:`${c(de)}em`}),"clicks-context":c(D)},null,8,[`no`,`style`,`clicks-context`])),n[10]||=s(`div`,{"border-t":``,"border-main":``},null,-1),s(`div`,{class:h([`py-1 px-2 text-sm transition`,c(g)?``:`op25`])},[i(_e,{title:`Increase font size`,onClick:c(se)},{default:r(()=>[...n[7]||=[s(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1},8,[`onClick`]),i(_e,{title:`Decrease font size`,onClick:c(ce)},{default:r(()=>[...n[8]||=[s(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1},8,[`onClick`]),y(`v-if`,!0)],2)]))],512),s(`div`,{ref_key:`bottomSection`,ref:E,class:`grid-section bottom flex`},[i(Ae,{persist:!0,class:h([`transition`,c(g)?``:`op25`])},null,8,[`class`]),n[11]||=s(`div`,{"flex-auto":``},null,-1),i(Ie)],512),(b(),m(ge,{key:2}))],6)]),i(Ce),i(je),i(De)],64))}}),[[`__scopeId`,`data-v-e7a794bf`]]);export{L as default}; \ No newline at end of file diff --git a/lecture-06/class/assets/slidev/shortcuts-DN6ExGde.js b/lecture-06/class/assets/slidev/shortcuts-DN6ExGde.js new file mode 100644 index 0000000000000000000000000000000000000000..6ebeead75689984055114f783f2c3aa661615e80 --- /dev/null +++ b/lecture-06/class/assets/slidev/shortcuts-DN6ExGde.js @@ -0,0 +1,4 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DrawingLayer-BLLWTnj4.js","../modules/shiki-BFOesOFp.js","../rolldown-runtime-hePW80VL.js","../modules/shiki-BrmBd2_v.css","./context-DrkI8qiD.js","../modules/vue-Ymwlffw_.js","../useDrawings-BkbsP5qo.js","../useNav-D8SbgLr9.js","../_plugin-vue_export-helper-BDNMzG2s.js","../index-DvHcJSI0.js","../syncState-BrWO1mSt.js","../index-BSlCwQE7.css"])))=>i.map(i=>d[i]); +import{$ as e,E as t,G as n,H as r,K as i,L as a,M as o,Q as s,S as c,V as l,X as u,Y as d,_ as f,_t as p,a as m,b as h,bt as g,c as _,d as v,f as y,ft as b,g as x,h as S,i as C,it as w,j as T,k as ee,l as E,lt as D,m as O,n as te,o as ne,u as re,v as k,vt as A,w as j,x as ie,xt as M,y as N,yt as P,z as F}from"../modules/shiki-BFOesOFp.js";import{A as ae,C as oe,D as I,E as se,F as L,G as ce,I as R,L as le,M as ue,N as de,O as fe,P as pe,Q as me,R as he,S as ge,T as z,V as _e,Y as ve,Z as ye,_ as be,a as xe,b as Se,d as Ce,f as we,g as Te,i as Ee,j as B,n as De,nt as Oe,p as ke,q as Ae,r as je,s as Me,t as V,tt as H,u as Ne,w as Pe,y as Fe,z as Ie}from"../useNav-D8SbgLr9.js";import{t as Le}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{C as Re,I as ze,P as Be,T as Ve,V as He,b as Ue,f as We,m as Ge,n as U,o as Ke,r as qe,s as Je,t as W,w as Ye,y as Xe}from"../modules/vue-Ymwlffw_.js";import{_ as Ze,l as Qe,n as $e}from"./context-DrkI8qiD.js";import{f as et,i as tt,m as nt,o as rt,p as it,r as at,t as ot}from"../index-DvHcJSI0.js";import{t as st}from"../useDrawings-BkbsP5qo.js";import{t as G}from"./IconButton-B5keGFol.js";import{t as ct}from"./VerticalDivider-D_ScNBWw.js";import{a as lt,i as ut,n as dt,o as ft,r as pt,t as mt}from"../SlideWrapper-LdbrkItj.js";function ht(e){let{next:t,nextSlide:n,prev:r,prevSlide:i}=V(),{isDrawing:a}=st(),o=D(0),{direction:s,distanceX:c,distanceY:l}=Ue(e,{pointerTypes:[`touch`],onSwipeStart(){a.value||(o.value=Be())},onSwipeEnd(){if(!o.value||a.value)return;let e=Math.abs(c.value),u=Math.abs(l.value);e/window.innerWidth>.3||e>75?s.value===`left`?t():r():(u/window.innerHeight>.4||u>200)&&(s.value===`down`?i():n())}})}function gt(){let{request:e,release:t}=Ye();d(le,n=>{n?e(`screen`):t()},{immediate:!0})}var _t=Object.assign({}),vt=Object.assign({}),yt=Object.assign({}),bt=[Object.values(_t)[0],Object.values(vt)[0],Object.values(yt)[0]].filter(Boolean),xt,St=()=>{if(xt)return xt;let{next:e,nextSlide:t,prev:n,prevSlide:r,hasNext:i,hasPrev:a,currentPage:o,total:s,isPresenter:c,enterPresenter:l,exitPresenter:u,isEmbedded:d,isPresenterAvailable:f}=V(),{drawingEnabled:p}=st(),{isFullscreen:m,toggle:h}=Ne;return xt=bt.reduce((e,t)=>t(e),x(()=>[{small:!0,icon:`i-carbon:arrow-left`,label:`Previous Click`,action:n,disabled:!a.value},{small:!0,icon:`i-carbon:arrow-right`,label:`Next Click`,action:e,disabled:!i.value},{small:!0,icon:`i-carbon:arrow-up`,label:`Previous Slide`,action:r,disabled:o.value<=1},{small:!0,icon:`i-carbon:arrow-down`,label:`Next Slide`,action:t,disabled:o.value>=s.value},`separator`,{icon:`i-carbon:text-annotation-toggle`,label:Pe.value?`Hide editor`:`Show editor`,action:()=>Pe.value=!Pe.value,show:!1},{icon:`i-carbon:pen`,label:p.value?`Hide drawing toolbar`:`Show drawing toolbar`,action:()=>p.value=!p.value},{icon:`i-carbon:apps`,label:`Show slide overview`,action:ue},c.value&&{icon:`i-carbon:presentation-file`,label:`Exit Presenter Mode`,action:u},f.value&&{icon:`i-carbon:user-speaker`,label:`Enter Presenter Mode`,action:l},!d.value&&{icon:m.value?`i-carbon:minimize`:`i-carbon:maximize`,label:m.value?`Close fullscreen`:`Enter fullscreen`,action:h}].filter(Boolean)))},Ct=b(null);function wt(e,t){Ct.value={x:e,y:t,items:St()}}function Tt(){Ct.value=null}function Et(e){if(H.contextMenu!==!0&&H.contextMenu!=null&&H.contextMenu!==`build`||e.shiftKey||e.defaultPrevented)return;let{isEmbedded:t}=V();t.value||(wt(e.pageX,e.pageY),e.preventDefault(),e.stopPropagation())}var Dt=[`title`,`onClick`],Ot=[`onClick`],kt={class:`mx-auto flex`},At={key:0},jt={class:`w-full text-xs p2`},Mt={class:`text-main text-opacity-50!`},Nt=j({__name:`ContextMenu`,setup(e){let t=D();Ke(t,Tt),Ge(document,`mousedown`,e=>{e.buttons&2&&Tt()},{passive:!0,capture:!0});let r=x(()=>H.contextMenu!=null),i=Ve();d(i,e=>{e||Tt()}),ot(1);let{width:a,height:o}=We(t),s=x(()=>{let e=Ct.value?.x;return e?e+a.value>he.width.value?he.width.value-a.value:e:0}),c=x(()=>{let e=Ct.value?.y;return e?e+o.value>he.height.value?he.height.value-o.value:e:0});return(e,i)=>p(Ct)?(F(),h(`div`,{key:0,ref_key:`container`,ref:t,style:g(`left:${s.value}px;top:${c.value}px`),class:`slidev-glass-effect fixed z-context-menu w-60 flex flex-wrap justify-items-start p-1 animate-fade-in animate-duration-100 rounded-md shadow overflow-hidden select-none`,onContextmenu:i[1]||=y(()=>{},[`prevent`]),onClick:i[2]||=(...e)=>p(Tt)&&p(Tt)(...e)},[(F(!0),h(O,null,l(p(Ct).items.value,(e,t)=>(F(),h(O,{key:t},[e===`separator`?(F(),h(`div`,{key:t,class:`w-full my1 border-t border-main`})):e.show??!0?(F(),h(O,{key:1},[e.small?(F(),h(`div`,{key:0,class:A([`p-2 w-[40px] h-[40px] inline-block text-center cursor-pointer rounded flex`,e.disabled?`op40`:`hover:bg-active`]),title:e.label,onClick:e.action},[typeof e.icon==`string`?(F(),h(`div`,{key:0,class:A([e.icon,`text-1.2em ma`])},null,2)):(F(),k(n(e.icon),{key:1}))],10,Dt)):(F(),h(`div`,{key:1,class:A([`w-full grid grid-cols-[35px_1fr] p-2 pl-0 cursor-pointer rounded`,e.disabled?`op40`:`hover:bg-active`]),onClick:e.action},[f(`div`,kt,[typeof e.icon==`string`?(F(),h(`div`,{key:0,class:A([e.icon,`text-1.2em ma`])},null,2)):(F(),k(n(e.icon),{key:1}))]),typeof e.label==`string`?(F(),h(`div`,At,M(e.label),1)):(F(),k(n(e.label),{key:1}))],10,Ot))],64)):N(`v-if`,!0)],64))),128)),r.value?N(`v-if`,!0):(F(),h(O,{key:0},[i[6]||=f(`div`,{class:`w-full my1 border-t border-main`},null,-1),f(`div`,jt,[f(`div`,Mt,[i[3]||=ie(` Hold `,-1),i[4]||=f(`kbd`,{class:`border px1 py0.5 border-main rounded text-primary`},`Shift`,-1),i[5]||=ie(` and right click to open the native context menu `,-1),N(`v-if`,!0)])])],64))],36)):N(`v-if`,!0)}});function K(e){return Array.isArray?Array.isArray(e):Vt(e)===`[object Array]`}function Pt(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function Ft(e){return e==null?``:Pt(e)}function q(e){return typeof e==`string`}function It(e){return typeof e==`number`}function Lt(e){return e===!0||e===!1||zt(e)&&Vt(e)==`[object Boolean]`}function Rt(e){return typeof e==`object`}function zt(e){return Rt(e)&&e!==null}function J(e){return e!=null}function Bt(e){return!e.trim().length}function Vt(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ht=`Incorrect 'index' type`,Ut=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,Wt=e=>`Invalid value for key ${e}`,Gt=e=>`Pattern length exceeds max of ${e}.`,Kt=e=>`Missing ${e} property in key`,qt=e=>`Property 'weight' in key '${e}' must be a positive integer`,Jt=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,Yt=Object.prototype.hasOwnProperty,Xt=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=Zt(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Zt(e){let t=null,n=null,r=null,i=1,a=null;if(q(e)||K(e))r=e,t=Qt(e),n=$t(e);else{if(!Yt.call(e,`name`))throw Error(Kt(`name`));let o=e.name;if(r=o,Yt.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(qt($t(o)));t=Qt(o),n=$t(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function Qt(e){return K(e)?e:e.split(`.`)}function $t(e){return K(e)?e.join(`.`):e}function en(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(J(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!J(s))return;if(a===t.length-1&&(q(s)||It(s)||Lt(s)||typeof s==`bigint`))n.push(o===void 0?Ft(s):{v:Ft(s),i:o});else if(K(s)){r=!0;for(let e=0,n=s.length;ee.score===t.score?e.idx=9&&e<=13||e===32||e===160}function sn(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(q(this.docs[0]))for(let n=0;ne&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t>>1;n[i]t),records:this.records}}};function ln(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new cn({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(Zt)),i.setSources(t),i.create(),i}function un(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new cn({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function dn(e=[],t=Y.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function fn(e,t,n,{location:r=Y.location,distance:i=Y.distance,threshold:a=Y.threshold,findAllMatches:o=Y.findAllMatches,minMatchCharLength:s=Y.minMatchCharLength,includeMatches:c=Y.includeMatches,ignoreLocation:l=Y.ignoreLocation}={}){if(t.length>32)throw Error(Gt(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=dn(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function pn(e){let t={};for(let n=0,r=e.length;ne[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;ne.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(gn,e=>hn[e]):e=>e,vn=class{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?_n(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:pn(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e{let{isMatch:m,score:h,indices:g}=fn(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=mn(u)),p}},yn=new Set([`fuzzy`,`include`]);function bn(e){return e.startsWith(`inverse`)}var xn=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new vn(e,{location:t.location??Y.location,threshold:t.threshold??Y.threshold,distance:t.distance??Y.distance,includeMatches:t.includeMatches??Y.includeMatches,findAllMatches:t.findAllMatches??Y.findAllMatches,minMatchCharLength:t.minMatchCharLength??Y.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??Y.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??Y.ignoreDiacritics,ignoreLocation:t.ignoreLocation??Y.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],Sn=xn.length,Cn=`\0`,wn=`|`;function Tn(e){let t=[],n=e.length,r=0;for(;r=n)break;let i=r;for(;i=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i{let n=Tn(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e!!(e[Mn.AND]||e[Mn.OR]),Fn=e=>!!e[Nn.PATH],In=e=>!K(e)&&Rt(e)&&!Pn(e),Ln=e=>({[Mn.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Rn(e,t,{auto:n=!0}={}){let r=e=>{if(q(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=jn(e,t)),r}let i=Object.keys(e),a=Fn(e);if(!a&&i.length>1&&!Pn(e))return r(Ln(e));if(In(e)){let r=a?e[Nn.PATH]:i[0],o=a?e[Nn.PATTERN]:e[r];if(!q(o))throw Error(Wt(r));let s={keyId:$t(r),pattern:o};return n&&(s.searcher=jn(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];K(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Pn(e)||(e=Ln(e)),r(e)}function zn(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function Bn(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=zn(e.matches,{ignoreFieldNorm:t})})}var Vn=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i0&&(r=i),a0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function Hn(e){let t=[];return e.matches.forEach(e=>{if(!J(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function Un(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=Hn(e)),r&&(a.score=e.score),a})}var Wn=/[\p{L}\p{M}\p{N}_]+/gu,Gn=new WeakSet;function Kn(e){Gn.has(e)||(Gn.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function qn(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||Kn(e),t=>t.match(e)||[]):e=>e.match(Wn)||[]}function Jn({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=qn(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=_n(n)),r(n)}}}var Yn=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Jn({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new vn(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=mn(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function Xn(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function Zn(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){Xn(e,a,i,r);return}if(o)for(let t=0;te-t);for(let t of n)er(e,t);let r=e=>{let t=0,r=n.length;for(;t>>1;n[i]i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var X=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Xt(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=jn(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof cn))throw Error(Ht);if(this._myIndex=t||ln(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=Jn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=Qn(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!J(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=Jn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});$n(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(Ut);this._invertedIndex&&tr(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(q(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return It(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&It(n)&&n>0&&q(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new Vn(n,u);q(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=q(e)?q(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Bn(d,{ignoreFieldNorm:s}),a&&d.sort(q(e)?u:l),It(n)&&n>-1&&(d=d.slice(0,n));return Un(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!J(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=zn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=Rn(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e{if(J(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!J(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=zn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!J(t))return[];let r=[];if(K(t))t.forEach(({v:t,i,n:a})=>{if(!J(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;tAn(e))};var nr=X,rr={key:0},ir={key:1},ar={key:2},or={key:3},sr={key:4},cr={key:5},lr={key:6},ur={key:7},dr={key:8},fr={key:9},pr={key:10},mr={key:11},hr={key:12},gr={key:13},_r={key:14},vr={key:15},yr={key:16},br={key:17},xr={key:18},Sr={key:19},Cr={key:20},wr={key:21},Tr={key:22},Er={key:23},Dr={key:24},Or={key:25},kr={key:26},Ar={key:27},jr={key:28},Mr={key:29},Nr={key:30},Pr={key:31},Fr={key:32},Ir={key:33},Lr={key:34},Rr={key:35},zr={key:36},Br={key:37},Vr={key:38},Hr={key:39},Ur={key:40},Wr={key:41},Gr={key:42},Kr={key:43},qr=j({__name:`title-renderer`,props:{no:{}},setup(e){let t=e,{$page:n}=$e(),r=x(()=>+(t.no??n.value));return(e,t)=>(F(),h(`div`,null,[r.value===1?(F(),h(`p`,rr,`Transformers (class)`)):r.value===2?(F(),h(`p`,ir,`Today, in eight parts`)):r.value===3?(F(),h(`p`,ar,`Delete the recurrence`)):r.value===4?(F(),h(`p`,or,`Two walls in reading one word at a time`)):r.value===5?(F(),h(`p`,sr,`The move`)):r.value===6?(F(),h(`p`,cr,`Poll: which wall attention solves`)):r.value===7?(F(),h(`p`,lr,`The whole architecture first`)):r.value===8?(F(),h(`p`,ur,`What a transformer is`)):r.value===9?(F(),h(`p`,dr,`Two stacks`)):r.value===10?(F(),h(`p`,fr,`The architecture, step by step`)):r.value===11?(F(),h(`p`,pr,`The parts, one at a time`)):r.value===12?(F(),h(`p`,mr,`Query, key, value`)):r.value===13?(F(),h(`p`,hr,`Start from a lookup`)):r.value===14?(F(),h(`p`,gr,`Three roles, one vector`)):r.value===15?(F(),h(`p`,_r,`The sentence we will use all lecture`)):r.value===16?(F(),h(`p`,vr,`Three lenses on one word`)):r.value===17?(F(),h(`p`,yr,`Four steps, and that is the whole mechanism`)):r.value===18?(F(),h(`p`,br,`Same word, same weights, different neighbour`)):r.value===19?(F(),h(`p`,xr,`Every query at once`)):r.value===20?(F(),h(`p`,Sr,`The whole layer, in one line`)):r.value===21?(F(),h(`p`,Cr,`From one head to one block`)):r.value===22?(F(),h(`p`,wr,`One softmax can only point at one thing`)):r.value===23?(F(),h(`p`,Tr,`Four heads, one question each`)):r.value===24?(F(),h(`p`,Er,`Attention does not know what order the words came in`)):r.value===25?(F(),h(`p`,Dr,`So put the position into the vector`)):r.value===26?(F(),h(`p`,Or,`The other half of the block`)):r.value===27?(F(),h(`p`,kr,`Two wrappers that make it stackable`)):r.value===28?(F(),h(`p`,Ar,`The block, assembled`)):r.value===29?(F(),h(`p`,jr,`The bill for looking everywhere`)):r.value===30?(F(),h(`p`,Mr,`Inside the decoder`)):r.value===31?(F(),h(`p`,Nr,`The mask, and why the loss collapses without it`)):r.value===32?(F(),h(`p`,Pr,`Cross-attention: the decoder reads the encoder`)):r.value===33?(F(),h(`p`,Fr,`Three kinds of transformer`)):r.value===34?(F(),h(`p`,Ir,`The architecture forked three ways`)):r.value===35?(F(),h(`p`,Lr,`Which kind for which job`)):r.value===36?(F(),h(`p`,Rr,`Why decoder-only took over`)):r.value===37?(F(),h(`p`,zr,`The same block, more of it`)):r.value===38?(F(),h(`p`,Br,`In PyTorch`)):r.value===39?(F(),h(`p`,Vr,`The mechanism is one function call`)):r.value===40?(F(),h(`p`,Hr,`Shapes, end to end`)):r.value===41?(F(),h(`p`,Ur,`Where that leaves us`)):r.value===42?(F(),h(`p`,Wr,`Where we got to`)):r.value===43?(F(),h(`p`,Gr,`Reading, and the lab`)):r.value===44?(F(),h(`p`,Kr,`Questions?`)):N(`v-if`,!0)]))}}),Jr={class:`bg-main transform`,shadow:`~`,p:`x-4 y-2`,border:`~ transparent rounded dark:main`},Yr=[`value`,`disabled`],Xr={table:``,"w-full":``,"border-collapse":``},Zr=[`border`,`onClick`],Qr={"text-right":``,op50:``,"text-sm":``,"table-cell":``,"py-2":``,"pl-4":``,"pr-3":``,"vertical-middle":``},$r=Le(j({__name:`Goto`,setup(e){let t=D(),n=D(),r=D(),i=D(),a=D(``),o=D(0),{go:s,slides:u}=V();function m(e){return e!=null}let g=x(()=>new nr(u.value.map(e=>e.meta?.slide).filter(m),{keys:[`no`,`title`],threshold:.3,shouldSort:!0,minMatchCharLength:1})),_=x(()=>a.value.startsWith(`/`)?a.value.substring(1):a.value),b=x(()=>_.value?g.value.search(_.value).map(e=>e.item):[]),S=x(()=>!!b.value.length);function C(){if(S.value){let e=b.value.at(o.value||0);e&&s(e.no)}w()}function w(){a.value=``,z.value=!1}function T(e){e.preventDefault(),o.value++,o.value>=b.value.length&&(o.value=0),E()}function ee(e){e.preventDefault(),o.value--,o.value<=-2&&(o.value=b.value.length-1),E()}function E(){let e=i.value?.[o.value];e&&r.value&&(e.offsetTop+e.offsetHeight>r.value.offsetHeight+r.value.scrollTop?r.value.scrollTo({behavior:`smooth`,top:e.offsetTop+e.offsetHeight-r.value.offsetHeight+1}):e.offsetTop{e?(a.value=``,o.value=0,setTimeout(()=>n.value?.focus(),0)):n.value?.blur()}),d(je,()=>{t.value?.contains(je.value)||w()}),(e,s)=>(F(),h(`div`,{id:`slidev-goto-dialog`,ref_key:`container`,ref:t,class:A([`fixed right-5 transition-all`,p(z)?`top-5`:`-top-20 op0 pointer-events-none`]),"w-90":``,"max-w-90":``,"min-w-90":``},[f(`div`,Jr,[f(`input`,{id:`slidev-goto-input`,ref_key:`input`,ref:n,value:a.value,type:`text`,disabled:!p(z),class:A([`outline-none bg-transparent`,{"text-red-400":!S.value&&a.value}]),placeholder:`Goto...`,onKeydown:[v(C,[`enter`]),v(w,[`escape`]),v(T,[`down`]),v(ee,[`up`])],onInput:te},null,42,Yr)]),p(z)&&b.value.length>0?(F(),h(`div`,{key:0,ref_key:`list`,ref:r,class:`autocomplete-list`,shadow:`~`,border:`~ transparent rounded dark:main`},[f(`ul`,Xr,[(F(!0),h(O,null,l(b.value,(e,t)=>(F(),h(`li`,{ref_for:!0,ref_key:`items`,ref:i,key:e.id,role:`button`,tabindex:`0`,"cursor-pointer":``,hover:`op100`,"table-row":``,"items-center":``,border:t===0?void 0:`t main`,class:A(o.value===t?`bg-active op100`:`op80`),onClick:y(t=>ne(e.no),[`stop`,`prevent`])},[f(`div`,Qr,M(e.no),1),c(p(qr),{"table-cell":``,"py-2":``,"pr-4":``,"w-full":``,no:e.no},null,8,[`no`])],10,Zr))),128))])],512)):N(`v-if`,!0)],2))}}),[[`__scopeId`,`data-v-61e41ebd`]]),ei=D(1),ti=x(()=>_e.value.length),Z=D(0),ni=D(0);function ri(){Z.value>ei.value&&--Z.value}function ii(){Z.valueei.value){let e=Z.value-ni.value;eti.value&&(e=ti.value),Z.value=e}}var si=[`onClick`],ci={class:`text-green font-bold`},li={class:`opacity-50`},ui={key:1,class:`opacity-50`},di={class:`fixed top-4 right-4 z-modal text-gray-400 flex flex-col items-center gap-2`},fi=128,pi=32,mi=j({__name:`QuickOverview`,setup(t){let{currentSlideNo:n,go:r,slides:i}=V();function a(){I.value=!1}function o(e){r(e),a()}function d(e){return e===Z.value}let _=Ee.smaller(`xs`),v=Ee.smaller(`sm`),y=x(()=>_.value?he.width.value-fi:v.value?(he.width.value-fi-pi)/2:300),b=x(()=>Math.floor((he.width.value-fi)/(y.value+pi))),S=D(``);return Ge(`keypress`,e=>{if(!I.value){S.value=``;return}if(e.key===`Enter`){e.preventDefault(),S.value?(o(+S.value),S.value=``):o(Z.value);return}let t=Number.parseInt(e.key.replace(/\D/g,``));if(Number.isNaN(t)){S.value=``;return}if(!S.value&&t===0)return;if(S.value+=String(t),+S.value>i.value.length){S.value=``;return}let n=i.value.findIndex(e=>`/${e.no}`===S.value);n!==-1&&(Z.value=n+1),S.value*10>i.value.length&&(o(+S.value),S.value=``)}),u(()=>{Z.value=n.value,ni.value=b.value}),(t,n)=>(F(),h(O,null,[c(m,{"enter-active-class":`duration-150 ease-out`,"enter-from-class":`opacity-0 scale-102 !backdrop-blur-0px`,"leave-active-class":`duration-200 ease-in`,"leave-to-class":`opacity-0 scale-102 !backdrop-blur-0px`},{default:s(()=>[p(I)?(F(),h(`div`,{key:0,class:`fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)] z-modal bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px select-none`,onClick:a},[f(`div`,{class:`grid gap-y-4 gap-x-8 w-full`,style:g(`grid-template-columns: repeat(auto-fit,minmax(${y.value}px,1fr))`)},[(F(!0),h(O,null,l(p(i),(e,t)=>(F(),h(`div`,{key:e.no,class:`relative`},[f(`div`,{class:A([`inline-block border rounded overflow-hidden bg-main hover:border-primary transition`,d(t+1)||p(Z)===t+1?`border-primary`:`border-main`]),onClick:t=>o(e.no)},[(F(),k(ut,{key:e.no,no:e.no,"use-snapshot":!0,width:y.value,class:`pointer-events-none`},{default:s(()=>[c(mt,{"clicks-context":p(ce)(e,p(Qe)),route:e,"render-context":`overview`},null,8,[`clicks-context`,`route`]),c(ft,{page:e.no},null,8,[`page`])]),_:2},1032,[`no`,`width`]))],10,si),f(`div`,{class:`absolute top-0`,style:g(`left: ${y.value+5}px`)},[S.value&&String(t+1).startsWith(S.value)?(F(),h(O,{key:0},[f(`span`,ci,M(S.value),1),f(`span`,li,M(String(t+1).slice(S.value.length)),1)],64)):(F(),h(`span`,ui,M(t+1),1))],4)]))),128))],4)])):N(`v-if`,!0)]),_:1}),e(f(`div`,di,[c(G,{title:`Close`,class:`text-2xl`,onClick:a},{default:s(()=>[...n[0]||=[f(`div`,{class:`i-carbon:close`},null,-1)]]),_:1}),(F(),k(G,{key:0,as:`a`,title:`Slides Overview`,target:`_blank`,href:`${p(ve)}overview`,"tab-index":`-1`,class:`text-2xl`},{default:s(()=>[...n[1]||=[f(`div`,{class:`i-carbon:list-boxes`},null,-1)]]),_:1},8,[`href`])),N(`v-if`,!0)],512),[[re,p(I)]])],64))}});function hi(){let e=Xe();return x(()=>{let t=lt.value?.getBoundingClientRect();if(!t)return;let n=(e.x.value-t.left)/t.width*100,r=(e.y.value-t.top)/t.height*100;if(!(n<0||n>100||r<0||r>100))return{x:n,y:r}})}var gi={key:0,class:`absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl`},_i=Le(j({__name:`LaserPointer`,setup(e){let t=hi(),{isPresenter:n}=V(),r=x(()=>!n.value&&rt.cursor?.style===`laser`?rt.cursor:xe.value===`laser`?t.value:null);return a(()=>{u(()=>{document.body.classList.toggle(`slidev-self-laser-active`,xe.value===`laser`&&!!r.value)})}),(e,t)=>r.value?(F(),h(`div`,gi,[f(`div`,{class:`laser-pointer`,style:g({left:`${r.value.x}%`,top:`${r.value.y}%`})},null,4)])):N(`v-if`,!0)}}),[[`__scopeId`,`data-v-1d1438ab`]]),vi={render:()=>[]},yi={key:0,class:`bg-main text-main shadow-xl absolute bottom-10 left-0 z-menu py2`,border:`~ main rounded-md`},bi=j({__name:`MenuButton`,props:{modelValue:{default:!1},disabled:{default:!1}},setup(e,{emit:t}){let n=Re(e,`modelValue`,t,{passive:!0}),i=D();return Ke(i,()=>{n.value=!1}),(t,a)=>(F(),h(`div`,{ref_key:`el`,ref:i,class:`flex relative`},[f(`button`,{class:A({disabled:e.disabled}),onClick:a[0]||=e=>n.value=!p(n)},[r(t.$slots,`button`,{value:p(n),class:A({disabled:e.disabled})})],2),(F(),k(S,null,[p(n)?(F(),h(`div`,yi,[r(t.$slots,`menu`)])):N(`v-if`,!0)],1024))],512))}}),xi={border:`~ main rounded`,flex:`~ gap-2 items-center`,relative:``,"h-5":``,"w-5":``,"p0.5":``,"hover:bg-active":``,p1:``},Si=[`disabled`],Ci=j({__name:`FormCheckbox`,props:T({disabled:{type:Boolean}},{modelValue:{type:Boolean,type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let n=i(t,`modelValue`);return(r,i)=>(F(),h(`div`,xi,[f(`div`,{"i-ri-check-line":``,class:A(n.value?``:`op0`)},null,2),e(f(`input`,{"onUpdate:modelValue":i[0]||=e=>n.value=e,type:`checkbox`,absolute:``,"inset-0":``,"opacity-10":``,disabled:t.disabled},null,8,Si),[[_,n.value]])]))}}),wi={"w-30":``,"h-8":``,flex:`~ gap-1 items-center`},Ti={key:0,"w-1.5":``,"h-1.5":``,"bg-primary":``,rounded:``,absolute:``,"top-0":``,"right--2":``},Ei={key:0,"w-1.5":``,"h-1.5":``,"bg-primary":``,rounded:``,absolute:``,"top-0":``,"right--2":``},Di=[`innerHTML`],Q=j({__name:`FormItem`,props:{title:{},nested:{type:[Boolean,Number]},div:{type:Boolean},description:{},dot:{type:Boolean}},emits:[`reset`],setup(e,{emit:t}){let i=t;function a(){i(`reset`)}return(t,i)=>(F(),k(n(e.div?`div`:`label`),{flex:`~ row gap-2 items-center`,"select-none":``},{default:s(()=>[f(`div`,wi,[e.nested?(F(),h(`div`,{key:0,"i-ri-corner-down-right-line":``,op40:``,style:g(typeof e.nested==`number`?{marginLeft:`${e.nested*.5+.5}rem`}:{marginLeft:`0.25rem`})},null,4)):N(`v-if`,!0),e.description?(F(),k(p(te),{key:2,distance:`10`},{popper:s(()=>[f(`div`,{"text-sm":``,"min-w-90":``,innerHTML:e.description},null,8,Di)]),default:s(()=>[f(`div`,{op75:``,"text-right":``,relative:``,onDblclick:a},[ie(M(e.title)+` `,1),e.dot?(F(),h(`div`,Ei)):N(`v-if`,!0)],32)]),_:1})):(F(),h(`div`,{key:1,op75:``,relative:``,onDblclick:a},[ie(M(e.title)+` `,1),e.dot?(F(),h(`div`,Ti)):N(`v-if`,!0)],32))]),r(t.$slots,`default`)]),_:3}))}}),Oi={relative:``,"h-22px":``},ki={key:0,"pointer-events-none":``,absolute:``,"right-1":``,"top-0.5":``,"text-xs":``,op25:``},Ai=j({__name:`FormSlider`,props:T({max:{},min:{},step:{},unit:{},default:{}},{modelValue:{type:Number},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let n=t,r=i(t,`modelValue`);return(i,a)=>(F(),h(O,null,[f(`div`,{relative:``,"h-22px":``,"w-60":``,"flex-auto":``,onDblclick:a[1]||=e=>n.default===void 0?null:r.value=n.default},[e(f(`input`,o({"onUpdate:modelValue":a[0]||=e=>r.value=e,type:`range`,class:`slider`},n,{absolute:``,"bottom-0":``,"left-0":``,"right-0":``,"top-0":``,"z-10":``,"w-full":``,"align-top":``}),null,16),[[E,r.value,void 0,{number:!0}]]),n.default==null?N(`v-if`,!0):(F(),h(`span`,{key:0,border:`r main`,absolute:``,"bottom-0":``,"top-0":``,"h-full":``,"w-1px":``,op75:``,style:g({left:`${(n.default-t.min)/(t.max-t.min)*100}%`})},null,4))],32),f(`div`,Oi,[e(f(`input`,o({"onUpdate:modelValue":a[2]||=e=>r.value=e,type:`number`},n,{border:`~ main rounded`,m0:``,"w-20":``,"bg-gray:5":``,pl2:``,"align-top":``,"text-sm":``}),null,16),[[E,r.value,void 0,{number:!0}]]),n.unit?(F(),h(`span`,ki,M(n.unit),1)):N(`v-if`,!0)])],64))}}),ji={error:0,client:60,Light:60,Dark:240};function Mi(e,t=1){if(ji[e])return Ni(ji[e],t);let n=0;for(let t=0;t!t.text||t.color===!1?{}:{color:typeof t.color==`number`?Ni(t.color):Mi(t.text),background:typeof t.color==`number`?Ni(t.color,.1):Mi(t.text,.1)}),a=x(()=>(t.size||`sm`)===`sm`?`px-1.5 text-11px leading-1.6em`:``);return(o,c)=>(F(),k(n(e.as||`span`),{"ws-nowrap":``,rounded:``,class:A(a.value),style:g(i.value)},{default:s(()=>[r(o.$slots,`default`,{},()=>[f(`span`,{textContent:M(t.text)},null,8,Pi)])]),_:3},8,[`class`,`style`]))}}),Ii={flex:`~ gap-1 items-center`,rounded:``,"bg-gray:4":``,p1:``,"m--1":``},Li=j({__name:`SegmentControl`,props:{options:{},modelValue:{}},emits:[`update:modelValue`],setup(e){return(t,n)=>(F(),h(`div`,Ii,[(F(!0),h(O,null,l(e.options,n=>(F(),k(Fi,{key:n.value,class:A([`px-2 py-1 text-xs font-mono`,n.value===e.modelValue?``:`op50`]),color:n.value===e.modelValue,"aria-pressed":n.value===e.modelValue,size:`none`,text:n.label,as:`button`,onClick:e=>t.$emit(`update:modelValue`,n.value)},null,8,[`class`,`color`,`aria-pressed`,`text`,`onClick`]))),128))]))}}),Ri={"text-sm":``,"select-none":``,flex:`~ col gap-1`,"min-w-30":``,px4:``},zi=j({__name:`Settings`,setup(e){let{isPresenter:t}=V(),{isSupported:n}=Ye();return(e,r)=>(F(),h(`div`,Ri,[c(Q,{title:`Invert`,dot:p(L).invert!==p(R).invert,onReset:r[1]||=e=>p(L).invert=p(R).invert},{default:s(()=>[c(Ci,{modelValue:p(L).invert,"onUpdate:modelValue":r[0]||=e=>p(L).invert=e},null,8,[`modelValue`])]),_:1},8,[`dot`]),c(Q,{title:`Brightness`,dot:p(L).brightness!==p(R).brightness,onReset:r[3]||=e=>p(L).brightness=p(R).brightness},{default:s(()=>[c(Ai,{modelValue:p(L).brightness,"onUpdate:modelValue":r[2]||=e=>p(L).brightness=e,max:1.5,min:.5,step:.02,default:p(R).brightness},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),c(Q,{title:`Contrast`,dot:p(L).contrast!==p(R).contrast,onReset:r[5]||=e=>p(L).contrast=p(R).contrast},{default:s(()=>[c(Ai,{modelValue:p(L).contrast,"onUpdate:modelValue":r[4]||=e=>p(L).contrast=e,max:1.5,min:.5,step:.02,default:p(R).contrast},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),c(Q,{title:`Saturation`,dot:p(L).saturate!==p(R).saturate,onReset:r[7]||=e=>p(L).saturate=p(R).saturate},{default:s(()=>[c(Ai,{modelValue:p(L).saturate,"onUpdate:modelValue":r[6]||=e=>p(L).saturate=e,max:1.5,min:.5,step:.02,default:p(R).saturate},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),c(Q,{title:`Sepia`,dot:p(L).sepia!==p(R).sepia,onReset:r[9]||=e=>p(L).sepia=p(R).sepia},{default:s(()=>[c(Ai,{modelValue:p(L).sepia,"onUpdate:modelValue":r[8]||=e=>p(L).sepia=e,max:2,min:-2,step:.02,default:p(R).sepia},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),c(Q,{title:`Hue Rotate`,dot:p(L).hueRotate!==p(R).hueRotate,onReset:r[11]||=e=>p(L).hueRotate=p(R).hueRotate},{default:s(()=>[c(Ai,{modelValue:p(L).hueRotate,"onUpdate:modelValue":r[10]||=e=>p(L).hueRotate=e,max:180,min:-180,step:.1,default:p(R).hueRotate},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),r[16]||=f(`div`,{class:`h-1px opacity-5 bg-current w-full my2`},null,-1),c(Q,{title:`Cursor Style`},{default:s(()=>[c(Li,{modelValue:p(xe),"onUpdate:modelValue":r[12]||=e=>w(xe)?xe.value=e:null,options:[{label:`Cursor`,value:`cursor`},{label:`Laser`,value:`laser`}]},null,8,[`modelValue`])]),_:1}),p(t)?N(`v-if`,!0):(F(),k(Q,{key:0,title:`Slide Scale`},{default:s(()=>[c(Li,{modelValue:p(ae),"onUpdate:modelValue":r[13]||=e=>w(ae)?ae.value=e:null,options:[{label:`Fit`,value:0},{label:`1:1`,value:1}]},null,8,[`modelValue`])]),_:1})),p(n)?(F(),k(Q,{key:1,title:`Wake Lock`},{default:s(()=>[c(Ci,{modelValue:p(le),"onUpdate:modelValue":r[14]||=e=>w(le)?le.value=e:null},null,8,[`modelValue`])]),_:1})):N(`v-if`,!0),p(t)?N(`v-if`,!0):(F(),k(Q,{key:2,title:`Hide Idle Cursor`},{default:s(()=>[c(Ci,{modelValue:p(we),"onUpdate:modelValue":r[15]||=e=>w(we)?we.value=e:null},null,8,[`modelValue`])]),_:1}))]))}}),Bi={class:`select-list`},Vi={class:`title`},Hi={class:`items`},Ui=[`onClick`],Wi=Le(j({__name:`SelectList`,props:{modelValue:{type:[Object,String,Number,Boolean]},title:{type:String},items:{type:Array}},setup(e,{emit:t}){let n=Re(e,`modelValue`,t,{passive:!0});return(t,r)=>(F(),h(`div`,Bi,[f(`div`,Vi,M(e.title),1),f(`div`,Hi,[(F(!0),h(O,null,l(e.items,e=>(F(),h(`div`,{key:e.value,class:A([`item`,{active:p(n)===e.value}]),onClick:()=>{n.value=e.value,e.onClick?.()}},[f(`div`,{class:A([`i-carbon:checkmark text-green-500 mya`,{"opacity-0":p(n)!==e.value}])},null,2),f(`div`,{class:A({"opacity-50":p(n)!==e.value})},M(e.display||e.value),3)],10,Ui))),128))])]))}}),[[`__scopeId`,`data-v-aa3b28a6`]]),Gi={"text-sm":``,flex:`~ col gap-2`},Ki={px3:``,"ws-nowrap":``},qi={"font-bold":``,"text-primary":``},Ji=j({__name:`SyncControls`,setup(e){let{isPresenter:t}=V(),n=x({get:()=>t.value?B.value.presenterReceive:B.value.viewerReceive,set(e){t.value?B.value.presenterReceive=e:B.value.viewerReceive=e}}),r=x({get:()=>t.value?B.value.presenterSend:B.value.viewerSend,set(e){t.value?B.value.presenterSend=e:B.value.viewerSend=e}}),i=x({get:()=>n.value&&r.value?`bidirectional`:n.value&&!r.value?`receive-only`:!n.value&&r.value?`send-only`:`off`,set(e){switch(e){case`bidirectional`:n.value=!0,r.value=!0;break;case`receive-only`:n.value=!0,r.value=!1;break;case`send-only`:n.value=!1,r.value=!0;break;case`off`:n.value=!1,r.value=!1}}});return(e,a)=>(F(),k(bi,null,{button:s(()=>[c(G,{title:`Change sync settings`},{default:s(()=>[f(`div`,{class:A([`i-ph:arrow-up-bold mx--1.2 scale-x-80`,r.value?`text-green6 dark:text-green`:`op30`])},null,2),f(`div`,{class:A([`i-ph:arrow-down-bold mx--1.2 scale-x-80`,n.value?`text-green6 dark:text-green`:`op30`])},null,2)]),_:1})]),menu:s(()=>[f(`div`,Gi,[f(`div`,Ki,[a[1]||=f(`span`,{op75:``},`Slides navigation syncing for `,-1),f(`span`,qi,M(p(t)?`presenter`:`viewer`),1)]),a[2]||=f(`div`,{class:`h-1px opacity-10 bg-current w-full`},null,-1),c(Wi,{modelValue:i.value,"onUpdate:modelValue":a[0]||=e=>i.value=e,title:`Sync Mode`,items:[{value:`bidirectional`,display:`Bidirectional Sync`},{value:`receive-only`,display:`Receive Only`},{value:`send-only`,display:`Send Only`},{value:`off`,display:`Disable`}]},null,8,[`modelValue`])])]),_:1}))}}),Yi={key:0,class:`i-carbon:minimize`},Xi={key:1,class:`i-carbon:maximize`},Zi={key:0,class:`i-carbon-moon`},Qi={key:1,class:`i-carbon-sun`},$i={key:0,class:`i-carbon-magic-wand-filled color-red-600 dark:color-red-400`},ea={key:1,class:`i-carbon-magic-wand`},ta={key:0,class:`i-ph-cursor-fill`},na={key:1,class:`i-ph-cursor-duotone`},ra={key:0,"w-2":``,"h-2":``,"bg-primary":``,"rounded-full":``,absolute:``,"top-0.5":``,"right-0.5":``},ia={class:`px2 my-auto`},aa={class:`text-lg`},oa={class:`opacity-50 text-sm`},sa=j({__name:`NavControls`,props:{persist:{default:!1}},setup(e){let t=e,{currentSlideNo:n,hasNext:r,hasPrev:i,isEmbedded:a,isPresenter:o,isPresenterAvailable:l,next:u,prev:d,total:m,enterPresenter:_,exitPresenter:v}=V(),{brush:y,drawingEnabled:S}=st(),C=Ee.smaller(`md`),{isFullscreen:w,toggle:T}=Ne,ee=D();function E(){ee.value&&je.value&&ee.value.contains(je.value)&&je.value.blur()}let te=x(()=>t.persist?`text-$slidev-controls-foreground bg-transparent`:`rounded-md bg-main shadow-xl border border-main`),ne=b();return(e,t)=>(F(),h(`nav`,{ref_key:`root`,ref:ee,class:`flex flex-col`},[f(`div`,{class:A([`flex flex-wrap-reverse text-xl gap-0.5 p-1 lg:p-2`,te.value]),onMouseleave:E},[p(a)?N(`v-if`,!0):(F(),k(G,{key:0,title:p(w)?`Close fullscreen`:`Enter fullscreen`,onClick:p(T)},{default:s(()=>[p(w)?(F(),h(`div`,Yi)):(F(),h(`div`,Xi))]),_:1},8,[`title`,`onClick`])),c(G,{disabled:!p(i),title:`Go to previous slide`,onClick:p(d)},{default:s(()=>[...t[6]||=[f(`div`,{class:`i-carbon:arrow-left`},null,-1)]]),_:1},8,[`disabled`,`onClick`]),c(G,{disabled:!p(r),title:`Go to next slide`,onClick:p(u)},{default:s(()=>[...t[7]||=[f(`div`,{class:`i-carbon:arrow-right`},null,-1)]]),_:1},8,[`disabled`,`onClick`]),p(a)?N(`v-if`,!0):(F(),k(G,{key:1,title:`Show slide overview`,onClick:t[0]||=e=>p(ue)()},{default:s(()=>[...t[8]||=[f(`div`,{class:`i-carbon:apps`},null,-1)]]),_:1})),p(et)?N(`v-if`,!0):(F(),k(G,{key:2,title:p(it)?`Switch to light mode theme`:`Switch to dark mode theme`,onClick:t[1]||=e=>p(nt)()},{default:s(()=>[p(it)?(F(),h(`div`,Zi)):(F(),h(`div`,Qi))]),_:1},8,[`title`])),c(ct),p(a)?N(`v-if`,!0):(F(),h(O,{key:3},[!p(o)&&!p(C)&&ne.value?(F(),h(O,{key:0},[c(p(ne)),c(ct)],64)):N(`v-if`,!0),p(o)?(F(),k(G,{key:1,title:p(xe)===`laser`?p(fe)?`Disable laser pointer`:`Enable laser pointer`:p(fe)?`Hide presenter cursor`:`Show presenter cursor`,active:p(fe),onClick:t[2]||=e=>p(de)()},{default:s(()=>[p(xe)===`laser`?(F(),h(O,{key:0},[p(fe)?(F(),h(`div`,$i)):(F(),h(`div`,ea))],64)):(F(),h(O,{key:1},[p(fe)?(F(),h(`div`,ta)):(F(),h(`div`,na))],64))]),_:1},8,[`title`,`active`])):N(`v-if`,!0),!p(H).drawings.presenterOnly||p(o)?(F(),k(G,{key:2,class:`relative`,title:p(S)?`Hide drawing toolbar`:`Show drawing toolbar`,active:p(S),onClick:t[3]||=e=>S.value=!p(S)},{default:s(()=>[t[9]||=f(`div`,{class:`i-carbon:pen`},null,-1),p(S)?(F(),h(`div`,{key:0,class:`absolute left-1 right-1 bottom-0 h-0.7 rounded-full`,style:g({background:p(y).color})},null,4)):N(`v-if`,!0)]),_:1},8,[`title`,`active`])):N(`v-if`,!0),c(ct),p(o)?(F(),k(G,{key:3,title:`Play Mode`,onClick:p(v)},{default:s(()=>[...t[10]||=[f(`div`,{class:`i-carbon:presentation-file`},null,-1)]]),_:1},8,[`onClick`])):N(`v-if`,!0),p(l)?(F(),k(G,{key:4,title:`Presenter Mode`,onClick:p(_)},{default:s(()=>[...t[11]||=[f(`div`,{class:`i-carbon:user-speaker`},null,-1)]]),_:1},8,[`onClick`])):N(`v-if`,!0),N(`v-if`,!0)],64)),(F(),h(O,{key:4},[p(H).download?(F(),k(G,{key:0,title:`Download as PDF`,onClick:p(tt)},{default:s(()=>[...t[13]||=[f(`div`,{class:`i-carbon:download`},null,-1)]]),_:1},8,[`onClick`])):N(`v-if`,!0)],64)),N(`v-if`,!0),!p(o)&&p(H).info&&!p(a)?(F(),k(G,{key:6,title:`Show info`,onClick:t[5]||=e=>se.value=!p(se)},{default:s(()=>[...t[15]||=[f(`div`,{class:`i-carbon:information`},null,-1)]]),_:1})):N(`v-if`,!0),p(a)?N(`v-if`,!0):(F(),h(O,{key:7},[c(ct),p(o)?(F(),k(G,{key:0,title:`Toggle Presenter Layout`,class:`aspect-ratio-initial flex items-center`,onClick:p(pe)},{default:s(()=>[t[16]||=f(`div`,{class:`i-carbon:template`},null,-1),ie(` `+M(p(Se)),1)]),_:1},8,[`onClick`])):N(`v-if`,!0),(F(),k(Ji,{key:1})),c(bi,null,{button:s(({value:e})=>[c(G,{title:`More Options`,active:e},{default:s(()=>[t[17]||=f(`div`,{class:`i-carbon:settings-adjust`},null,-1),p(Ce)?(F(),h(`div`,ra)):N(`v-if`,!0)]),_:1},8,[`active`])]),menu:s(()=>[c(zi)]),_:1})],64)),p(a)?N(`v-if`,!0):(F(),k(ct,{key:8})),f(`div`,ia,[f(`span`,aa,M(p(n)),1),f(`span`,oa,` / `+M(p(m)),1)]),c(p(vi))],34)],512))}}),ca=new Set,la=new Set,ua=/\/$/;function da(e){return e.startsWith(`http`)||e.startsWith(`//`)?e:`${`./`.replace(ua,``)}${e.startsWith(`/`)?e:`/${e}`}`}var fa=2,pa=new Map,ma=D(0),ha=D(0),ga=x(()=>ha.value===0?1:ma.value/ha.value);x(()=>ga.value>=1);function _a(e){let t=da(e);if(ca.has(t)||la.has(t))return;la.add(t);let n=new Image;n.onload=()=>{la.delete(t),ca.add(t),pa.delete(t),ma.value=ca.size},n.onerror=()=>{la.delete(t);let n=pa.get(t)??0;n{let e=r.value;if(!e?.length)return;let t=new Set;for(let n of e)for(let e of n.meta?.slide?.images??[])t.add(da(e));ha.value=t.size}),u(()=>{let i=e.value,o=r.value;if(!i||!o?.length)return;va(i),va(t.value),va(n.value);let s=i.no-1;for(let e=1;e<=a;e++){let t=s+e;t{let t=r.value,n=setTimeout(()=>{if(t?.length)for(let e of t)va(e)},3e3);e(()=>clearTimeout(n))})}function ba(){let e=He(),t=D(!1),n,r,i=typeof document<`u`&&`startViewTransition`in document;return e.beforeResolve((e,a)=>{let o=Ie(a.params.no)?.meta,s=Ie(e.params.no)?.meta,c=o?.slide?.no,l=s?.slide?.no;if((c!=null&&l!=null&&c!==l&&((c{n=e,r=t}),d,f=new Promise(e=>d=e);return setTimeout(()=>{document.startViewTransition(()=>(d(),u))},50),f}),i&&e.afterEach(()=>{n?.(),r?.()}),t}var xa=[`data-drag-id`],$=10,Sa=10,Ca=`absolute border border-gray bg-gray dark:border-gray-500 dark:bg-gray-800 bg-opacity-30 `,wa=20,Ta=j({__name:`DragControl`,props:{data:{}},setup(e){let{dragId:n,zoom:r,autoHeight:i,x0:a,y0:o,width:s,height:c,rotate:l,isArrow:d}=e.data,m=ee(Ze,D(1)),_=x(()=>m.value*r.value),{left:v,top:y}=at(),b=d?-1/0:40,S=x(()=>l.value*Math.PI/180),C=x(()=>Math.sin(S.value)),w=x(()=>Math.cos(S.value)),T=x(()=>s.value*w.value+c.value*C.value),E=x(()=>s.value*C.value+c.value*w.value),te=x(()=>a.value-T.value/2),ne=x(()=>o.value-E.value/2),re=x(()=>a.value+T.value/2),k=x(()=>o.value+E.value/2),j=x(()=>d&&s.value<0),ie=x(()=>d&&c.value<0),M=null;function ae(e){if(e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=e.target.getBoundingClientRect(),n=s.value*w.value-c.value*C.value,r=s.value*C.value+c.value*w.value,i=s.value*w.value+c.value*C.value,u=-s.value*C.value+c.value*w.value;M={x0:a.value,y0:o.value,width:s.value,height:c.value,rotate:l.value,dx0:e.clientX-(t.left+t.right)/2,dy0:e.clientY-(t.top+t.bottom)/2,ltx:a.value-n/2,lty:o.value-r/2,rtx:a.value+i/2,rty:o.value-u/2,lbx:a.value-i/2,lby:o.value+u/2,rbx:a.value+n/2,rby:o.value+r/2},e.currentTarget.setPointerCapture(e.pointerId)}function oe(e){if(!M||e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=(e.clientX-v.value-M.dx0)/_.value,n=(e.clientY-y.value-M.dy0)/_.value;a.value=Oe(t,-T.value/2+Sa,me.value+T.value/2-Sa),o.value=Oe(n,-E.value/2+Sa,ye.value+E.value/2-Sa)}function I(e){M&&=(e.preventDefault(),e.stopPropagation(),null)}function se(e,t){return{onPointerdown:ae,onPointermove:n=>{if(!M||n.buttons!==1)return;n.preventDefault(),n.stopPropagation();let r=(n.clientX-v.value)/_.value,i=(n.clientY-y.value)/_.value,{ltx:l,lty:u,rtx:d,rty:f,lbx:p,lby:m,rbx:h,rby:g}=M,x=M.width/M.height,S=Math.max(b,b*x);function T(e,t){if(n.shiftKey){let n=Math.max(e,t*x,S);return{w:n,h:n/x}}return{w:Math.max(e,b),h:Math.max(t,b)}}if(e){if(t){let{w:e,h:t}=T((h-r)*w.value+(g-i)*C.value,-(h-r)*C.value+(g-i)*w.value);r=h-e*w.value+t*C.value,i=g-e*C.value-t*w.value}else{let{w:e,h:t}=T((d-r)*w.value-(i-f)*C.value,(d-r)*C.value+(i-f)*w.value);r=d-e*w.value-t*C.value,i=f-e*C.value+t*w.value}}else if(t){let{w:e,h:t}=T((r-p)*w.value-(m-i)*C.value,(r-p)*C.value+(m-i)*w.value);r=p+e*w.value+t*C.value,i=m+e*C.value-t*w.value}else{let{w:e,h:t}=T((r-l)*w.value+(i-u)*C.value,-(r-l)*C.value+(i-u)*w.value);r=l+e*w.value-t*C.value,i=u+e*C.value+t*w.value}e?t?(a.value=(r+h)/2,o.value=(i+g)/2,s.value=(h-r)*w.value+(g-i)*C.value,c.value=-(h-r)*C.value+(g-i)*w.value):(a.value=(r+d)/2,o.value=(i+f)/2,s.value=(d-r)*w.value-(i-f)*C.value,c.value=(d-r)*C.value+(i-f)*w.value):t?(a.value=(r+p)/2,o.value=(i+m)/2,s.value=(r-p)*w.value-(m-i)*C.value,c.value=(r-p)*C.value+(m-i)*w.value):(a.value=(r+l)/2,o.value=(i+u)/2,s.value=(r-l)*w.value+(i-u)*C.value,c.value=-(r-l)*C.value+(i-u)*w.value)},onPointerup:I,style:{width:`${$}px`,height:`${$}px`,margin:`-${$/2}px`,left:e===j.value?void 0:`0`,right:e===j.value?`0`:void 0,top:t===ie.value?void 0:`0`,bottom:t===ie.value?`0`:void 0,cursor:d?`move`:+e+ +t==1?`nesw-resize`:`nwse-resize`,borderRadius:d?`50%`:void 0},class:Ca}}function L(e){return{onPointerdown:ae,onPointermove:t=>{if(!M||t.buttons!==1)return;t.preventDefault(),t.stopPropagation();let n=(t.clientX-v.value)/_.value,r=(t.clientY-y.value)/_.value,{ltx:i,lty:l,rtx:u,rty:d,lbx:f,lby:p,rbx:m,rby:h}=M;if(e===`l`){let e=(u+m)/2,t=(d+h)/2;s.value=Math.max((e-n)*w.value+(t-r)*C.value,b),a.value=e-s.value*w.value/2,o.value=t-s.value*C.value/2}else if(e===`r`){let e=(i+f)/2,t=(l+p)/2;s.value=Math.max((n-e)*w.value+(r-t)*C.value,b),a.value=e+s.value*w.value/2,o.value=t+s.value*C.value/2}else if(e===`t`){let e=(f+m)/2,t=(p+h)/2;c.value=Math.max((t-r)*w.value-(e-n)*C.value,b),a.value=e+c.value*C.value/2,o.value=t-c.value*w.value/2}else if(e===`b`){let e=(i+u)/2,t=(l+d)/2;c.value=Math.max((r-t)*w.value-(n-e)*C.value,b),a.value=e-c.value*C.value/2,o.value=t+c.value*w.value/2}},onPointerup:I,style:{width:`${$}px`,height:`${$}px`,margin:`-${$/2}px`,left:e===`l`?`0`:e===`r`?`100%`:`50%`,top:e===`t`?`0`:e===`b`?`100%`:`50%`,cursor:`lr`.includes(e)?`ew-resize`:`ns-resize`,borderRadius:`50%`},class:Ca}}function ce(){return{onPointerdown:ae,onPointermove:e=>{if(!M||e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=(e.clientX-v.value-M.dx0)/_.value-$/4,n=(e.clientY-y.value-M.dy0)/_.value-$/4,r=Math.atan2(n-o.value,t-a.value)*180/Math.PI+90;for(let e of[0,90,180,270,360])if(Math.abs(r-e)<5){r=e%360;break}l.value=r},onPointerup:I,style:{width:`${$}px`,height:`${$}px`,margin:`-${$/2}px`,left:`50%`,top:`-20px`,cursor:`grab`,borderRadius:`50%`},class:Ca}}let R={immediate:!1,immediateCallback:!1},le=ze(()=>{re.value<=Sa||a.value--},wa,R),ue=ze(()=>{te.value>=me.value-Sa||a.value++},wa,R),de=ze(()=>{k.value<=Sa||o.value--},wa,R),fe=ze(()=>{ne.value>=ye.value-Sa||o.value++},wa,R);return u(()=>{function e(e,t){Fe[e].value?t.resume():t.pause()}e(`left`,le),e(`right`,ue),e(`up`,de),e(`down`,fe)}),(e,u)=>Number.isFinite(p(a))?(F(),h(`div`,{key:0,id:`drag-control-container`,"data-drag-id":p(n),style:g({position:`absolute`,zIndex:100,left:`${p(r)*(p(a)-Math.abs(p(s))/2)}px`,top:`${p(r)*(p(o)-Math.abs(p(c))/2)}px`,width:`${p(r)*Math.abs(p(s))}px`,height:`${p(r)*Math.abs(p(c))}px`,transformOrigin:`center center`,transform:`rotate(${p(l)}deg)`}),onPointerdown:ae,onPointermove:oe,onPointerup:I},[f(`div`,{class:A([`absolute inset-0 z-nav dark:b-gray-400`,p(d)?``:`b b-dark`])},[p(i)?N(`v-if`,!0):(F(),h(O,{key:0},[f(`div`,P(t(se(!0,!0))),null,16),f(`div`,P(t(se(!1,!1))),null,16),p(d)?N(`v-if`,!0):(F(),h(O,{key:0},[f(`div`,P(t(se(!0,!1))),null,16),f(`div`,P(t(se(!1,!0))),null,16)],64))],64)),p(d)?N(`v-if`,!0):(F(),h(O,{key:1},[f(`div`,P(t(L(`l`))),null,16),f(`div`,P(t(L(`r`))),null,16),p(i)?N(`v-if`,!0):(F(),h(O,{key:0},[f(`div`,P(t(L(`t`))),null,16),f(`div`,P(t(L(`b`))),null,16)],64)),f(`div`,P(t(ce())),null,16),f(`div`,{class:`absolute -top-15px w-0 b b-dashed b-dark dark:b-gray-400`,style:g({left:`calc(50% - 1px)`,height:p(i)?`14px`:`10px`})},null,4)],64))],2)],44,xa)):N(`v-if`,!0)}}),Ea=Le(j({__name:`SlidesShow`,props:{renderContext:{}},setup(t){let{currentSlideRoute:r,currentTransition:i,getPrimaryClicks:a,prevRoute:d,nextRoute:f,slides:m,isPrintMode:g,isPrintWithClicks:_,clicksDirection:v,printRange:y}=V();function S(e){e.meta.preload!==!1&&(e.meta.__preloaded=!0,e.load())}u(()=>{S(r.value),S(d.value),S(f.value)}),u(e=>{let t=m.value,n=setTimeout(()=>{t.forEach(S)},3e3);e(()=>clearTimeout(n))}),ya(r,d,f,m);let w=ba(),T=b();Ae(()=>import(`./DrawingLayer-BLLWTnj4.js`).then(e=>T.value=e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url);let ee=x(()=>g.value?y.value.map(e=>m.value[e-1]):m.value.filter(e=>e.meta?.__preloaded||e===r.value));function E(){ke.value=!0,C()}return(u,d)=>(F(),h(O,null,[N(` Global Bottom `),c(p(dt)),N(` Slides `),(F(),k(n(p(w)&&!p(g)&&!p(ke)&&!p(Me)?`div`:ne),o(p(ke)||p(Me)||p(g)?{}:p(i),{id:`slideshow`,tag:`div`,class:{"slidev-nav-go-forward":p(v)>0,"slidev-nav-go-backward":p(v)<0},onAfterLeave:E}),{default:s(()=>[(F(!0),h(O,null,l(ee.value,n=>e((F(),k(mt,{key:n.no,"clicks-context":p(g)&&!p(_)?p(ce)(n,p(Qe)):p(a)(n),route:n,"render-context":t.renderContext},null,8,[`clicks-context`,`route`,`render-context`])),[[re,n===p(r)]])),128))]),_:1},16,[`class`])),p(De)?(F(),k(Ta,{key:0,data:p(De)},null,8,[`data`])):N(`v-if`,!0),N(` Global Top `),c(p(pt)),T.value?(F(),k(p(T),{key:1})):N(`v-if`,!0)],64))}}),[[`__scopeId`,`data-v-835d2635`]]),Da=Object.assign({}),Oa=Object.assign({}),ka=Object.assign({}),Aa=[Object.values(Da)[0],Object.values(Oa)[0],Object.values(ka)[0]].filter(Boolean);function ja(){let{go:e,goFirst:t,goLast:n,next:r,nextSlide:i,prev:a,prevSlide:o}=V(),{drawingEnabled:s}=st(),{escape:c,space:l,shift:u,left:d,right:f,up:p,down:m,enter:h,d:g,g:_,o:v,"`":y}=Fe,b={next:r,prev:a,nextSlide:i,prevSlide:o,go:e,goFirst:t,goLast:n,downloadPDF:tt,toggleDark:nt,toggleOverview:ue,toggleDrawing:()=>s.value=!s.value,escapeOverview:()=>I.value=!1,showGotoDialog:()=>z.value=!z.value},x=W(U(I),U(De)),S=[{name:`next_space`,key:W(l,U(u)),fn:r,autoRepeat:!0},{name:`prev_space`,key:W(l,u),fn:a,autoRepeat:!0},{name:`next_right`,key:W(f,U(u),x),fn:r,autoRepeat:!0},{name:`prev_left`,key:W(d,U(u),x),fn:a,autoRepeat:!0},{name:`next_page_key`,key:`pageDown`,fn:r,autoRepeat:!0},{name:`prev_page_key`,key:`pageUp`,fn:a,autoRepeat:!0},{name:`next_down`,key:W(m,x),fn:i,autoRepeat:!0},{name:`prev_up`,key:W(p,x),fn:o,autoRepeat:!0},{name:`next_shift`,key:W(f,u),fn:i,autoRepeat:!0},{name:`prev_shift`,key:W(d,u),fn:o,autoRepeat:!0},{name:`toggle_dark`,key:W(g,U(s)),fn:nt},{name:`toggle_overview`,key:W(qe(v,y),U(s)),fn:ue},{name:`hide_overview`,key:W(c,U(s)),fn:()=>I.value=!1},{name:`goto`,key:W(_,U(s)),fn:()=>z.value=!z.value},{name:`next_overview`,key:W(f,I),fn:ii},{name:`prev_overview`,key:W(d,I),fn:ri},{name:`up_overview`,key:W(p,I),fn:ai},{name:`down_overview`,key:W(m,I),fn:oi},{name:`goto_from_overview`,key:W(h,I),fn:()=>{e(Z.value),I.value=!1}}],C=new Set(S.map(e=>e.name));for(let e of Aa)S=e(b,S);if(S.filter(e=>e.name&&C.has(e.name)).length===0){let e=[`========== WARNING ==========`,`defineShortcutsSetup did not return any of the base shortcuts.`,`See https://sli.dev/custom/config-shortcuts.html for migration.`,`If it is intentional, return at least one shortcut with one of the base names (e.g. name:"goto").`].join(` + +`);alert(e),console.warn(e)}return S}function Ma(){let{isPrintMode:e}=V(),t=W(U(Te),U(be),U(e),ge,U(oe)),n=ja();new Map(n.map(e=>[e.key,e])).forEach(e=>{e.fn&&r(e.key,e.fn,e.autoRepeat)}),i(`f`,()=>Ne.toggle());function r(e,n,r=!1){typeof e==`string`&&(e=Fe[e]);let i=W(e,t),a=0,o,s=()=>{if(clearTimeout(o),!i.value){a=0;return}r&&(o=setTimeout(s,Math.max(1e3-a*250,150)),a++),n()};return d(i,s,{flush:`sync`})}function i(e,n){return Je(e,e=>{t.value&&(e.repeat||n())})}}export{_i as a,$r as c,gt as d,ht as f,Li as i,Nt as l,Ea as n,hi as o,sa as r,mi as s,Ma as t,Et as u}; \ No newline at end of file diff --git a/lecture-06/class/assets/useDrawings-BkbsP5qo.js b/lecture-06/class/assets/useDrawings-BkbsP5qo.js new file mode 100644 index 0000000000000000000000000000000000000000..c8bf86d5c613a115f2af43a1669004d16d1f9132 --- /dev/null +++ b/lecture-06/class/assets/useDrawings-BkbsP5qo.js @@ -0,0 +1 @@ +import{N as e,Y as t,at as n,g as r,lt as i,st as a}from"./modules/shiki-BFOesOFp.js";import{g as o,t as s,tt as c}from"./useNav-D8SbgLr9.js";import{D as l,g as u}from"./modules/vue-Ymwlffw_.js";import{c as d,l as f,s as p}from"./index-DvHcJSI0.js";var m=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r{this.events[e]=this.events[e]?.filter(e=>t!==e)}}});function h(e,t){return e-t}function g(e){return e<0?-1:1}function _(e){return[Math.abs(e),g(e)]}function v(){let e=()=>((1+Math.random())*65536|0).toString(16).substring(1);return`${e()+e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}var y=2;function b(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`defs`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`marker`),i=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return i.setAttribute(`fill`,t),r.setAttribute(`id`,e),r.setAttribute(`viewBox`,`0 -5 10 10`),r.setAttribute(`refX`,`5`),r.setAttribute(`refY`,`0`),r.setAttribute(`markerWidth`,`4`),r.setAttribute(`markerHeight`,`4`),r.setAttribute(`orient`,`auto`),i.setAttribute(`d`,`M0,-5L10,0L0,5`),r.appendChild(i),n.appendChild(r),n}function x(e,t){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function S(e,t,n){let r=t.x,i=t.y,a=n.x-r,o=n.y-i;if(a!==0||o!==0){let t=((e.x-r)*a+(e.y-i)*o)/(a*a+o*o);t>1?(r=n.x,i=n.y):t>0&&(r+=a*t,i+=o*t)}return a=e.x-r,o=e.y-i,a*a+o*o}function C(e,t){let n=e[0],r=[n],i;for(let a=1,o=e.length;at&&(r.push(i),n=i);return n!==i&&i&&r.push(i),r}function w(e,t,n,r,i){let a=r,o=0;for(let r=t+1;ra&&(o=r,a=i)}a>r&&(o-t>1&&w(e,t,o,r,i),i.push(e[o]),n-o>1&&w(e,o,n,r,i))}function T(e,t){let n=e.length-1,r=[e[0]];return w(e,0,n,t,r),r.push(e[n]),r}function E(e,t,n=!1){if(e.length<=2)return e;let r=t===void 0?1:t*t;return e=n?e:C(e,r),e=T(e,r),e}var D=class{constructor(e){this.drauu=e,this.event=void 0,this.point=void 0,this.start=void 0,this.el=null}onSelected(e){}onUnselected(){}onStart(e){}onMove(e){return!1}onEnd(e){}get brush(){return this.drauu.brush}get shiftPressed(){return this.drauu.shiftPressed}get altPressed(){return this.drauu.altPressed}get svgElement(){return this.drauu.el}getMousePosition(e){let t=this.drauu.el,n=this.drauu.options.cssZoom??1,r=this.drauu.options.coordinateScale??1,i=this.drauu.options.offset??{x:0,y:0};if(this.drauu.options.coordinateTransform===!1){let t=this.drauu.el.getBoundingClientRect();return{x:(e.pageX/n-t.left+i.x)*r,y:(e.pageY/n-t.top+i.y)*r,pressure:e.pressure}}{let a=this.drauu.svgPoint;a.x=e.clientX/n+i.x,a.y=e.clientY/n+i.y;let o=a.matrixTransform(t.getScreenCTM()?.inverse());return{x:o.x*r,y:o.y*r,pressure:e.pressure}}}createElement(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,e),r=t?{...this.brush,...t}:this.brush;return n.setAttribute(`fill`,r.fill??`transparent`),n.setAttribute(`stroke`,r.color),n.setAttribute(`stroke-width`,r.size.toString()),n.setAttribute(`stroke-linecap`,`round`),r.dasharray&&n.setAttribute(`stroke-dasharray`,r.dasharray),n}attr(e,t){this.el.setAttribute(e,typeof t==`string`?t:t.toFixed(y))}_setEvent(e){this.event=e,this.point=this.getMousePosition(e)}_eventDown(e){return this._setEvent(e),this.start=this.point,this.onStart(this.point)}_eventMove(e){return this._setEvent(e),this.onMove(this.point)}_eventUp(e){return this._setEvent(e),this.onEnd(this.point)}},O=class e extends D{constructor(...e){super(...e),this.points=[],this.count=0}onStart(e){if(this.el=this.createElement(`path`,{fill:`transparent`}),this.points=[e],this.brush.arrowEnd){this.arrowId=v();let e=b(this.arrowId,this.brush.color);this.el.appendChild(e)}return this.el}onMove(t){return this.el||this.onStart(t),this.points[this.points.length-1]!==t&&(this.points.push(t),this.count+=1),this.count>5&&(this.points=E(this.points,1,!0),this.count=0),this.attr(`d`,e.toSvgData(this.points)),!0}onEnd(){let t=this.el;if(this.el=null,!t)return!1;if(t.setAttribute(`d`,e.toSvgData(E(this.points,1,!0))),!t.getTotalLength()){let{x:e,y:n}=this.points[0],r=this.brush.size/2;t.setAttribute(`d`,`M ${e-r} ${n} a ${r},${r} 0 1,0 ${r*2},0 a ${r},${r} 0 1,0 ${-r*2},0`),t.setAttribute(`fill`,this.brush.color),t.setAttribute(`stroke-width`,`0`)}return!0}static line(e,t){let n=t.x-e.x,r=t.y-e.y;return{length:Math.sqrt(n**2+r**2),angle:Math.atan2(r,n)}}static controlPoint(t,n,r,i){let a=n||t,o=r||t,s=e.line(a,o),c=s.angle+(i?Math.PI:0),l=s.length*.2;return{x:t.x+Math.cos(c)*l,y:t.y+Math.sin(c)*l}}static bezierCommand(t,n,r){let i=e.controlPoint(r[n-1],r[n-2],t),a=e.controlPoint(t,r[n-1],r[n+1],!0);return`C ${i.x.toFixed(y)},${i.y.toFixed(y)} ${a.x.toFixed(y)},${a.y.toFixed(y)} ${t.x.toFixed(y)},${t.y.toFixed(y)}`}static toSvgData(t){return t.reduce((t,n,r,i)=>r===0?`M ${n.x.toFixed(y)},${n.y.toFixed(y)}`:`${t} ${e.bezierCommand(n,r,i)}`,``)}},k=class extends D{onStart(e){return this.el=this.createElement(`ellipse`),this.attr(`cx`,e.x),this.attr(`cy`,e.y),this.el}onMove(e){if(!this.el||!this.start)return!1;let[t,n]=_(e.x-this.start.x),[r,i]=_(e.y-this.start.y);if(this.shiftPressed){let e=Math.min(t,r);t=e,r=e}if(this.altPressed)this.attr(`cx`,this.start.x),this.attr(`cy`,this.start.y),this.attr(`rx`,t),this.attr(`ry`,r);else{let[e,a]=[this.start.x,this.start.x+t*n].sort(h),[o,s]=[this.start.y,this.start.y+r*i].sort(h);this.attr(`cx`,(e+a)/2),this.attr(`cy`,(o+s)/2),this.attr(`rx`,(a-e)/2),this.attr(`ry`,(s-o)/2)}return!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(!e.getTotalLength())return!1}catch{return!1}return!0}},A=class extends D{constructor(...e){super(...e),this.pathSubFactor=20,this.pathFragments=[],this._erased=[]}onSelected(e){let t=(e,n)=>{if(e&&e.length)for(let r=0;re.forEach(e=>this.drauu._restoreNode(e)),redo:()=>e.forEach(e=>this.drauu._removeNode(e))}}checkAndEraseElement(){if(this.pathFragments.length)for(let e=0;e!this._erased.includes(e.element))),this._erased.length>0}lineLineIntersect(e,t){let n=e.x1,r=e.x2,i=t.x1,a=t.x2,o=e.y1,s=e.y2,c=t.y1,l=t.y2,u=(n-r)*(c-l)-(o-s)*(i-a),d=(n*s-o*r)*(i-a)-(n-r)*(i*l-c*a),f=(n*s-o*r)*(c-l)-(o-s)*(i*l-c*a),p=(e,t,n)=>e>=t&&e<=n||e>=n&&e<=t;if(u===0)return!1;{let e={x:d/u,y:f/u};return p(e.x,n,r)&&p(e.y,o,s)&&p(e.x,i,a)&&p(e.y,c,l)}}},j=class extends D{onStart(e){if(this.el=this.createElement(`line`,{fill:`transparent`}),this.attr(`x1`,e.x),this.attr(`y1`,e.y),this.attr(`x2`,e.x),this.attr(`y2`,e.y),this.brush.arrowEnd){let e=v(),t=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return t.append(b(e,this.brush.color)),t.append(this.el),this.attr(`marker-end`,`url(#${e})`),t}return this.el}onMove(e){if(!this.el)return!1;let{x:t,y:n}=e;if(this.shiftPressed){let r=e.x-this.start.x,i=e.y-this.start.y;if(i!==0){let e=r/i;e=Math.round(e),Math.abs(e)<=1?(t=this.start.x+i*e,n=this.start.y+i):(t=this.start.x+r,n=this.start.y)}}return this.altPressed?(this.attr(`x1`,this.start.x*2-t),this.attr(`y1`,this.start.y*2-n),this.attr(`x2`,t),this.attr(`y2`,n)):(this.attr(`x1`,this.start.x),this.attr(`y1`,this.start.y),this.attr(`x2`,t),this.attr(`y2`,n)),!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(e.getTotalLength()<5)return!1}catch{return!1}return!0}},M=class extends D{onStart(e){return this.el=this.createElement(`rect`),this.brush.cornerRadius&&(this.attr(`rx`,this.brush.cornerRadius),this.attr(`ry`,this.brush.cornerRadius)),this.attr(`x`,e.x),this.attr(`y`,e.y),this.el}onMove(e){if(!this.el||!this.start)return!1;let[t,n]=_(e.x-this.start.x),[r,i]=_(e.y-this.start.y);if(this.shiftPressed){let e=Math.min(t,r);t=e,r=e}if(this.altPressed)this.attr(`x`,this.start.x-t),this.attr(`y`,this.start.y-r),this.attr(`width`,t*2),this.attr(`height`,r*2);else{let[e,a]=[this.start.x,this.start.x+t*n].sort(h),[o,s]=[this.start.y,this.start.y+r*i].sort(h);this.attr(`x`,e),this.attr(`y`,o),this.attr(`width`,a-e),this.attr(`height`,s-o)}return!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(!e.getTotalLength())return!1}catch{return!1}return!0}};function N(e,t,n,r=e=>e){return e*r(.5-t*(.5-n))}function P(e){return[-e[0],-e[1]]}function F(e,t){return[e[0]+t[0],e[1]+t[1]]}function I(e,t){return[e[0]-t[0],e[1]-t[1]]}function L(e,t){return[e[0]*t,e[1]*t]}function R(e,t){return[e[0]/t,e[1]/t]}function z(e){return[e[1],-e[0]]}function B(e,t){return e[0]*t[0]+e[1]*t[1]}function V(e,t){return e[0]===t[0]&&e[1]===t[1]}function H(e){return Math.hypot(e[0],e[1])}function U(e){return e[0]*e[0]+e[1]*e[1]}function W(e,t){return U(I(e,t))}function G(e){return R(e,H(e))}function K(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function q(e,t,n){let r=Math.sin(n),i=Math.cos(n),a=e[0]-t[0],o=e[1]-t[1],s=a*i-o*r,c=a*r+o*i;return[s+t[0],c+t[1]]}function J(e,t,n){return F(e,L(I(t,e),n))}function Y(e,t,n){return F(e,L(t,n))}var{min:X,PI:Z}=Math,Q=.275,$=Z+1e-4;function ee(e,t={}){let{size:n=16,smoothing:r=.5,thinning:i=.5,simulatePressure:a=!0,easing:o=e=>e,start:s={},end:c={},last:l=!1}=t,{cap:u=!0,easing:d=e=>e*(2-e)}=s,{cap:f=!0,easing:p=e=>--e*e*e+1}=c;if(e.length===0||n<=0)return[];let m=e[e.length-1].runningLength,h=s.taper===!1?0:s.taper===!0?Math.max(n,m):s.taper,g=c.taper===!1?0:c.taper===!0?Math.max(n,m):c.taper,_=(n*r)**2,v=[],y=[],b=e.slice(0,10).reduce((e,t)=>{let r=t.pressure;if(a){let i=X(1,t.distance/n);r=X(1,e+(X(1,1-i)-e)*(i*Q))}return(e+r)/2},e[0].pressure),x=N(n,i,e[e.length-1].pressure,o),S,C=e[0].vector,w=e[0].point,T=w,E=w,D=T,O=!1;for(let t=0;t_)&&(v.push(E),w=E),D=F(s,R),(t<=1||W(T,D)>_)&&(y.push(D),T=D),b=r,C=c}let k=e[0].point.slice(0,2),A=e.length>1?e[e.length-1].point.slice(0,2):F(e[0].point,[1,1]),j=[],M=[];if(e.length===1){if(!(h||g)||l){let e=Y(k,G(z(I(k,A))),-(S||x)),t=[];for(let n=1/13,r=n;r<=1;r+=n)t.push(q(e,k,$*2*r));return t}}else{if(!(h||g&&e.length===1)){if(u)for(let e=1/13,t=e;t<=1;t+=e){let e=q(y[0],k,$*t);j.push(e)}else{let e=I(v[0],y[0]),t=L(e,.5),n=L(e,.51);j.push(I(k,t),I(k,n),F(k,n),F(k,t))}}let t=z(P(e[e.length-1].vector));if(g||h&&e.length===1)M.push(A);else if(f){let e=Y(A,t,x);for(let t=1/29,n=t;n<1;n+=t)M.push(q(e,A,$*3*n))}else M.push(F(A,L(t,x)),F(A,L(t,x*.99)),I(A,L(t,x*.99)),I(A,L(t,x)))}return v.concat(M,y.reverse(),j)}function te(e,t={}){let{streamline:n=.5,size:r=16,last:i=!1}=t;if(e.length===0)return[];let a=.15+(1-n)*.85,o=Array.isArray(e[0])?e:e.map(({x:e,y:t,pressure:n=.5})=>[e,t,n]);if(o.length===2){let e=o[1];o=o.slice(0,-1);for(let t=1;t<5;t++)o.push(J(o[0],e,t/4))}o.length===1&&(o=[...o,[...F(o[0],[1,1]),...o[0].slice(2)]]);let s=[{point:[o[0][0],o[0][1]],pressure:o[0][2]>=0?o[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],c=!1,l=0,u=s[0],d=o.length-1;for(let e=1;e=0?o[e][2]:.5,vector:G(I(u.point,t)),distance:n,runningLength:l},s.push(u)}return s[0].vector=s[1]?.vector||[0,0],s}function ne(e,t={}){return ee(te(e,t),t)}var re=class e extends D{constructor(...e){super(...e),this.points=[]}onStart(e){return this.el=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),this.points=[e],this.attr(`fill`,this.brush.color),this.attr(`d`,this.getSvgData(this.points)),this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&this.points.push(e),this.attr(`d`,this.getSvgData(this.points)),!0}onEnd(){let e=this.el;return this.el=null,!!e}getSvgData(t){return e.getSvgData(t,this.brush)}static getSvgData(e,t){let n=ne(e,{size:t.size,thinning:.9,simulatePressure:!1,start:{taper:5},end:{taper:5},...t.stylusOptions});if(!n.length)return``;let r=n.reduce((e,[t,n],r,i)=>{let[a,o]=i[(r+1)%i.length];return e.push(t,n,(t+a)/2,(n+o)/2),e},[`M`,...n[0],`Q`]);return r.push(`Z`),r.map(e=>typeof e==`number`?e.toFixed(2):e).join(` `)}};function ie(e){return{draw:new O(e),stylus:new re(e),line:new j(e),rectangle:new M(e),ellipse:new k(e),eraseLine:new A(e)}}var ae=class{constructor(e={}){this.options=e,this.el=null,this.svgPoint=null,this.eventEl=null,this.shiftPressed=!1,this.altPressed=!1,this.drawing=!1,this._emitter=m(),this._originalPointerId=null,this._models=ie(this),this._opStack=[],this._opIndex=0,this._disposables=[],this._elements=[],this.options.brush||(this.options.brush={color:`black`,size:3,mode:`stylus`}),e.el&&this.mount(e.el,e.eventTarget,e.window)}get model(){return this._models[this.mode]}get mounted(){return!!this.el}get mode(){return this.options.brush.mode||`stylus`}set mode(e){this._models[this.mode].onUnselected(),this.options.brush.mode=e,this.model.onSelected(this.el)}get brush(){return this.options.brush}set brush(e){this.options.brush=e}resolveSelector(e){return typeof e==`string`?document.querySelector(e):e||null}mount(e,t,n=window){if(this.el)throw Error(`[drauu] already mounted, unmount previous target first`);if(this.el=this.resolveSelector(e),!this.el)throw Error(`[drauu] target element not found`);if(this.el.tagName.toLocaleLowerCase()!==`svg`)throw Error(`[drauu] can only mount to a SVG element`);if(!this.el.createSVGPoint)throw Error(`[drauu] SVG element must be create by document.createElementNS('http://www.w3.org/2000/svg', 'svg')`);this.svgPoint=this.el.createSVGPoint();let r=this.resolveSelector(t)||this.el,i=this.eventStart.bind(this),a=this.eventMove.bind(this),o=this.eventEnd.bind(this),s=this.eventKeyboard.bind(this),c=this.touchMove.bind(this);r.addEventListener(`pointerdown`,i,{passive:!1}),n.addEventListener(`pointermove`,a,{passive:!1}),n.addEventListener(`pointerup`,o,{passive:!1}),n.addEventListener(`pointercancel`,o,{passive:!1}),n.addEventListener(`keydown`,s,!1),n.addEventListener(`keyup`,s,!1),n.addEventListener(`touchmove`,c,{passive:!1}),this._disposables.push(()=>{r.removeEventListener(`pointerdown`,i),n.removeEventListener(`pointermove`,a),n.removeEventListener(`pointerup`,o),n.removeEventListener(`pointercancel`,o),n.removeEventListener(`keydown`,s,!1),n.removeEventListener(`keyup`,s,!1),n.removeEventListener(`touchmove`,c)}),this._emitter.emit(`mounted`)}unmount(){this._disposables.forEach(e=>e()),this._disposables.length=0,this._elements.length=0,this.el=null,this._emitter.emit(`unmounted`)}on(e,t){return this._emitter.on(e,t)}undo(){return!this.canUndo()||this.drawing?!1:(this._opStack[--this._opIndex].undo(),this._emitter.emit(`changed`),!0)}redo(){return!this.canRedo()||this.drawing?!1:(this._opStack[this._opIndex++].redo(),this._emitter.emit(`changed`),!0)}canRedo(){return this._opIndex0}eventMove(e){!this.acceptsInput(e)||!this.drawing||this.model._eventMove(e)&&(e.stopPropagation(),e.preventDefault(),this._emitter.emit(`changed`))}eventStart(e){this.acceptsInput(e)&&(e.stopPropagation(),e.preventDefault(),this._currentNode&&this.cancel(),this.drawing=!0,this._originalPointerId=e.pointerId,this._emitter.emit(`start`),this._currentNode=this.model._eventDown(e),this._currentNode&&this.mode!==`eraseLine`&&this.el.appendChild(this._currentNode),this._emitter.emit(`changed`))}eventEnd(e){if(!this.acceptsInput(e)||!this.drawing)return;let t=this.model._eventUp(e);if(!t)this.cancel();else if(t===!0){let e=this._currentNode;e&&(this._appendNode(e),this.commit({undo:()=>this._removeNode(e),redo:()=>this._restoreNode(e)}))}else this.commit(t);this.drawing=!1,this._emitter.emit(`end`),this._emitter.emit(`changed`),this._originalPointerId=null}touchMove(e){Array.from(e.touches).some(e=>e.touchType===`stylus`&&e.identifier===this._originalPointerId)&&e.preventDefault()}acceptsInput(e){return(!this.options.acceptsInputTypes||this.options.acceptsInputTypes.includes(e.pointerType))&&!(this._originalPointerId&&this._originalPointerId!==e.pointerId)}eventKeyboard(e){(this.shiftPressed!==e.shiftKey||this.altPressed!==e.altKey)&&(this.shiftPressed=e.shiftKey,this.altPressed=e.altKey,this.model.point&&this.model.onMove(this.model.point)&&this._emitter.emit(`changed`))}commit(e){this._opStack.length=this._opIndex,this._opStack.push(e),this._opIndex++;let t=this._currentNode;this._currentNode=void 0,this._emitter.emit(`committed`,t)}clear(){this._opStack.length=0,this._opIndex=0,this._elements=[],this.cancel(),this.el.innerHTML=``,this._emitter.emit(`changed`)}cancel(){this._currentNode&&(this.el.removeChild(this._currentNode),this._currentNode=void 0,this._emitter.emit(`canceled`))}dump(){return this.el.innerHTML}load(e){this.clear(),this.el.innerHTML=e}_appendNode(e){let t=this._elements.at(-1);t?t.after(e):this.el.append(e);let n=this._elements.push(e)-1;e.dataset.drauu_index=n.toString()}_removeNode(e){e.remove(),this._elements[+e.dataset.drauu_index]=null}_restoreNode(e){let t=+e.dataset.drauu_index;this._elements[t]=e;for(let n=t-1;n>=0;n--){let t=this._elements[n];if(t){t.after(e);return}}this.el.prepend(e)}};function oe(e){return new ae(e)}var se=l(()=>{let{currentSlideNo:l,isPresenter:m}=s(),h=[`#ff595e`,`#ffca3a`,`#8ac926`,`#1982c4`,`#6a4c93`,`#ffffff`,`#000000`],g=u(`slidev-drawing-enabled`,!1),_=u(`slidev-drawing-pinned`,!1),v=u(`slidev-drawing-brush`,{color:h[0],size:4,mode:`stylus`}),y=i(!1),b=i(!1),x=i(!1),S=i(!1),C=i(`stylus`),w=r(()=>c.drawings.syncAll||m.value),T=!1,E=r({get(){return C.value},set(e){C.value=e,e===`arrow`?(O.mode=`line`,v.value.arrowEnd=!0):(O.mode=e,v.value.arrowEnd=!1)}}),D=a({brush:v,acceptsInputTypes:r(()=>g.value&&(!c.drawings.presenterOnly||m.value)?void 0:[`pen`]),coordinateTransform:!1}),O=n(oe(D));function k(){O.clear(),w.value&&f(l.value,``)}function A(){x.value=O.canRedo(),b.value=O.canUndo(),S.value=!!O.el?.children.length}function j(e){T=!0;let t=p[e||l.value];t==null?O.clear():O.load(t),A(),T=!1}return O.on(`changed`,()=>{if(A(),!T){let e=O.dump(),t=l.value;(p[t]||``)!==e&&w.value&&f(t,O.dump())}}),d(e=>{T=!0,e[l.value]!=null&&O.load(e[l.value]||``),T=!1,A()}),e(()=>{t(l,()=>{O.mounted&&j()},{immediate:!0})}),O.on(`start`,()=>y.value=!0),O.on(`end`,()=>y.value=!1),window.addEventListener(`keydown`,e=>{if(!g.value||o.value)return;let t=!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey,n=!0;e.code===`KeyZ`&&(e.ctrlKey||e.metaKey)?e.shiftKey?O.redo():O.undo():e.code===`Escape`?g.value=!1:e.code===`KeyL`&&t?E.value=`line`:e.code===`KeyA`&&t?E.value=`arrow`:e.code===`KeyS`&&t?E.value=`stylus`:e.code===`KeyR`&&t?E.value=`rectangle`:e.code===`KeyE`&&t?E.value=`ellipse`:e.code===`KeyC`&&t?k():e.code.startsWith(`Digit`)&&t&&+e.code[5]<=h.length?v.value.color=h[e.code[5]-1]:n=!1,n&&(e.preventDefault(),e.stopPropagation())},!1),{brush:v,brushColors:h,canClear:S,canRedo:x,canUndo:b,clear:k,drauu:O,drauuOptions:D,drawingEnabled:g,drawingMode:E,drawingPinned:_,drawingState:p,isDrawing:y,loadCanvas:j}});export{se as t}; \ No newline at end of file diff --git a/lecture-06/class/assets/useNav-D8SbgLr9.js b/lecture-06/class/assets/useNav-D8SbgLr9.js new file mode 100644 index 0000000000000000000000000000000000000000..95b3098bf21e46ec650aab63b3a020c6852ca848 --- /dev/null +++ b/lecture-06/class/assets/useNav-D8SbgLr9.js @@ -0,0 +1,161 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./md-DAJ_ecr1.js","./modules/shiki-BFOesOFp.js","./rolldown-runtime-hePW80VL.js","./modules/shiki-BrmBd2_v.css","./_plugin-vue_export-helper-BDNMzG2s.js","./slidev/context-DrkI8qiD.js","./modules/vue-Ymwlffw_.js","./TransformerGlyph-D9TehqNe.js","./TransformerGlyph-BjiXyVx-.css","./md-CYXxUBJM.css","./md-kE1uizXw.js","./default-Cq9fupKf.js","./DeckFooter-DqqAb-2u.js","./slidev/client-CJjt9xn-.js","./syncState-BrWO1mSt.js","./index-DvHcJSI0.js","./index-BSlCwQE7.css","./useDrawings-BkbsP5qo.js","./DeckFooter-B6vKMo6W.css","./default-DFJXHcku.css","./md-BnAqCEYv2.js","./section-C2g2VRmZ.js","./section-BZ9Dfv_4.css","./md-m6ElLsWQ.js","./md-D0ZW5T8G.js","./md-rca7ok54.css","./md-BAQJYKbr.js","./slidev/VClicks-Dmx1KjZv.js","./md-C7CHIzYm.css","./md-Bq0k6Ht_.js","./md-D-S0zhLV.js","./md-CJukBVkv.js","./md-DSyIwSi7.js","./interactive-CI8hm4xw.js","./interactive-DDMF3hhv.css","./StepButton-BcP33F-1.js","./StepButton-C1ItLUkw.css","./md-BTnUhx7N.css","./md-DnwIl7Jl.js","./md-K0Oycy6G.js","./md-D3MJsr7m.js","./slidev/CodeBlockWrapper-gsL5r1Ig.js","./modules/unplugin-icons-BIrNarL0.js","./md-DRRRjQ4b.js","./md-BLhYOnc7.js","./md-C9_5NLsW.js","./useConvolution-qO1u8ksh.js","./useAttention-Blk0c2BZ.js","./md-CLHejJIP.css","./md-C3JZnPAz.js","./md-Cy5aODuI.js","./md-C6btF5nP.css","./md-BxdQ0RGt.js","./AttentionMatrix-D2xrh-OL.js","./AttentionMatrix-BhYJvquu.css","./md--VWHWOz1.js","./slidev/KaTexBlockWrapper-BIlBldVC.js","./md-02KmJZ_Z.js","./md-BimdYeK3.js","./md-DOad-2KZ.js","./md-DfWMIvp7.css","./md-BMxY1hjv.js","./PositionalEncoding-CZmL_mXL.js","./PositionalEncoding-Dth3J5pw.css","./md-BYyZKhcj.js","./md-Cuhu_vvG2.js","./md-Cdeogdwt.js","./md-Bas86k082.js","./md-DhsPSwrk.css","./md-BmvwA0Nf.js","./md-Cyf0zl3n.js","./md-D4Ywsi6K.js","./md-CNfnuG9N2.js","./md-Dw-XEgB42.js","./md-KdnLugHx2.js","./md-Cp4p0FvF.css","./md-DgIoPoNt.js","./md-C4a87Mz_.js","./md-CwNbuyVx2.js","./md-BtB6vj0a2.js","./md-Dnd6WsWa2.js","./md-DCF9sEzr2.js","./md-BZqsqFo42.js","./md-B3SP9l6r.js","./md-D_ZyssbS2.js","./md-DhZ23yU-.css","./md-BsO5ZW2F.js","./md-DE2QGCpb.css"])))=>i.map(i=>d[i]); +import{C as e,L as t,N as n,O as r,R as i,Y as a,_ as o,_t as s,b as c,ft as l,g as u,gt as ee,lt as d,m as f,pt as te,rt as ne,st as p,ut as m,w as re,xt as ie,y as ae,z as oe}from"./modules/shiki-BFOesOFp.js";import{t as se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{A as ce,B as le,D as ue,E as de,L as fe,V as pe,_ as me,a as he,c as ge,g as h,h as _e,j as ve,l as ye}from"./modules/vue-Ymwlffw_.js";import{l as be,y as xe}from"./slidev/context-DrkI8qiD.js";function Se(e,t,n){return Math.min(n,Math.max(t,e))}function Ce(...e){return Te(e).reduce((e,t)=>e+t,0)}function we(e){return e??=[],Array.isArray(e)?e:[e]}function Te(e){return we(e).flat(1)}function Ee(e){return Array.from(new Set(e))}function De(...e){let t,n,r;e.length===1?(t=0,r=1,[n]=e):[t,n,r=1]=e;let i=[],a=t;for(;at(e,n)).filter(Oe))}var g={theme:`dl2026`,title:`Transformers (class)`,titleTemplate:`%s - Slidev`,addons:[`dl2026`],remoteAssets:!1,monaco:!0,monacoTypesSource:`local`,monacoTypesAdditionalPackages:[],monacoTypesIgnorePackages:[],monacoRunAdditionalDeps:[],monacoRunUseStrict:!0,download:`../slides.pdf`,export:{},info:`

PGR207 Deep Learning 2026 — Lecture 06

+`,highlighter:`shiki`,twoslash:!0,lineNumbers:!1,colorSchema:`auto`,routerMode:`hash`,aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:``,selectable:!1,themeConfig:{courseCode:`PGR207`,lecture:`06`,lectureTitle:`Transformers`},fonts:{sans:[`"Inter"`,`ui-sans-serif`,`system-ui`,`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`Arial`,`"Noto Sans"`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`,`"Noto Color Emoji"`],serif:[`"Source Serif 4"`,`ui-serif`,`Georgia`,`Cambria`,`"Times New Roman"`,`Times`,`serif`],mono:[`"JetBrains Mono"`,`ui-monospace`,`SFMono-Regular`,`Menlo`,`Monaco`,`Consolas`,`"Liberation Mono"`,`"Courier New"`,`monospace`],webfonts:[`Inter`,`Source Serif 4`,`JetBrains Mono`],provider:`google`,local:[],italic:!1,weights:[`200`,`400`,`600`]},favicon:`https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png`,drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:`https://www.plantuml.com/plantuml`,codeCopy:!0,magicMoveCopy:!0,author:`Vajira Thambawita`,record:`dev`,css:`unocss`,presenter:!0,browserExporter:`dev`,htmlAttrs:{},transition:`slide-left`,editor:!0,mcp:!0,contextMenu:null,wakeLock:!0,pwa:!1,mdc:!0,comark:!1,seoMeta:{},notesAutoRuby:{},duration:`30min`,timer:`stopwatch`,magicMoveDuration:800,preloadImages:!0,clickAnimation:``,layout:`title`,courseCode:`PGR207`,lecture:`06`,email:`vajira@simula.no`,slidesTitle:`Transformers (class) - Slidev`},Ae=`build`,je=u(()=>g.aspectRatio),Me=u(()=>g.canvasWidth),Ne=u(()=>Math.ceil(Me.value/je.value)),Pe=u(()=>ke(g.themeConfig||{},(e,t)=>[`--slidev-theme-${e}`,t])),Fe=g.slidesTitle,Ie=`./#/`,Le=`modulepreload`,Re=function(e,t){return new URL(e,t).href},ze={},_=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Re(t,n),t=s(t),t in ze)return;ze[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Le,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Be(e){if(e===!1||e===`false`)return null;if(e==null||e===!0||e===`true`)return`+1`;if(typeof e==`string`&&`+-`.includes(e[0]))return e;let t=+e;return Number.isNaN(t)?(console.error(`Invalid "at" prop value: ${e}`),null):t<=0?(console.warn(`[Slidev] "at" prop value must be greater than 0, but got ${e}, has been set to 1`),1):t}function Ve(e){return Array.isArray(e)?[Be(e[0]),Be(e[1])]:null}function He(e,n=0,r){let a=d(!1),o=new Map,s=new Map,c={get current(){return Se(+e.value,n,c.total)},set current(t){e.value=a.value?Se(t,n,c.total):t},clicksStart:n,get relativeSizeMap(){return o},get maxMap(){return s},get isMounted(){return a.value},setup(){t(()=>{a.value=!0,s=m(s),ne(e)||(c.current=e.value)}),i(()=>{a.value=!1,o=new Map,s=new Map})},calculateSince(e,t=1){let n=Be(e);if(n==null)return null;let r,i,a;if(typeof n==`string`){let e=c.currentOffset,o=+n;r=e+o,i=e+o+t-1,a=o+t-1}else r=n,i=n+t-1,a=0;return{start:r,end:1/0,max:i,delta:a,currentOffset:u(()=>c.current-r),isCurrent:u(()=>c.current===r),isActive:u(()=>c.current>=r)}},calculateRange(e){let t=Ve(e);if(t==null)return null;let[n,r]=t,i,a,o;return typeof n==`string`?(i=c.currentOffset+ +n,o=+n):(i=n,o=0),typeof r==`string`?(a=i+ +r,o+=+r):a=r,{start:i,end:a,max:a,delta:o,currentOffset:u(()=>c.current-i),isCurrent:u(()=>c.current===i),isActive:u(()=>i<=c.current&&c.currentee(t),e=>{r.value=Math.max(e,n)}),He(r,n,e?.meta?.clicks)}var We=/[a-z]/i;function Ge(e){if(typeof e==`number`)return{seconds:e,relative:!1};let t=e.startsWith(`+`);t&&(e=e.slice(1));let n=0;if(e.includes(`:`)){let t=e.split(`:`).map(Number),r=0,i=0,a=0;if(t.length===3)r=t[0],i=t[1],a=t[2];else if(t.length===2)i=t[0],a=t[1];else if(t.length===1)a=t[0];else throw TypeError(`Invalid timestamp format`);if(Number.isNaN(r)||Number.isNaN(i)||Number.isNaN(a))throw TypeError(`Invalid timestamp format`);n=(r||0)*3600+(i||0)*60+(a||0)}else if(!We.test(e))n=Number(e);else{let t={s:1,sec:1,secs:1,m:60,min:60,mins:60,h:3600,hr:3600,hrs:3600,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2629746,months:2629746,year:31556952,years:31556952},r=/([\d.]+)([a-z]+)/gi,i=e.matchAll(r);if(i)for(let e of i){let r=Number(e[1]);if(Number.isNaN(r))throw TypeError(`Invalid timestamp value: ${e[1]}`);let i=e[2].toLowerCase();if(!(i in t))throw TypeError(`Invalid timestamp unit: ${i}`);n+=r*t[i]}let a=e.replace(r,``).trim();if(a)throw TypeError(`Unknown timestamp remaining: ${a}`)}return{seconds:n,relative:t}}function Ke(e,t){if(!t||t===`all`||t===`*`)return De(1,e+1);if(t===`none`)return[];let n=[];for(let r of t.split(/[,;]/g))if(!r.includes(`-`))n.push(+r);else{let[t,i]=r.split(`-`,2);n.push(...De(+t,i?+i+1:e+1))}return Ee(n).filter(t=>t<=e).sort((e,t)=>e-t)}var qe={},Je={class:`px-4 py-10 text-center text-red-700 dark:text-red-500 font-bold font-mono`};function Ye(e,t){return oe(),c(`div`,Je,ie(`Failed to fetch this slide. Please check your network connection.`))}var v=se(qe,[[`render`,Ye]]),Xe={class:`h-full w-full flex items-center justify-center gap-2 slidev-slide-loading`},Ze=re({__name:`SlideLoading`,setup(e){let n=d(!1);return t(()=>{setTimeout(()=>{n.value=!0},200)}),(e,t)=>(oe(),c(`div`,Xe,[n.value?(oe(),c(f,{key:0},[t[0]||=o(`div`,{class:`i-svg-spinners-90-ring-with-bg text-xl`},null,-1),t[1]||=o(`div`,null,`Loading slide...`,-1)],64)):ae(`v-if`,!0)]))}}),y=p({theme:`dl2026`,addons:[`dl2026`],title:`Transformers (class)`,info:`PGR207 Deep Learning 2026 — Lecture 06`,author:`Vajira Thambawita`,routerMode:`hash`,transition:`slide-left`,mdc:!0,themeConfig:{courseCode:`PGR207`,lecture:`06`,lectureTitle:`Transformers`},layout:`title`,courseCode:`PGR207`,lecture:`06`,email:`vajira@simula.no`,download:`../slides.pdf`}),Qe=m({get layout(){return y.layout},get transition(){return y.transition},get class(){return y.class},get clicks(){return y.clicks},get name(){return y.name},get preload(){return y.preload},slide:{content:``,revision:`-nuvbfs`,frontmatterRaw:`theme: dl2026 +addons: + - dl2026 +title: "Transformers (class)" +info: PGR207 Deep Learning 2026 — Lecture 06 +author: Vajira Thambawita +routerMode: hash +transition: slide-left +mdc: true +themeConfig: + courseCode: PGR207 + lecture: "06" + lectureTitle: Transformers +layout: title +courseCode: PGR207 +lecture: "06" +email: vajira@simula.no +download: ../slides.pdf +`,note:``,title:`Transformers (class)`,index:0,noteHTML:``,images:[],raw:``,frontmatter:y,filepath:``,start:0,sourceIndex:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),b=p({layout:`default`,core:!0,title:`Today, in eight parts`}),$e=m({get layout(){return b.layout},get transition(){return b.transition},get class(){return b.class},get clicks(){return b.clicks},get name(){return b.name},get preload(){return b.preload},slide:{content:``,revision:`-jnp3ie`,frontmatterRaw:`layout: default +core: true +title: Today, in eight parts +`,note:``,title:`Today, in eight parts`,index:1,noteHTML:``,images:[],raw:``,frontmatter:b,filepath:``,start:65,sourceIndex:1,id:1,no:2},__clicksContext:null,__preloaded:!1}),x=p({layout:`section`,index:`00`}),et=m({get layout(){return x.layout},get transition(){return x.transition},get class(){return x.class},get clicks(){return x.clicks},get name(){return x.name},get preload(){return x.preload},slide:{content:``,revision:`-enyl9e`,frontmatterRaw:`layout: section +index: "00" +`,note:``,title:`Delete the recurrence`,level:1,index:2,noteHTML:``,images:[],raw:``,frontmatter:x,filepath:``,start:138,sourceIndex:2,id:2,no:3},__clicksContext:null,__preloaded:!1}),S=p({layout:`default`,core:!0,title:`Two walls in reading one word at a time`}),tt=m({get layout(){return S.layout},get transition(){return S.transition},get class(){return S.class},get clicks(){return S.clicks},get name(){return S.name},get preload(){return S.preload},slide:{content:``,revision:`-kejbpw`,frontmatterRaw:`layout: default +core: true +title: Two walls in reading one word at a time +`,note:``,title:`Two walls in reading one word at a time`,index:3,noteHTML:``,images:[],raw:``,frontmatter:S,filepath:``,start:160,sourceIndex:3,id:3,no:4},__clicksContext:null,__preloaded:!1}),C=p({layout:`default`,core:!0,title:`The move`}),nt=m({get layout(){return C.layout},get transition(){return C.transition},get class(){return C.class},get clicks(){return C.clicks},get name(){return C.name},get preload(){return C.preload},slide:{content:``,revision:`-nkmm6u`,frontmatterRaw:`layout: default +core: true +title: The move +`,note:``,title:`The move`,index:4,noteHTML:``,images:[],raw:``,frontmatter:C,filepath:``,start:266,sourceIndex:4,id:4,no:5},__clicksContext:null,__preloaded:!1}),w=p({layout:`default`,core:!0,title:`Poll: which wall attention solves`}),rt=m({get layout(){return w.layout},get transition(){return w.transition},get class(){return w.class},get clicks(){return w.clicks},get name(){return w.name},get preload(){return w.preload},slide:{content:``,revision:`-r87fpt`,frontmatterRaw:`layout: default +core: true +title: "Poll: which wall attention solves" +`,note:``,title:`Poll: which wall attention solves`,index:5,noteHTML:``,images:[],raw:``,frontmatter:w,filepath:``,start:361,sourceIndex:5,id:5,no:6},__clicksContext:null,__preloaded:!1}),T=p({layout:`section`,index:`01`}),it=m({get layout(){return T.layout},get transition(){return T.transition},get class(){return T.class},get clicks(){return T.clicks},get name(){return T.name},get preload(){return T.preload},slide:{content:``,revision:`a6v0jx`,frontmatterRaw:`layout: section +index: "01" +`,note:``,title:`The whole architecture first`,level:1,index:6,noteHTML:``,images:[],raw:``,frontmatter:T,filepath:``,start:442,sourceIndex:6,id:6,no:7},__clicksContext:null,__preloaded:!1}),E=p({layout:`default`,core:!0,title:`What a transformer is`}),at=m({get layout(){return E.layout},get transition(){return E.transition},get class(){return E.class},get clicks(){return E.clicks},get name(){return E.name},get preload(){return E.preload},slide:{content:``,revision:`-6rm8et`,frontmatterRaw:`layout: default +core: true +title: What a transformer is +`,note:``,title:`What a transformer is`,index:7,noteHTML:``,images:[],raw:``,frontmatter:E,filepath:``,start:465,sourceIndex:7,id:7,no:8},__clicksContext:null,__preloaded:!1}),D=p({layout:`default`,core:!0,title:`Two stacks`}),ot=m({get layout(){return D.layout},get transition(){return D.transition},get class(){return D.class},get clicks(){return D.clicks},get name(){return D.name},get preload(){return D.preload},slide:{content:``,revision:`-56l3el`,frontmatterRaw:`layout: default +core: true +title: Two stacks +`,note:``,title:`Two stacks`,index:8,noteHTML:``,images:[],raw:``,frontmatter:D,filepath:``,start:558,sourceIndex:8,id:8,no:9},__clicksContext:null,__preloaded:!1}),O=p({layout:`interactive`,core:!0,heading:`The architecture, step by step`,title:`The architecture, step by step`,"aside-width":`17rem`}),st=m({get layout(){return O.layout},get transition(){return O.transition},get class(){return O.class},get clicks(){return O.clicks},get name(){return O.name},get preload(){return O.preload},slide:{content:``,revision:`vjnka5`,frontmatterRaw:`layout: interactive +core: true +heading: The architecture, step by step +title: The architecture, step by step +aside-width: 17rem +`,note:``,title:`The architecture, step by step`,index:9,noteHTML:``,images:[],raw:``,frontmatter:O,filepath:``,start:646,sourceIndex:9,id:9,no:10},__clicksContext:null,__preloaded:!1}),k=p({layout:`default`,core:!0,title:`The parts, one at a time`}),ct=m({get layout(){return k.layout},get transition(){return k.transition},get class(){return k.class},get clicks(){return k.clicks},get name(){return k.name},get preload(){return k.preload},slide:{content:``,revision:`q8eptx`,frontmatterRaw:`layout: default +core: true +title: The parts, one at a time +`,note:``,title:`The parts, one at a time`,index:10,noteHTML:``,images:[],raw:``,frontmatter:k,filepath:``,start:704,sourceIndex:10,id:10,no:11},__clicksContext:null,__preloaded:!1}),A=p({layout:`section`,index:`02`}),lt=m({get layout(){return A.layout},get transition(){return A.transition},get class(){return A.class},get clicks(){return A.clicks},get name(){return A.name},get preload(){return A.preload},slide:{content:``,revision:`giamsl`,frontmatterRaw:`layout: section +index: "02" +`,note:``,title:`Query, key, value`,level:1,index:11,noteHTML:``,images:[],raw:``,frontmatter:A,filepath:``,start:788,sourceIndex:11,id:11,no:12},__clicksContext:null,__preloaded:!1}),j=p({layout:`default`,core:!0,title:`Start from a lookup`}),ut=m({get layout(){return j.layout},get transition(){return j.transition},get class(){return j.class},get clicks(){return j.clicks},get name(){return j.name},get preload(){return j.preload},slide:{content:``,revision:`-9gzigd`,frontmatterRaw:`layout: default +core: true +title: Start from a lookup +`,note:``,title:`Start from a lookup`,index:12,noteHTML:``,images:[],raw:``,frontmatter:j,filepath:``,start:810,sourceIndex:12,id:12,no:13},__clicksContext:null,__preloaded:!1}),M=p({layout:`default`,core:!0,title:`Three roles, one vector`}),dt=m({get layout(){return M.layout},get transition(){return M.transition},get class(){return M.class},get clicks(){return M.clicks},get name(){return M.name},get preload(){return M.preload},slide:{content:``,revision:`2jrf8k`,frontmatterRaw:`layout: default +core: true +title: Three roles, one vector +`,note:``,title:`Three roles, one vector`,index:13,noteHTML:``,images:[],raw:``,frontmatter:M,filepath:``,start:925,sourceIndex:13,id:13,no:14},__clicksContext:null,__preloaded:!1}),N=p({layout:`default`,core:!0,title:`The sentence we will use all lecture`}),ft=m({get layout(){return N.layout},get transition(){return N.transition},get class(){return N.class},get clicks(){return N.clicks},get name(){return N.name},get preload(){return N.preload},slide:{content:``,revision:`oumu2v`,frontmatterRaw:`layout: default +core: true +title: The sentence we will use all lecture +`,note:``,title:`The sentence we will use all lecture`,index:14,noteHTML:``,images:[],raw:``,frontmatter:N,filepath:``,start:997,sourceIndex:14,id:14,no:15},__clicksContext:null,__preloaded:!1}),P=p({layout:`interactive`,core:!0,heading:`Three lenses on one word`,title:`Three lenses on one word`,"aside-width":`17rem`}),pt=m({get layout(){return P.layout},get transition(){return P.transition},get class(){return P.class},get clicks(){return P.clicks},get name(){return P.name},get preload(){return P.preload},slide:{content:``,revision:`6ss5d6`,frontmatterRaw:`layout: interactive +core: true +heading: Three lenses on one word +title: Three lenses on one word +aside-width: 17rem +`,note:``,title:`Three lenses on one word`,index:15,noteHTML:``,images:[],raw:``,frontmatter:P,filepath:``,start:1100,sourceIndex:15,id:15,no:16},__clicksContext:null,__preloaded:!1}),F=p({layout:`default`,core:!0,title:`Four steps, and that is the whole mechanism`}),mt=m({get layout(){return F.layout},get transition(){return F.transition},get class(){return F.class},get clicks(){return F.clicks},get name(){return F.name},get preload(){return F.preload},slide:{content:``,revision:`1vvwuj`,frontmatterRaw:`layout: default +core: true +title: Four steps, and that is the whole mechanism +`,note:``,title:`Four steps, and that is the whole mechanism`,index:16,noteHTML:``,images:[],raw:``,frontmatter:F,filepath:``,start:1148,sourceIndex:16,id:16,no:17},__clicksContext:null,__preloaded:!1}),I=p({layout:`interactive`,core:!0,heading:`Same word, same weights, different neighbour`,title:`Same word, same weights, different neighbour`,"aside-width":`18rem`}),ht=m({get layout(){return I.layout},get transition(){return I.transition},get class(){return I.class},get clicks(){return I.clicks},get name(){return I.name},get preload(){return I.preload},slide:{content:``,revision:`cerqj5`,frontmatterRaw:`layout: interactive +core: true +heading: Same word, same weights, different neighbour +title: Same word, same weights, different neighbour +aside-width: 18rem +`,note:``,title:`Same word, same weights, different neighbour`,index:17,noteHTML:``,images:[],raw:``,frontmatter:I,filepath:``,start:1239,sourceIndex:17,id:17,no:18},__clicksContext:null,__preloaded:!1}),L=p({layout:`interactive`,core:!0,heading:`Every query at once`,title:`Every query at once`,"aside-width":`18rem`}),gt=m({get layout(){return L.layout},get transition(){return L.transition},get class(){return L.class},get clicks(){return L.clicks},get name(){return L.name},get preload(){return L.preload},slide:{content:``,revision:`-9qib7w`,frontmatterRaw:`layout: interactive +core: true +heading: Every query at once +title: Every query at once +aside-width: 18rem +`,note:``,title:`Every query at once`,index:18,noteHTML:``,images:[],raw:``,frontmatter:L,filepath:``,start:1286,sourceIndex:18,id:18,no:19},__clicksContext:null,__preloaded:!1}),_t=p({layout:`default`,core:!0,title:`The whole layer, in one line`}),vt=m({get layout(){return _t.layout},get transition(){return _t.transition},get class(){return _t.class},get clicks(){return _t.clicks},get name(){return _t.name},get preload(){return _t.preload},slide:{content:``,revision:`3hctwj`,frontmatterRaw:`layout: default +core: true +title: The whole layer, in one line +`,note:``,title:`The whole layer, in one line`,index:19,noteHTML:``,images:[],raw:``,frontmatter:_t,filepath:``,start:1333,sourceIndex:19,id:19,no:20},__clicksContext:null,__preloaded:!1}),R=p({layout:`section`,index:`03`}),yt=m({get layout(){return R.layout},get transition(){return R.transition},get class(){return R.class},get clicks(){return R.clicks},get name(){return R.name},get preload(){return R.preload},slide:{content:``,revision:`8np5iz`,frontmatterRaw:`layout: section +index: "03" +`,note:``,title:`From one head to one block`,level:1,index:20,noteHTML:``,images:[],raw:``,frontmatter:R,filepath:``,start:1423,sourceIndex:20,id:20,no:21},__clicksContext:null,__preloaded:!1}),z=p({layout:`default`,core:!0,title:`One softmax can only point at one thing`}),bt=m({get layout(){return z.layout},get transition(){return z.transition},get class(){return z.class},get clicks(){return z.clicks},get name(){return z.name},get preload(){return z.preload},slide:{content:``,revision:`3mlc9t`,frontmatterRaw:`layout: default +core: true +title: One softmax can only point at one thing +`,note:``,title:`One softmax can only point at one thing`,index:21,noteHTML:``,images:[],raw:``,frontmatter:z,filepath:``,start:1447,sourceIndex:21,id:21,no:22},__clicksContext:null,__preloaded:!1}),B=p({layout:`interactive`,core:!0,heading:`Four heads, one question each`,title:`Four heads, one question each`,"aside-width":`17rem`}),xt=m({get layout(){return B.layout},get transition(){return B.transition},get class(){return B.class},get clicks(){return B.clicks},get name(){return B.name},get preload(){return B.preload},slide:{content:``,revision:`f87tka`,frontmatterRaw:`layout: interactive +core: true +heading: Four heads, one question each +title: Four heads, one question each +aside-width: 17rem +`,note:``,title:`Four heads, one question each`,index:22,noteHTML:``,images:[],raw:``,frontmatter:B,filepath:``,start:1518,sourceIndex:22,id:22,no:23},__clicksContext:null,__preloaded:!1}),V=p({layout:`interactive`,core:!0,heading:`Attention does not know what order the words came in`,title:`Attention does not know what order the words came in`,"aside-width":`18rem`}),St=m({get layout(){return V.layout},get transition(){return V.transition},get class(){return V.class},get clicks(){return V.clicks},get name(){return V.name},get preload(){return V.preload},slide:{content:``,revision:`-q048r9`,frontmatterRaw:`layout: interactive +core: true +heading: Attention does not know what order the words came in +title: Attention does not know what order the words came in +aside-width: 18rem +`,note:``,title:`Attention does not know what order the words came in`,index:23,noteHTML:``,images:[],raw:``,frontmatter:V,filepath:``,start:1573,sourceIndex:23,id:23,no:24},__clicksContext:null,__preloaded:!1}),H=p({layout:`interactive`,core:!0,heading:`So put the position into the vector`,title:`So put the position into the vector`,"aside-width":`18rem`}),Ct=m({get layout(){return H.layout},get transition(){return H.transition},get class(){return H.class},get clicks(){return H.clicks},get name(){return H.name},get preload(){return H.preload},slide:{content:``,revision:`-prrwo4`,frontmatterRaw:`layout: interactive +core: true +heading: So put the position into the vector +title: So put the position into the vector +aside-width: 18rem +`,note:``,title:`So put the position into the vector`,index:24,noteHTML:``,images:[],raw:``,frontmatter:H,filepath:``,start:1626,sourceIndex:24,id:24,no:25},__clicksContext:null,__preloaded:!1}),U=p({layout:`default`,core:!0,title:`The other half of the block`}),wt=m({get layout(){return U.layout},get transition(){return U.transition},get class(){return U.class},get clicks(){return U.clicks},get name(){return U.name},get preload(){return U.preload},slide:{content:``,revision:`uf8li`,frontmatterRaw:`layout: default +core: true +title: The other half of the block +`,note:``,title:`The other half of the block`,index:25,noteHTML:``,images:[],raw:``,frontmatter:U,filepath:``,start:1683,sourceIndex:25,id:25,no:26},__clicksContext:null,__preloaded:!1}),W=p({layout:`default`,core:!0,title:`Two wrappers that make it stackable`}),Tt=m({get layout(){return W.layout},get transition(){return W.transition},get class(){return W.class},get clicks(){return W.clicks},get name(){return W.name},get preload(){return W.preload},slide:{content:``,revision:`-4enb36`,frontmatterRaw:`layout: default +core: true +title: Two wrappers that make it stackable +`,note:``,title:`Two wrappers that make it stackable`,index:26,noteHTML:``,images:[],raw:``,frontmatter:W,filepath:``,start:1776,sourceIndex:26,id:26,no:27},__clicksContext:null,__preloaded:!1}),G=p({layout:`interactive`,core:!0,heading:`The block, assembled`,title:`The block, assembled`,"aside-width":`17rem`}),Et=m({get layout(){return G.layout},get transition(){return G.transition},get class(){return G.class},get clicks(){return G.clicks},get name(){return G.name},get preload(){return G.preload},slide:{content:``,revision:`-sotdj8`,frontmatterRaw:`layout: interactive +core: true +heading: The block, assembled +title: The block, assembled +aside-width: 17rem +`,note:``,title:`The block, assembled`,index:27,noteHTML:``,images:[],raw:``,frontmatter:G,filepath:``,start:1873,sourceIndex:27,id:27,no:28},__clicksContext:null,__preloaded:!1}),K=p({layout:`default`,core:!0,title:`The bill for looking everywhere`}),Dt=m({get layout(){return K.layout},get transition(){return K.transition},get class(){return K.class},get clicks(){return K.clicks},get name(){return K.name},get preload(){return K.preload},slide:{content:``,revision:`-pcpzje`,frontmatterRaw:`layout: default +core: true +title: The bill for looking everywhere +`,note:``,title:`The bill for looking everywhere`,index:28,noteHTML:``,images:[],raw:``,frontmatter:K,filepath:``,start:1929,sourceIndex:28,id:28,no:29},__clicksContext:null,__preloaded:!1}),q=p({layout:`section`,index:`04`}),Ot=m({get layout(){return q.layout},get transition(){return q.transition},get class(){return q.class},get clicks(){return q.clicks},get name(){return q.name},get preload(){return q.preload},slide:{content:``,revision:`qdjl55`,frontmatterRaw:`layout: section +index: "04" +`,note:``,title:`Inside the decoder`,level:1,index:29,noteHTML:``,images:[],raw:``,frontmatter:q,filepath:``,start:2007,sourceIndex:29,id:29,no:30},__clicksContext:null,__preloaded:!1}),J=p({layout:`interactive`,core:!0,heading:`The mask, and why the loss collapses without it`,title:`The mask, and why the loss collapses without it`,"aside-width":`18rem`}),kt=m({get layout(){return J.layout},get transition(){return J.transition},get class(){return J.class},get clicks(){return J.clicks},get name(){return J.name},get preload(){return J.preload},slide:{content:``,revision:`-cqike2`,frontmatterRaw:`layout: interactive +core: true +heading: The mask, and why the loss collapses without it +title: The mask, and why the loss collapses without it +aside-width: 18rem +`,note:``,title:`The mask, and why the loss collapses without it`,index:30,noteHTML:``,images:[],raw:``,frontmatter:J,filepath:``,start:2029,sourceIndex:30,id:30,no:31},__clicksContext:null,__preloaded:!1}),Y=p({layout:`default`,core:!0,title:`Cross-attention: the decoder reads the encoder`}),At=m({get layout(){return Y.layout},get transition(){return Y.transition},get class(){return Y.class},get clicks(){return Y.clicks},get name(){return Y.name},get preload(){return Y.preload},slide:{content:``,revision:`-tl0c9n`,frontmatterRaw:`layout: default +core: true +title: "Cross-attention: the decoder reads the encoder" +`,note:``,title:`Cross-attention: the decoder reads the encoder`,index:31,noteHTML:``,images:[],raw:``,frontmatter:Y,filepath:``,start:2090,sourceIndex:31,id:31,no:32},__clicksContext:null,__preloaded:!1}),jt=p({layout:`section`,index:`05`}),Mt=m({get layout(){return jt.layout},get transition(){return jt.transition},get class(){return jt.class},get clicks(){return jt.clicks},get name(){return jt.name},get preload(){return jt.preload},slide:{content:``,revision:`-8d63k6`,frontmatterRaw:`layout: section +index: "05" +`,note:``,title:`Three kinds of transformer`,level:1,index:32,noteHTML:``,images:[],raw:``,frontmatter:jt,filepath:``,start:2172,sourceIndex:32,id:32,no:33},__clicksContext:null,__preloaded:!1}),Nt=p({layout:`interactive`,core:!0,heading:`The architecture forked three ways`,title:`The architecture forked three ways`,"aside-width":`17rem`}),Pt=m({get layout(){return Nt.layout},get transition(){return Nt.transition},get class(){return Nt.class},get clicks(){return Nt.clicks},get name(){return Nt.name},get preload(){return Nt.preload},slide:{content:``,revision:`-5t0qeu`,frontmatterRaw:`layout: interactive +core: true +heading: The architecture forked three ways +title: The architecture forked three ways +aside-width: 17rem +`,note:``,title:`The architecture forked three ways`,index:33,noteHTML:``,images:[],raw:``,frontmatter:Nt,filepath:``,start:2197,sourceIndex:33,id:33,no:34},__clicksContext:null,__preloaded:!1}),Ft=p({layout:`default`,core:!0,title:`Which kind for which job`}),It=m({get layout(){return Ft.layout},get transition(){return Ft.transition},get class(){return Ft.class},get clicks(){return Ft.clicks},get name(){return Ft.name},get preload(){return Ft.preload},slide:{content:``,revision:`-wsvxeh`,frontmatterRaw:`layout: default +core: true +title: Which kind for which job +`,note:``,title:`Which kind for which job`,index:34,noteHTML:``,images:[],raw:``,frontmatter:Ft,filepath:``,start:2251,sourceIndex:34,id:34,no:35},__clicksContext:null,__preloaded:!1}),Lt=p({layout:`default`,core:!0,title:`Why decoder-only took over`}),Rt=m({get layout(){return Lt.layout},get transition(){return Lt.transition},get class(){return Lt.class},get clicks(){return Lt.clicks},get name(){return Lt.name},get preload(){return Lt.preload},slide:{content:``,revision:`swhho9`,frontmatterRaw:`layout: default +core: true +title: Why decoder-only took over +`,note:``,title:`Why decoder-only took over`,index:35,noteHTML:``,images:[],raw:``,frontmatter:Lt,filepath:``,start:2340,sourceIndex:35,id:35,no:36},__clicksContext:null,__preloaded:!1}),zt=p({layout:`default`,core:!0,title:`The same block, more of it`}),Bt=m({get layout(){return zt.layout},get transition(){return zt.transition},get class(){return zt.class},get clicks(){return zt.clicks},get name(){return zt.name},get preload(){return zt.preload},slide:{content:``,revision:`tie327`,frontmatterRaw:`layout: default +core: true +title: The same block, more of it +`,note:``,title:`The same block, more of it`,index:36,noteHTML:``,images:[],raw:``,frontmatter:zt,filepath:``,start:2423,sourceIndex:36,id:36,no:37},__clicksContext:null,__preloaded:!1}),Vt=p({layout:`section`,index:`06`}),Ht=m({get layout(){return Vt.layout},get transition(){return Vt.transition},get class(){return Vt.class},get clicks(){return Vt.clicks},get name(){return Vt.name},get preload(){return Vt.preload},slide:{content:``,revision:`83esfv`,frontmatterRaw:`layout: section +index: "06" +`,note:``,title:`In PyTorch`,level:1,index:37,noteHTML:``,images:[],raw:``,frontmatter:Vt,filepath:``,start:2505,sourceIndex:37,id:37,no:38},__clicksContext:null,__preloaded:!1}),Ut=p({layout:`default`,core:!0,title:`The mechanism is one function call`}),Wt=m({get layout(){return Ut.layout},get transition(){return Ut.transition},get class(){return Ut.class},get clicks(){return Ut.clicks},get name(){return Ut.name},get preload(){return Ut.preload},slide:{content:``,revision:`-k3ps6t`,frontmatterRaw:`layout: default +core: true +title: The mechanism is one function call +`,note:``,title:`The mechanism is one function call`,index:38,noteHTML:``,images:[],raw:``,frontmatter:Ut,filepath:``,start:2529,sourceIndex:38,id:38,no:39},__clicksContext:null,__preloaded:!1}),Gt=p({layout:`default`,core:!0,title:`Shapes, end to end`}),Kt=m({get layout(){return Gt.layout},get transition(){return Gt.transition},get class(){return Gt.class},get clicks(){return Gt.clicks},get name(){return Gt.name},get preload(){return Gt.preload},slide:{content:``,revision:`2jf5kp`,frontmatterRaw:`layout: default +core: true +title: Shapes, end to end +`,note:``,title:`Shapes, end to end`,index:39,noteHTML:``,images:[],raw:``,frontmatter:Gt,filepath:``,start:2623,sourceIndex:39,id:39,no:40},__clicksContext:null,__preloaded:!1}),qt=p({layout:`section`,index:`07`}),Jt=m({get layout(){return qt.layout},get transition(){return qt.transition},get class(){return qt.class},get clicks(){return qt.clicks},get name(){return qt.name},get preload(){return qt.preload},slide:{content:``,revision:`-wxbucn`,frontmatterRaw:`layout: section +index: "07" +`,note:``,title:`Where that leaves us`,level:1,index:40,noteHTML:``,images:[],raw:``,frontmatter:qt,filepath:``,start:2699,sourceIndex:40,id:40,no:41},__clicksContext:null,__preloaded:!1}),Yt=p({layout:`default`,core:!0,title:`Where we got to`}),Xt=m({get layout(){return Yt.layout},get transition(){return Yt.transition},get class(){return Yt.class},get clicks(){return Yt.clicks},get name(){return Yt.name},get preload(){return Yt.preload},slide:{content:``,revision:`tsygqw`,frontmatterRaw:`layout: default +core: true +title: Where we got to +`,note:``,title:`Where we got to`,index:41,noteHTML:``,images:[],raw:``,frontmatter:Yt,filepath:``,start:2719,sourceIndex:41,id:41,no:42},__clicksContext:null,__preloaded:!1}),X=p({layout:`default`,core:!0,title:`Reading, and the lab`}),Zt=m({get layout(){return X.layout},get transition(){return X.transition},get class(){return X.class},get clicks(){return X.clicks},get name(){return X.name},get preload(){return X.preload},slide:{content:``,revision:`lbp9do`,frontmatterRaw:`layout: default +core: true +title: Reading, and the lab +`,note:``,title:`Reading, and the lab`,index:42,noteHTML:``,images:[],raw:``,frontmatter:X,filepath:``,start:2806,sourceIndex:42,id:42,no:43},__clicksContext:null,__preloaded:!1}),Qt=p({layout:`end`,email:`vajira@simula.no`}),$t=m({get layout(){return Qt.layout},get transition(){return Qt.transition},get class(){return Qt.class},get clicks(){return Qt.clicks},get name(){return Qt.name},get preload(){return Qt.preload},slide:{content:``,revision:`a2zm93`,frontmatterRaw:`layout: end +email: vajira@simula.no +`,note:``,title:`Questions?`,level:1,index:43,noteHTML:``,images:[],raw:``,frontmatter:Qt,filepath:``,start:2892,sourceIndex:43,id:43,no:44},__clicksContext:null,__preloaded:!1}),Z=Array(44),Q=(t,n)=>e({loader:n,delay:300,loadingComponent:Ze,errorComponent:v,onError:e=>console.error(`Failed to load slide `+(t+1),e)}),en=async()=>{try{return Z[0]??=await _(()=>import(`./md-DAJ_ecr1.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},tn=async()=>{try{return Z[1]??=await _(()=>import(`./md-kE1uizXw.js`),__vite__mapDeps([10,1,2,3,5,6,7,4,8,11,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},nn=async()=>{try{return Z[2]??=await _(()=>import(`./md-BnAqCEYv2.js`),__vite__mapDeps([20,1,2,3,5,6,7,4,8,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},rn=async()=>{try{return Z[3]??=await _(()=>import(`./md-m6ElLsWQ.js`),__vite__mapDeps([23,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},an=async()=>{try{return Z[4]??=await _(()=>import(`./md-D0ZW5T8G.js`),__vite__mapDeps([24,1,2,3,4,5,6,11,12,13,14,15,16,17,18,19,25]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},on=async()=>{try{return Z[5]??=await _(()=>import(`./md-BAQJYKbr.js`),__vite__mapDeps([26,1,2,3,4,5,6,27,15,14,16,11,12,13,17,18,19,28]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},sn=async()=>{try{return Z[6]??=await _(()=>import(`./md-Bq0k6Ht_.js`),__vite__mapDeps([29,1,2,3,5,6,7,4,8,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},cn=async()=>{try{return Z[7]??=await _(()=>import(`./md-D-S0zhLV.js`),__vite__mapDeps([30,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ln=async()=>{try{return Z[8]??=await _(()=>import(`./md-CJukBVkv.js`),__vite__mapDeps([31,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},un=async()=>{try{return Z[9]??=await _(()=>import(`./md-DSyIwSi7.js`),__vite__mapDeps([32,1,2,3,4,5,6,27,15,14,16,33,12,13,17,18,34,35,36,37]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},dn=async()=>{try{return Z[10]??=await _(()=>import(`./md-DnwIl7Jl.js`),__vite__mapDeps([38,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},fn=async()=>{try{return Z[11]??=await _(()=>import(`./md-K0Oycy6G.js`),__vite__mapDeps([39,1,2,3,5,6,7,4,8,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},pn=async()=>{try{return Z[12]??=await _(()=>import(`./md-D3MJsr7m.js`),__vite__mapDeps([40,1,2,3,5,6,27,15,14,16,11,4,12,13,17,18,19,41,42]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},mn=async()=>{try{return Z[13]??=await _(()=>import(`./md-DRRRjQ4b.js`),__vite__mapDeps([43,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},hn=async()=>{try{return Z[14]??=await _(()=>import(`./md-BLhYOnc7.js`),__vite__mapDeps([44,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},gn=async()=>{try{return Z[15]??=await _(()=>import(`./md-C9_5NLsW.js`),__vite__mapDeps([45,1,2,3,4,5,6,15,14,16,27,33,12,13,17,18,34,35,36,46,47,48]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},_n=async()=>{try{return Z[16]??=await _(()=>import(`./md-C3JZnPAz.js`),__vite__mapDeps([49,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},vn=async()=>{try{return Z[17]??=await _(()=>import(`./md-Cy5aODuI.js`),__vite__mapDeps([50,1,2,3,4,5,6,27,15,14,16,33,12,13,17,18,34,35,36,46,47,51]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},yn=async()=>{try{return Z[18]??=await _(()=>import(`./md-BxdQ0RGt.js`),__vite__mapDeps([52,1,2,3,5,6,27,15,14,16,33,4,12,13,17,18,34,53,35,36,47,54]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},bn=async()=>{try{return Z[19]??=await _(()=>import(`./md--VWHWOz1.js`),__vite__mapDeps([55,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19,56]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},xn=async()=>{try{return Z[20]??=await _(()=>import(`./md-02KmJZ_Z.js`),__vite__mapDeps([57,1,2,3,5,6,7,4,8,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Sn=async()=>{try{return Z[21]??=await _(()=>import(`./md-BimdYeK3.js`),__vite__mapDeps([58,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Cn=async()=>{try{return Z[22]??=await _(()=>import(`./md-DOad-2KZ.js`),__vite__mapDeps([59,1,2,3,4,5,6,27,15,14,16,33,12,13,17,18,34,35,36,46,47,60]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},wn=async()=>{try{return Z[23]??=await _(()=>import(`./md-BMxY1hjv.js`),__vite__mapDeps([61,1,2,3,5,6,27,15,14,16,33,4,12,13,17,18,34,62,35,36,46,47,63]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Tn=async()=>{try{return Z[24]??=await _(()=>import(`./md-BYyZKhcj.js`),__vite__mapDeps([64,1,2,3,5,6,27,15,14,16,33,4,12,13,17,18,34,62,35,36,46,47,63]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},En=async()=>{try{return Z[25]??=await _(()=>import(`./md-Cuhu_vvG2.js`),__vite__mapDeps([65,1,2,3,5,6,27,15,14,16,11,4,12,13,17,18,19,56]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Dn=async()=>{try{return Z[26]??=await _(()=>import(`./md-Cdeogdwt.js`),__vite__mapDeps([66,1,2,3,5,6,27,15,14,16,11,4,12,13,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},On=async()=>{try{return Z[27]??=await _(()=>import(`./md-Bas86k082.js`),__vite__mapDeps([67,1,2,3,4,5,6,27,15,14,16,33,12,13,17,18,34,35,36,68]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},kn=async()=>{try{return Z[28]??=await _(()=>import(`./md-BmvwA0Nf.js`),__vite__mapDeps([69,1,2,3,5,6,27,15,14,16,11,4,12,13,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},An=async()=>{try{return Z[29]??=await _(()=>import(`./md-Cyf0zl3n.js`),__vite__mapDeps([70,1,2,3,5,6,7,4,8,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},jn=async()=>{try{return Z[30]??=await _(()=>import(`./md-D4Ywsi6K.js`),__vite__mapDeps([71,1,2,3,5,6,27,15,14,16,33,4,12,13,17,18,34,53,35,36,47,54]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Mn=async()=>{try{return Z[31]??=await _(()=>import(`./md-CNfnuG9N2.js`),__vite__mapDeps([72,1,2,3,5,6,27,15,14,16,11,4,12,13,17,18,19,56]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Nn=async()=>{try{return Z[32]??=await _(()=>import(`./md-Dw-XEgB42.js`),__vite__mapDeps([73,1,2,3,5,6,7,4,8,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Pn=async()=>{try{return Z[33]??=await _(()=>import(`./md-KdnLugHx2.js`),__vite__mapDeps([74,1,2,3,4,5,6,27,15,14,16,33,12,13,17,18,34,75]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Fn=async()=>{try{return Z[34]??=await _(()=>import(`./md-DgIoPoNt.js`),__vite__mapDeps([76,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},In=async()=>{try{return Z[35]??=await _(()=>import(`./md-C4a87Mz_.js`),__vite__mapDeps([77,1,2,3,5,6,27,15,14,16,11,4,12,13,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ln=async()=>{try{return Z[36]??=await _(()=>import(`./md-CwNbuyVx2.js`),__vite__mapDeps([78,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Rn=async()=>{try{return Z[37]??=await _(()=>import(`./md-BtB6vj0a2.js`),__vite__mapDeps([79,1,2,3,5,6,7,4,8,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},zn=async()=>{try{return Z[38]??=await _(()=>import(`./md-Dnd6WsWa2.js`),__vite__mapDeps([80,1,2,3,5,6,27,15,14,16,11,4,12,13,17,18,19,41,42]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Bn=async()=>{try{return Z[39]??=await _(()=>import(`./md-DCF9sEzr2.js`),__vite__mapDeps([81,1,2,3,5,6,11,4,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Vn=async()=>{try{return Z[40]??=await _(()=>import(`./md-BZqsqFo42.js`),__vite__mapDeps([82,1,2,3,5,6,7,4,8,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Hn=async()=>{try{return Z[41]??=await _(()=>import(`./md-B3SP9l6r.js`),__vite__mapDeps([83,1,2,3,5,6,7,4,8,11,12,13,14,15,16,17,18,19]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Un=async()=>{try{return Z[42]??=await _(()=>import(`./md-D_ZyssbS2.js`),__vite__mapDeps([84,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,85]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Wn=async()=>{try{return Z[43]??=await _(()=>import(`./md-BsO5ZW2F.js`),__vite__mapDeps([86,1,2,3,4,5,6,7,8,87]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Gn=[{no:1,meta:Qe,load:en,component:Q(0,en)},{no:2,meta:$e,load:tn,component:Q(1,tn)},{no:3,meta:et,load:nn,component:Q(2,nn)},{no:4,meta:tt,load:rn,component:Q(3,rn)},{no:5,meta:nt,load:an,component:Q(4,an)},{no:6,meta:rt,load:on,component:Q(5,on)},{no:7,meta:it,load:sn,component:Q(6,sn)},{no:8,meta:at,load:cn,component:Q(7,cn)},{no:9,meta:ot,load:ln,component:Q(8,ln)},{no:10,meta:st,load:un,component:Q(9,un)},{no:11,meta:ct,load:dn,component:Q(10,dn)},{no:12,meta:lt,load:fn,component:Q(11,fn)},{no:13,meta:ut,load:pn,component:Q(12,pn)},{no:14,meta:dt,load:mn,component:Q(13,mn)},{no:15,meta:ft,load:hn,component:Q(14,hn)},{no:16,meta:pt,load:gn,component:Q(15,gn)},{no:17,meta:mt,load:_n,component:Q(16,_n)},{no:18,meta:ht,load:vn,component:Q(17,vn)},{no:19,meta:gt,load:yn,component:Q(18,yn)},{no:20,meta:vt,load:bn,component:Q(19,bn)},{no:21,meta:yt,load:xn,component:Q(20,xn)},{no:22,meta:bt,load:Sn,component:Q(21,Sn)},{no:23,meta:xt,load:Cn,component:Q(22,Cn)},{no:24,meta:St,load:wn,component:Q(23,wn)},{no:25,meta:Ct,load:Tn,component:Q(24,Tn)},{no:26,meta:wt,load:En,component:Q(25,En)},{no:27,meta:Tt,load:Dn,component:Q(26,Dn)},{no:28,meta:Et,load:On,component:Q(27,On)},{no:29,meta:Dt,load:kn,component:Q(28,kn)},{no:30,meta:Ot,load:An,component:Q(29,An)},{no:31,meta:kt,load:jn,component:Q(30,jn)},{no:32,meta:At,load:Mn,component:Q(31,Mn)},{no:33,meta:Mt,load:Nn,component:Q(32,Nn)},{no:34,meta:Pt,load:Pn,component:Q(33,Pn)},{no:35,meta:It,load:Fn,component:Q(34,Fn)},{no:36,meta:Rt,load:In,component:Q(35,In)},{no:37,meta:Bt,load:Ln,component:Q(36,Ln)},{no:38,meta:Ht,load:Rn,component:Q(37,Rn)},{no:39,meta:Wt,load:zn,component:Q(38,zn)},{no:40,meta:Kt,load:Bn,component:Q(39,Bn)},{no:41,meta:Jt,load:Vn,component:Q(40,Vn)},{no:42,meta:Xt,load:Hn,component:Q(41,Hn)},{no:43,meta:Zt,load:Un,component:Q(42,Un)},{no:44,meta:$t,load:Wn,component:Q(43,Wn)}],$=l(Gn);function Kn(e,t,{mode:r=`replace`}={}){let i=pe();return u({get(){let n=i.currentRoute.value.query[e];return n==null?t??null:Array.isArray(n)?n.filter(Boolean):n},set(a){n(()=>{(i.currentRoute.value.query[e]??t?.toString())!==a.toString()&&i[s(r)]({query:{...i.currentRoute.value.query,[e]:`${a}`===t?void 0:a}})})}})}function qn(e,t,n=!1){let r=e.meta.slide?.frontmatter.routeAlias??e.no;return n?`/export/${r}`:t?`/presenter/${r}`:`/${r}`}function Jn(e){return $.value.find(t=>t.no===+e||t.meta.slide?.frontmatter.routeAlias===e)}function Yn(e,t,n=!1){return(typeof e==`number`||typeof e==`string`)&&(e=Jn(e)),qn(e,t,n)}var Xn={"slide-left":`slide-left | slide-right`,"slide-right":`slide-right | slide-left`,"slide-up":`slide-up | slide-down`,"slide-down":`slide-down | slide-up`};function Zn(e,t=!1){if(!e||(typeof e==`string`&&(e={name:e}),!e.name))return;let n=e.name.includes(`|`)?e.name:Xn[e.name]||e.name;if(n.includes(`|`)){let[e,r]=n.split(`|`).map(e=>e.trim());n=t?r:e}if(n)return{...e,name:n}}function Qn(e,t,n){let r=e>0?n?.meta?.transition:t?.meta?.transition;return r||=g.transition||void 0,Zn(r,e<0)}var $n=d(!1),er=d(!1),tr=d(!1),nr=d(!1),rr=d(!1),ir=d(!1),ar=d(!0),or=p(new Set),sr=u(()=>or.size>0),cr=ye({xs:460,...he}),lr=de(),ur=me(),dr=u(()=>lr.height.value-lr.width.value/je.value>120),fr=_e(ve?document.body:null),pr=ge(),mr=u(()=>[`INPUT`,`TEXTAREA`].includes(pr.value?.tagName||``)),hr=u(()=>[`BUTTON`,`A`].includes(pr.value?.tagName||``));h(`slidev-camera`,`default`,{listenToStorageChanges:!1}),h(`slidev-mic`,`default`,{listenToStorageChanges:!1});var gr=h(`slidev-scale`,0),_r=h(`slidev-wake-lock`,!0),vr=h(`slidev-hide-cursor-idle`,!0);h(`slidev-skip-export-pdf-tip`,!1),h(`slidev-export-capture-delay`,400,{listenToStorageChanges:!1});var yr=h(`slidev-presenter-cursor`,!0,{listenToStorageChanges:!1}),br=h(`slidev-cursor-style`,`cursor`,{listenToStorageChanges:!1});function xr(){yr.value=!yr.value}var Sr=h(`slidev-show-editor`,!1,{listenToStorageChanges:!1}),Cr=h(`slidev-editor-vertical`,!1,{listenToStorageChanges:!1}),wr=h(`slidev-editor-width`,ve?window.innerWidth*.4:318,{listenToStorageChanges:!1}),Tr=h(`slidev-editor-height`,ve?window.innerHeight*.4:300,{listenToStorageChanges:!1}),Er=l(null),Dr=h(`slidev-presenter-font-size`,1,{listenToStorageChanges:!1}),Or=h(`slidev-presenter-layout`,1,{listenToStorageChanges:!1}),kr={invert:!1,contrast:1,brightness:1,hueRotate:0,saturate:1,sepia:0},Ar=h(`slidev-viewer-css-filter`,kr,{listenToStorageChanges:!1,mergeDefaults:!0,deep:!0}),jr=u(()=>Object.keys(kr).some(e=>Ar.value[e]!==kr[e]));function Mr(){Or.value+=1,Or.value>3&&(Or.value=1)}function Nr(){Dr.value=Math.min(2,Dr.value+.1)}function Pr(){Dr.value=Math.max(.5,Dr.value-.1)}var Fr=fe(nr),Ir=h(`slidev-sync-directions`,{viewerSend:!0,viewerReceive:!0,presenterSend:!0,presenterReceive:!0},{listenToStorageChanges:!1,mergeDefaults:!0});function Lr(e,t,n=1){let r=t.meta.slide.level??n;r&&r>n&&e.length>0?Lr(e[e.length-1].children,t,n+1):e.push({no:t.no,children:[],level:n,titleLevel:r,path:Yn(t.meta.slide?.frontmatter?.routeAlias??t.no,!1),hideInToc:!!t.meta?.slide?.frontmatter?.hideInToc,title:t.meta?.slide?.title})}function Rr(e,t,n=!1,r,i){return e.map(e=>{let a={...e,active:e.no===i?.value,hasActiveParent:n};return a.children.length>0&&(a.children=Rr(a.children,t,a.active||a.hasActiveParent,a,i)),r&&(a.active||a.activeParent)&&(r.activeParent=!0),a})}function zr(e,t=1){return e.filter(e=>!e.hideInToc).map(e=>({...e,children:zr(e.children,t+1)}))}function Br(e,t,n){let r=u(()=>e.value.filter(e=>e.meta?.slide?.title).reduce((e,t)=>(Lr(e,t),e),[])),i=u(()=>Rr(r.value,n.value,void 0,void 0,t));return u(()=>zr(i.value))}function Vr(e,t,n=d(0),r,i,o){let s=u(()=>$.value.length),c=d(0),l=d(0),ee=u(()=>Yn(e.value,r.value)),f=u(()=>e.value.no),te=u(()=>e.value.meta?.layout||(f.value===1?`cover`:`default`)),ne=u(()=>e.value.meta.slide.frontmatter),p=u(()=>t.value.current),m=u(()=>t.value.clicksStart),re=u(()=>t.value.total),ie=u(()=>$.value[Math.min($.value.length,f.value+1)-1]),ae=u(()=>$.value[Math.max(1,f.value-1)-1]),oe=u(()=>f.value<$.value.length||p.valuef.value>1||p.value>0),ce=u(()=>i.value?void 0:Qn(c.value,e.value,ae.value));a(e,(e,t)=>{c.value=e.no-t.no});async function le(e){return!1}let ue=Br($,f,e);async function de(){l.value=1,re.value<=n.value?await pe():n.value+=1}async function fe(){l.value=-1,n.value<=m.value?await me(!0):--n.value}async function pe(e=!1){l.value=1,f.value<$.value.length&&await h(f.value+1,e&&!i.value?be:void 0)}async function me(e=!1){l.value=-1,f.value>1&&await h(f.value-1,e&&!i.value?be:void 0)}function he(){return h(1)}function ge(){return h(s.value)}async function h(e,t=0,i=!1){rr.value=!1;let a=f.value!==e,s=t!==n.value,c=Jn(e)?.meta,l=c?.slide?.frontmatter.clicksStart??0;t=Se(t,l,c?.__clicksContext?.total??999999),(i||a||s)&&await o?.push({path:Yn(e,r.value,o.currentRoute.value.name===`export`),query:{...o.currentRoute.value.query,clicks:t===0?void 0:t.toString(),embedded:location.search.includes(`embedded`)?`true`:void 0}})}function _e(){o?.push({path:Yn(f.value,!0),query:{...o.currentRoute.value.query}})}function ve(){o?.push({path:Yn(f.value,!1),query:{...o.currentRoute.value.query}})}return{slides:$,total:s,currentPath:ee,currentSlideNo:f,currentPage:f,currentSlideRoute:e,currentLayout:te,currentFrontmatter:ne,currentTransition:ce,clicksDirection:l,nextRoute:ie,prevRoute:ae,clicksContext:t,clicks:p,clicksStart:m,clicksTotal:re,hasNext:oe,hasPrev:se,tocTree:ue,navDirection:c,openInEditor:le,next:de,prev:fe,go:h,goLast:ge,goFirst:he,nextSlide:pe,prevSlide:me,enterPresenter:_e,exitPresenter:ve}}var Hr=ue(()=>{let e=pe(),t=le(),n=u(()=>(e?.currentRoute?.value?.query,new URLSearchParams(location.search))),r=u(()=>n.value.has(`print`)||t.name===`export`),i=d(n.value.get(`print`)===`clicks`),a=u(()=>n.value.has(`embedded`)),o=u(()=>t.name===`play`),s=u(()=>t.name===`presenter`),c=u(()=>t.name===`notes`),l=u(()=>!s.value&&(!g.remote||n.value.get(`password`)===g.remote)),ee=u(()=>!!t.params.no),f=u(()=>ee.value?Jn(t.params.no)?.no??1:1),te=u(()=>$.value[f.value-1]),ne=d(Ke($.value.length,t?.query?.range)),p=Kn(`clicks`,`0`),m=u(()=>ie(te.value)),re=u({get(){let e=+(p.value||0);return Number.isNaN(e)&&(e=0),e},set(e){rr.value=!1,p.value=e.toString()}});function ie(e){if(e?.meta?.__clicksContext)return e.meta.__clicksContext;let t=e.no,n=He(u({get(){return f.value===t?Math.max(+(p.value??0),n.clicksStart):f.value>t?be:n.clicksStart},set(e){f.value===t&&(p.value=e.toString())}}),e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks);return e?.meta&&(e.meta.__clicksContext=n),n}return{router:e,currentRoute:u(()=>t),isPrintMode:r,isPrintWithClicks:i,isEmbedded:a,isPlaying:o,isPresenter:s,isNotesViewer:c,isPresenterAvailable:l,hasPrimarySlide:ee,currentSlideNo:f,currentSlideRoute:te,clicksContext:m,queryClicksRaw:p,queryClicks:re,printRange:ne,getPrimaryClicks:ie}}),Ur=ue(()=>{let e=Hr(),t=pe(),n=Vr(e.currentSlideRoute,e.clicksContext,e.queryClicks,e.isPresenter,e.isPrintMode,t);return a([n.total,e.currentRoute],async()=>{let t=e.currentRoute.value.params.no;e.hasPrimarySlide.value&&!Jn(t)&&(t&&t!==`index.html`?await n.go(n.total.value,0,!0):await n.go(1,0,!0))},{flush:`pre`,immediate:!0}),{...n,...e}});function Wr(){let e=Ur(),t=r()?ce(xe,void 0):void 0;if(!t)return e;let n=te(t).nav;return{...e,...n}}export{Fe as $,gr as A,Yn as B,sr as C,nr as D,er as E,Ar as F,Ue as G,Ke as H,kr as I,Ae as J,Be as K,_r as L,Fr as M,xr as N,yr as O,Mr as P,Me as Q,lr as R,ar as S,tr as T,Ge as U,$ as V,He as W,je as X,Ie as Y,Ne as Z,hr as _,br as a,Or as b,Tr as c,jr as d,Pe as et,vr as f,mr as g,Cr as h,cr as i,we as it,Ir as j,$n as k,wr as l,Nr as m,Er as n,Se as nt,Pr as o,rr as p,_ as q,pr as r,De as rt,ir as s,Wr as t,g as tt,fr as u,dr as v,Sr as w,Dr as x,ur as y,Jn as z}; \ No newline at end of file diff --git a/lecture-06/class/index.html b/lecture-06/class/index.html index 3ab4493ed1c063282aca0babbd4aeeeac3368ae5..0630410fb61ddd072fc8701a45b16997d5c27e9a 100644 --- a/lecture-06/class/index.html +++ b/lecture-06/class/index.html @@ -11,16 +11,16 @@ - + - + - +
diff --git a/lecture-06/index.html b/lecture-06/index.html index 1955ea37ea12d917ce7b09f3d58fad10191a13a2..327bc8ed3e524497d85d7ee86b539bb71ec2bf71 100644 --- a/lecture-06/index.html +++ b/lecture-06/index.html @@ -11,16 +11,16 @@ - + - + - +
diff --git a/lecture-06/slides.pdf b/lecture-06/slides.pdf index 2e0c2ac515fa8ab26befcb4fe969fdc87b8d6471..55f5769917784b1595250d5888eee6d1da1dad0c 100644 --- a/lecture-06/slides.pdf +++ b/lecture-06/slides.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a352935923567d9ac3424f15bf52fec1d373543deaf75216be95570e5c408c6 -size 4138382 +oid sha256:594f8b3f1aa845fdf2b24b29dbd88ce4f883949e895ae1cbea53e2548928a860 +size 4078605