@glifox/gnosis 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/gnosis.mjs +230 -4250
- package/dist/gnosis.umd.js +2 -7
- package/package.json +1 -1
package/dist/gnosis.umd.js
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
(function(m
|
|
2
|
-
`).
|
|
3
|
-
`)};class V extends b.WidgetType{constructor(t,n,c){super();v(this,"classes","");this.classes=t,this.width=n,this.marginLeft=c}toDOM(){let t=document.createElement("span");return t.setAttribute("aria-hidden","true"),t.className=this.classes+" vacio",t.textContent=" ",t.style.width=this.width,t.style.marginLeft=this.marginLeft,t}ignoreEvent(){return!1}}const be=r=>`<svg class="cb-icon" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
-
<path class="cb-icon-path cb.i1" fill-rule="evenodd" clip-rule="evenodd" d="M15 0C15.5304 0 16.0391 0.210714 16.4142 0.585786C16.7893 0.960859 17 1.46957 17 2V12C17 12.5304 16.7893 13.0391 16.4142 13.4142C16.0391 13.7893 15.5304 14 15 14H14V6C14 4.93913 13.5786 3.92172 12.8284 3.17157C12.0783 2.42143 11.0609 2 10 2H7C6.64895 1.99924 6.30395 2.09135 6 2.267V2C6 1.46957 6.21071 0.960859 6.58579 0.585786C6.96086 0.210714 7.46957 0 8 0H15Z"/>
|
|
5
|
-
<path class="cb-icon-path cb.i1" fill-rule="evenodd" clip-rule="evenodd" d="M5 4.054V8H1.2C1.27464 7.84448 1.3691 7.69928 1.481 7.568L3.941 4.698C4.2169 4.37661 4.58771 4.15111 5 4.054ZM7 4V8C7 8.53043 6.78929 9.03914 6.41421 9.41421C6.03914 9.78929 5.53043 10 5 10H1V16C1 16.5304 1.21071 17.0391 1.58579 17.4142C1.96086 17.7893 2.46957 18 3 18H10C10.5304 18 11.0391 17.7893 11.4142 17.4142C11.7893 17.0391 12 16.5304 12 16V6C12 5.46957 11.7893 4.96086 11.4142 4.58579C11.0391 4.21071 10.5304 4 10 4H7Z"/>
|
|
6
|
-
</svg>`;class ge extends b.WidgetType{constructor(a,t){super(),this.type=a,this.code=t}toDOM(){let a=document.createElement("span");a.setAttribute("aria-hidden","true"),a.className="wg-codeblock";let t=document.createElement("button");return t.className="wg-codeblock-btn",t.innerHTML=be(),a.appendChild(t),a}ignoreEvent(){return!1}}const S=[];function G(r,a){const{mode:t}=a,n=["Document","Blockquote","ListItem","BulletList","OrderedList"],c={FencedCode:j,CodeBlock:j},d={CodeMark:(o,l,g)=>[b.Decoration.mark({class:"cb-mk"}).range(l,g)],CodeInfo:(o,l,g)=>[b.Decoration.mark({class:"cb-mi"}).range(l,g)]},s=[];return A(r,{enter:({type:{name:o},from:l,to:g})=>(t==="type"&&o in c&&s.push(...c[o](r,l,g)),t==="mark"&&o in d&&s.push(...d[o](r,l,g)),n.includes(o)||o in c?(S.push({name:o,from:l,to:g}),!0):!1),Leave:({type:{name:o},from:l,to:g})=>n.includes(o)||o in c?(S.pop(),!0):!1}),{type:b.Decoration.set(s,!0),mark:b.Decoration.set(s,!0)}[t]}const j=(r,a,t)=>{const n=[],c=S[S.length-1],d=["BulletList","OrderedList","ListItem"].some(i=>i===c.name),s=["Blockquote"].some(i=>i===c.name),o=r.state.doc.lineAt(a),l=a-o.from,g=l>0,f=D(r,o.from,t);f||n.push(b.Decoration.widget({widget:new ge("view.state.sliceDoc(from, to)","code"),side:0}).range(a+1));const y=o.number,H=r.state.doc.sliceString(a,t).split(`
|
|
7
|
-
`).length;for(let i=y;i<H+y;i++){const{from:F,to:C}=r.state.doc.line(i),L="100% - 1.2ch",B=["cb-content"];f&&B.push("sw"),i===y&&B.push("cb-start"),i===H+y-1&&B.push("cb-end");const x=Math.max(F+l,0);if(C<x)B.push("free"),n.push(b.Decoration.widget({widget:new V(B.join(" "),`calc(${L} - ${x-F}ch)`,`calc(${x-C}ch + 2px)`),side:1}).range(C)),console.log("Hello World");else if(x===C)B.push("wg"),n.push(b.Decoration.widget({widget:new V(B.join(" "),`calc(${L} - ${x-F}ch)`),side:1}).range(x));else if(d||s||g){const I={style:`width: calc(${L} - ${x-F}ch)`};C>x&&n.push(b.Decoration.mark({class:B.join(" "),attributes:I}).range(x,C)),F!==x&&d&&n.push(b.Decoration.mark({class:"cb-listsp"}).range(F,x)),F!==x&&g&&n.push(b.Decoration.mark({class:"cb-spacer"}).range(F,x)),F!==x&&s&&n.push(b.Decoration.mark({class:"cb-quote bq"}).range(F,x))}else if(F!==C){const I={style:`width: calc(${L})`};n.push(b.Decoration.mark({class:B.join(" "),attributes:I}).range(F,C))}n.push(b.Decoration.line({class:"cb-line"}).range(F))}return n},me=()=>{const n="4px",c="1.15lh";return w.EditorView.baseTheme({".cb-start":{borderRadius:`${n} ${n} 0 0`},".cb-end ":{borderRadius:`0 0 ${n} ${n}`},".cb-start.cb-end":{borderRadius:`${n}`},".cb-content":{display:"inline-block",marginLeft:"2px",paddingLeft:"6px",paddingRigth:"0px",position:"relative"},".cb-content.wg":{cursor:"text"},".cb-content.wg.start":{maxWidth:"1px",Width:"1px",paddingLeft:"5px"},".cb-content.wg.end":{marginLeft:"0",paddingLeft:"0"},".cb-mi, .cb-mk":{color:"transparent"},"&.cm-focused .cb-content.sw > .cb-mi, &.cm-focused .cb-content.sw > .cb-mk":{color:"inherit"},"&.cm-focused .cb-content.sw .wg-codeblock":{display:"none",opacity:"0"},".wg-codeblock":{display:"inline-block",position:"absolute",top:"0",right:"0",zIndex:"100",margin:"4px"},".wg-codeblock-btn":{padding:"0",display:"inline-flex",borderRadius:"999999px",background:"transparent",border:"none",outline:"none",justifyContent:"center",alignItems:"center",height:`calc(${c} + 4px )`,width:"5ch"},".cb-icon":{width:c,height:c,pointerEvents:"none",fill:"currentColor",opacity:"0.7"},".wg-codeblock-btn:hover":{background:"rgba(0, 0, 0, 0.07)"},".wg-codeblock-btn:hover .cb-icon":{opacity:"1"},".cb-content.cb-start.cb-end .wg-codeblock":{marginTop:"0",marginBottom:"0",top:"0",bottom:"0"},".cb-content.cb-start.cb-end .wg-codeblock-btn":{boxSizing:"border-box",maxHeight:"100%",width:"5ch"}})},P=r=>[E(G,{mode:"mark"}),E(G,{mode:"type"},{eventHandlers:{mousedown:le}}),me()];function ue(r,a){const t=["Document"],n={ATXHeading1:(s,o=!0)=>b.Decoration.line({class:"h1 hg "+(o?"sw":"")}).range(s),ATXHeading2:(s,o=!0)=>b.Decoration.line({class:"h2 hg "+(o?"sw":"")}).range(s),ATXHeading3:(s,o=!0)=>b.Decoration.line({class:"h3 hg "+(o?"sw":"")}).range(s),ATXHeading4:(s,o=!0)=>b.Decoration.line({class:"h4 hg "+(o?"sw":"")}).range(s),ATXHeading5:(s,o=!0)=>b.Decoration.line({class:"h5 hg "+(o?"sw":"")}).range(s),ATXHeading6:(s,o=!0)=>b.Decoration.line({class:"h6 hg "+(o?"sw":"")}).range(s)},c={HeaderMark:(s,o)=>b.Decoration.mark({class:"mk"}).range(s,o)},d=[];return A(r,{enter:({type:s,from:o,to:l})=>(s.name in n&&d.push(n[s.name](o,D(r,o,l))),s.name in c&&d.push(c[s.name](o,l+1)),t.includes(s.name)||s.name in n)}),b.Decoration.set(d,!1)}const fe=w.EditorView.baseTheme({".h1 ":{fontSize:"2.6rem"},".h2 ":{fontSize:"2.0rem"},".h3 ":{fontSize:"1.8rem"},".h4 ":{fontSize:"1.6rem"},".h5 ":{fontSize:"1.4rem"},".h6 ":{fontSize:"1.2rem"}}),pe=w.EditorView.baseTheme({".hg .mk":{fontSize:"0"},"&.cm-focused .hg.sw .mk":{fontSize:"inherit"}}),$=(r={})=>[E(ue,{}),fe,pe],xe={version:"1.7.1",latte:{name:"Latte",emoji:"🌻",order:0,dark:!1,colors:{rosewater:{name:"Rosewater",order:0,hex:"#dc8a78",rgb:{r:220,g:138,b:120},hsl:{h:10.799999999999995,s:.5882352941176472,l:.6666666666666667},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#dd7878",rgb:{r:221,g:120,b:120},hsl:{h:0,s:.5976331360946746,l:.6686274509803922},accent:!0},pink:{name:"Pink",order:2,hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},accent:!0},mauve:{name:"Mauve",order:3,hex:"#8839ef",rgb:{r:136,g:57,b:239},hsl:{h:266.0439560439561,s:.8504672897196262,l:.5803921568627451},accent:!0},red:{name:"Red",order:4,hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},accent:!0},maroon:{name:"Maroon",order:5,hex:"#e64553",rgb:{r:230,g:69,b:83},hsl:{h:354.78260869565213,s:.76303317535545,l:.5862745098039216},accent:!0},peach:{name:"Peach",order:6,hex:"#fe640b",rgb:{r:254,g:100,b:11},hsl:{h:21.975308641975307,s:.9918367346938776,l:.5196078431372549},accent:!0},yellow:{name:"Yellow",order:7,hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},accent:!0},green:{name:"Green",order:8,hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},accent:!0},teal:{name:"Teal",order:9,hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},accent:!0},sky:{name:"Sky",order:10,hex:"#04a5e5",rgb:{r:4,g:165,b:229},hsl:{h:197.0666666666667,s:.965665236051502,l:.45686274509803926},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#209fb5",rgb:{r:32,g:159,b:181},hsl:{h:188.85906040268458,s:.6995305164319249,l:.4176470588235294},accent:!0},blue:{name:"Blue",order:12,hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},accent:!0},lavender:{name:"Lavender",order:13,hex:"#7287fd",rgb:{r:114,g:135,b:253},hsl:{h:230.93525179856115,s:.9720279720279721,l:.7196078431372549},accent:!0},text:{name:"Text",order:14,hex:"#4c4f69",rgb:{r:76,g:79,b:105},hsl:{h:233.79310344827587,s:.16022099447513813,l:.3549019607843137},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#7c7f93",rgb:{r:124,g:127,b:147},hsl:{h:232.17391304347825,s:.09623430962343092,l:.5313725490196078},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8c8fa1",rgb:{r:140,g:143,b:161},hsl:{h:231.42857142857144,s:.10047846889952144,l:.5901960784313726},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#9ca0b0",rgb:{r:156,g:160,b:176},hsl:{h:228.00000000000003,s:.11235955056179768,l:.6509803921568628},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#ccd0da",rgb:{r:204,g:208,b:218},hsl:{h:222.85714285714292,s:.1590909090909089,l:.8274509803921568},accent:!1},base:{name:"Base",order:23,hex:"#eff1f5",rgb:{r:239,g:241,b:245},hsl:{h:220.00000000000009,s:.23076923076923136,l:.9490196078431372},accent:!1},mantle:{name:"Mantle",order:24,hex:"#e6e9ef",rgb:{r:230,g:233,b:239},hsl:{h:220.00000000000006,s:.21951219512195116,l:.919607843137255},accent:!1},crust:{name:"Crust",order:25,hex:"#dce0e8",rgb:{r:220,g:224,b:232},hsl:{h:220.00000000000006,s:.20689655172413762,l:.8862745098039215},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#5c5f77",rgb:{r:92,g:95,b:119},hsl:{h:233.33333333333334,s:.1279620853080569,l:.4137254901960784},code:0},bright:{name:"Bright Black",hex:"#6c6f85",rgb:{r:108,g:111,b:133},hsl:{h:232.79999999999998,s:.10373443983402494,l:.4725490196078431},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#d20f39",rgb:{r:210,g:15,b:57},hsl:{h:347.0769230769231,s:.8666666666666666,l:.4411764705882353},code:1},bright:{name:"Bright Red",hex:"#de293e",rgb:{r:222,g:41,b:62},hsl:{h:353.0386740331492,s:.7327935222672065,l:.515686274509804},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#40a02b",rgb:{r:64,g:160,b:43},hsl:{h:109.23076923076923,s:.5763546798029556,l:.39803921568627454},code:2},bright:{name:"Bright Green",hex:"#49af3d",rgb:{r:73,g:175,b:61},hsl:{h:113.68421052631581,s:.48305084745762705,l:.4627450980392157},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#df8e1d",rgb:{r:223,g:142,b:29},hsl:{h:34.948453608247426,s:.7698412698412698,l:.49411764705882355},code:3},bright:{name:"Bright Yellow",hex:"#eea02d",rgb:{r:238,g:160,b:45},hsl:{h:35.751295336787564,s:.8502202643171807,l:.5549019607843138},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#1e66f5",rgb:{r:30,g:102,b:245},hsl:{h:219.90697674418607,s:.9148936170212768,l:.5392156862745098},code:4},bright:{name:"Bright Blue",hex:"#456eff",rgb:{r:69,g:110,b:255},hsl:{h:226.77419354838707,s:1,l:.6352941176470588},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#ea76cb",rgb:{r:234,g:118,b:203},hsl:{h:316.0344827586207,s:.7341772151898731,l:.6901960784313725},code:5},bright:{name:"Bright Magenta",hex:"#fe85d8",rgb:{r:254,g:133,b:216},hsl:{h:318.8429752066116,s:.983739837398374,l:.7588235294117647},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#179299",rgb:{r:23,g:146,b:153},hsl:{h:183.23076923076923,s:.7386363636363636,l:.34509803921568627},code:6},bright:{name:"Bright Cyan",hex:"#2d9fa8",rgb:{r:45,g:159,b:168},hsl:{h:184.39024390243904,s:.5774647887323943,l:.4176470588235294},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#acb0be",rgb:{r:172,g:176,b:190},hsl:{h:226.6666666666667,s:.12162162162162159,l:.7098039215686275},code:7},bright:{name:"Bright White",hex:"#bcc0cc",rgb:{r:188,g:192,b:204},hsl:{h:225.00000000000003,s:.13559322033898308,l:.7686274509803922},code:15}}}},frappe:{name:"Frappé",emoji:"🪴",order:1,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f2d5cf",rgb:{r:242,g:213,b:207},hsl:{h:10.2857142857143,s:.5737704918032784,l:.8803921568627451},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#eebebe",rgb:{r:238,g:190,b:190},hsl:{h:0,s:.5853658536585367,l:.8392156862745098},accent:!0},pink:{name:"Pink",order:2,hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},accent:!0},mauve:{name:"Mauve",order:3,hex:"#ca9ee6",rgb:{r:202,g:158,b:230},hsl:{h:276.66666666666663,s:.5901639344262294,l:.7607843137254902},accent:!0},red:{name:"Red",order:4,hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ea999c",rgb:{r:234,g:153,b:156},hsl:{h:357.77777777777777,s:.6585365853658534,l:.7588235294117647},accent:!0},peach:{name:"Peach",order:6,hex:"#ef9f76",rgb:{r:239,g:159,b:118},hsl:{h:20.33057851239669,s:.7908496732026143,l:.7},accent:!0},yellow:{name:"Yellow",order:7,hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},accent:!0},green:{name:"Green",order:8,hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},accent:!0},teal:{name:"Teal",order:9,hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},accent:!0},sky:{name:"Sky",order:10,hex:"#99d1db",rgb:{r:153,g:209,b:219},hsl:{h:189.09090909090907,s:.47826086956521735,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#85c1dc",rgb:{r:133,g:193,b:220},hsl:{h:198.62068965517244,s:.5541401273885351,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},accent:!0},lavender:{name:"Lavender",order:13,hex:"#babbf1",rgb:{r:186,g:187,b:241},hsl:{h:238.90909090909093,s:.6626506024096385,l:.8372549019607842},accent:!0},text:{name:"Text",order:14,hex:"#c6d0f5",rgb:{r:198,g:208,b:245},hsl:{h:227.2340425531915,s:.7014925373134333,l:.8686274509803922},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#949cbb",rgb:{r:148,g:156,b:187},hsl:{h:227.69230769230768,s:.22285714285714275,l:.6568627450980392},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#838ba7",rgb:{r:131,g:139,b:167},hsl:{h:226.66666666666669,s:.16981132075471703,l:.584313725490196},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#737994",rgb:{r:115,g:121,b:148},hsl:{h:229.0909090909091,s:.13360323886639683,l:.515686274509804},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#414559",rgb:{r:65,g:69,b:89},hsl:{h:230.00000000000003,s:.15584415584415584,l:.30196078431372547},accent:!1},base:{name:"Base",order:23,hex:"#303446",rgb:{r:48,g:52,b:70},hsl:{h:229.0909090909091,s:.18644067796610175,l:.23137254901960785},accent:!1},mantle:{name:"Mantle",order:24,hex:"#292c3c",rgb:{r:41,g:44,b:60},hsl:{h:230.52631578947367,s:.18811881188118806,l:.19803921568627453},accent:!1},crust:{name:"Crust",order:25,hex:"#232634",rgb:{r:35,g:38,b:52},hsl:{h:229.41176470588238,s:.19540229885057467,l:.17058823529411765},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#51576d",rgb:{r:81,g:87,b:109},hsl:{h:227.14285714285714,s:.14736842105263157,l:.37254901960784315},code:0},bright:{name:"Bright Black",hex:"#626880",rgb:{r:98,g:104,b:128},hsl:{h:228.00000000000003,s:.1327433628318584,l:.44313725490196076},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#e78284",rgb:{r:231,g:130,b:132},hsl:{h:358.8118811881188,s:.6778523489932885,l:.7078431372549019},code:1},bright:{name:"Bright Red",hex:"#e67172",rgb:{r:230,g:113,b:114},hsl:{h:359.4871794871795,s:.7005988023952096,l:.6725490196078432},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6d189",rgb:{r:166,g:209,b:137},hsl:{h:95.83333333333331,s:.4390243902439024,l:.6784313725490196},code:2},bright:{name:"Bright Green",hex:"#8ec772",rgb:{r:142,g:199,b:114},hsl:{h:100.23529411764706,s:.431472081218274,l:.6137254901960785},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#e5c890",rgb:{r:229,g:200,b:144},hsl:{h:39.52941176470588,s:.6204379562043796,l:.7313725490196079},code:3},bright:{name:"Bright Yellow",hex:"#d9ba73",rgb:{r:217,g:186,b:115},hsl:{h:41.764705882352935,s:.5730337078651685,l:.6509803921568628},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8caaee",rgb:{r:140,g:170,b:238},hsl:{h:221.6326530612245,s:.7424242424242424,l:.7411764705882353},code:4},bright:{name:"Bright Blue",hex:"#7b9ef0",rgb:{r:123,g:158,b:240},hsl:{h:222.05128205128207,s:.7959183673469388,l:.711764705882353},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f4b8e4",rgb:{r:244,g:184,b:228},hsl:{h:316,s:.7317073170731713,l:.8392156862745098},code:5},bright:{name:"Bright Magenta",hex:"#f2a4db",rgb:{r:242,g:164,b:219},hsl:{h:317.6923076923077,s:.7499999999999998,l:.7960784313725491},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#81c8be",rgb:{r:129,g:200,b:190},hsl:{h:171.5492957746479,s:.3922651933701657,l:.6450980392156862},code:6},bright:{name:"Bright Cyan",hex:"#5abfb5",rgb:{r:90,g:191,b:181},hsl:{h:174.05940594059405,s:.44104803493449785,l:.5509803921568628},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adce",rgb:{r:165,g:173,b:206},hsl:{h:228.29268292682926,s:.2949640287769784,l:.7274509803921569},code:7},bright:{name:"Bright White",hex:"#b5bfe2",rgb:{r:181,g:191,b:226},hsl:{h:226.66666666666669,s:.43689320388349495,l:.7980392156862746},code:15}}}},macchiato:{name:"Macchiato",emoji:"🌺",order:2,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f4dbd6",rgb:{r:244,g:219,b:214},hsl:{h:9.999999999999963,s:.5769230769230775,l:.8980392156862745},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f0c6c6",rgb:{r:240,g:198,b:198},hsl:{h:0,s:.5833333333333333,l:.8588235294117648},accent:!0},pink:{name:"Pink",order:2,hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},accent:!0},mauve:{name:"Mauve",order:3,hex:"#c6a0f6",rgb:{r:198,g:160,b:246},hsl:{h:266.51162790697674,s:.8269230769230772,l:.7960784313725491},accent:!0},red:{name:"Red",order:4,hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},accent:!0},maroon:{name:"Maroon",order:5,hex:"#ee99a0",rgb:{r:238,g:153,b:160},hsl:{h:355.05882352941177,s:.7142857142857143,l:.7666666666666666},accent:!0},peach:{name:"Peach",order:6,hex:"#f5a97f",rgb:{r:245,g:169,b:127},hsl:{h:21.355932203389827,s:.8550724637681162,l:.7294117647058824},accent:!0},yellow:{name:"Yellow",order:7,hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},accent:!0},green:{name:"Green",order:8,hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},accent:!0},teal:{name:"Teal",order:9,hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},accent:!0},sky:{name:"Sky",order:10,hex:"#91d7e3",rgb:{r:145,g:215,b:227},hsl:{h:188.78048780487802,s:.5942028985507245,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#7dc4e4",rgb:{r:125,g:196,b:228},hsl:{h:198.64077669902912,s:.6560509554140128,l:.692156862745098},accent:!0},blue:{name:"Blue",order:12,hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b7bdf8",rgb:{r:183,g:189,b:248},hsl:{h:234.46153846153848,s:.8227848101265824,l:.8450980392156863},accent:!0},text:{name:"Text",order:14,hex:"#cad3f5",rgb:{r:202,g:211,b:245},hsl:{h:227.4418604651163,s:.6825396825396831,l:.8764705882352941},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#939ab7",rgb:{r:147,g:154,b:183},hsl:{h:228.33333333333331,s:.2000000000000001,l:.6470588235294117},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#8087a2",rgb:{r:128,g:135,b:162},hsl:{h:227.6470588235294,s:.1545454545454545,l:.5686274509803921},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6e738d",rgb:{r:110,g:115,b:141},hsl:{h:230.32258064516128,s:.12350597609561753,l:.49215686274509807},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#363a4f",rgb:{r:54,g:58,b:79},hsl:{h:230.4,s:.1879699248120301,l:.2607843137254902},accent:!1},base:{name:"Base",order:23,hex:"#24273a",rgb:{r:36,g:39,b:58},hsl:{h:231.8181818181818,s:.23404255319148934,l:.1843137254901961},accent:!1},mantle:{name:"Mantle",order:24,hex:"#1e2030",rgb:{r:30,g:32,b:48},hsl:{h:233.33333333333334,s:.23076923076923075,l:.15294117647058825},accent:!1},crust:{name:"Crust",order:25,hex:"#181926",rgb:{r:24,g:25,b:38},hsl:{h:235.71428571428572,s:.22580645161290322,l:.12156862745098039},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#494d64",rgb:{r:73,g:77,b:100},hsl:{h:231.11111111111114,s:.15606936416184972,l:.3392156862745098},code:0},bright:{name:"Bright Black",hex:"#5b6078",rgb:{r:91,g:96,b:120},hsl:{h:229.65517241379308,s:.13744075829383887,l:.4137254901960784},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#ed8796",rgb:{r:237,g:135,b:150},hsl:{h:351.1764705882353,s:.7391304347826088,l:.7294117647058824},code:1},bright:{name:"Bright Red",hex:"#ec7486",rgb:{r:236,g:116,b:134},hsl:{h:351,s:.759493670886076,l:.6901960784313725},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6da95",rgb:{r:166,g:218,b:149},hsl:{h:105.21739130434783,s:.4825174825174825,l:.7196078431372549},code:2},bright:{name:"Bright Green",hex:"#8ccf7f",rgb:{r:140,g:207,b:127},hsl:{h:110.24999999999999,s:.45454545454545453,l:.6549019607843137},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#eed49f",rgb:{r:238,g:212,b:159},hsl:{h:40.253164556962034,s:.6991150442477877,l:.7784313725490196},code:3},bright:{name:"Bright Yellow",hex:"#e1c682",rgb:{r:225,g:198,b:130},hsl:{h:42.94736842105264,s:.6129032258064515,l:.696078431372549},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#8aadf4",rgb:{r:138,g:173,b:244},hsl:{h:220.188679245283,s:.8281250000000003,l:.7490196078431373},code:4},bright:{name:"Bright Blue",hex:"#78a1f6",rgb:{r:120,g:161,b:246},hsl:{h:220.47619047619048,s:.8750000000000002,l:.7176470588235294},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5bde6",rgb:{r:245,g:189,b:230},hsl:{h:316.0714285714286,s:.7368421052631583,l:.8509803921568628},code:5},bright:{name:"Bright Magenta",hex:"#f2a9dd",rgb:{r:242,g:169,b:221},hsl:{h:317.26027397260276,s:.7373737373737372,l:.8058823529411765},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#8bd5ca",rgb:{r:139,g:213,b:202},hsl:{h:171.08108108108107,s:.46835443037974706,l:.6901960784313725},code:6},bright:{name:"Bright Cyan",hex:"#63cbc0",rgb:{r:99,g:203,b:192},hsl:{h:173.65384615384616,s:.4999999999999998,l:.592156862745098},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a5adcb",rgb:{r:165,g:173,b:203},hsl:{h:227.36842105263156,s:.2676056338028167,l:.7215686274509804},code:7},bright:{name:"Bright White",hex:"#b8c0e0",rgb:{r:184,g:192,b:224},hsl:{h:228,s:.39215686274509803,l:.8},code:15}}}},mocha:{name:"Mocha",emoji:"🌿",order:3,dark:!0,colors:{rosewater:{name:"Rosewater",order:0,hex:"#f5e0dc",rgb:{r:245,g:224,b:220},hsl:{h:9.599999999999968,s:.555555555555556,l:.911764705882353},accent:!0},flamingo:{name:"Flamingo",order:1,hex:"#f2cdcd",rgb:{r:242,g:205,b:205},hsl:{h:0,s:.587301587301587,l:.8764705882352941},accent:!0},pink:{name:"Pink",order:2,hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},accent:!0},mauve:{name:"Mauve",order:3,hex:"#cba6f7",rgb:{r:203,g:166,b:247},hsl:{h:267.4074074074074,s:.8350515463917528,l:.8098039215686275},accent:!0},red:{name:"Red",order:4,hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},accent:!0},maroon:{name:"Maroon",order:5,hex:"#eba0ac",rgb:{r:235,g:160,b:172},hsl:{h:350.4,s:.6521739130434779,l:.7745098039215685},accent:!0},peach:{name:"Peach",order:6,hex:"#fab387",rgb:{r:250,g:179,b:135},hsl:{h:22.95652173913043,s:.92,l:.7549019607843137},accent:!0},yellow:{name:"Yellow",order:7,hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},accent:!0},green:{name:"Green",order:8,hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},accent:!0},teal:{name:"Teal",order:9,hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},accent:!0},sky:{name:"Sky",order:10,hex:"#89dceb",rgb:{r:137,g:220,b:235},hsl:{h:189.18367346938774,s:.7101449275362316,l:.7294117647058823},accent:!0},sapphire:{name:"Sapphire",order:11,hex:"#74c7ec",rgb:{r:116,g:199,b:236},hsl:{h:198.5,s:.759493670886076,l:.6901960784313725},accent:!0},blue:{name:"Blue",order:12,hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},accent:!0},lavender:{name:"Lavender",order:13,hex:"#b4befe",rgb:{r:180,g:190,b:254},hsl:{h:231.89189189189187,s:.9736842105263159,l:.8509803921568628},accent:!0},text:{name:"Text",order:14,hex:"#cdd6f4",rgb:{r:205,g:214,b:244},hsl:{h:226.15384615384616,s:.6393442622950825,l:.8803921568627451},accent:!1},subtext1:{name:"Subtext 1",order:15,hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},accent:!1},subtext0:{name:"Subtext 0",order:16,hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},accent:!1},overlay2:{name:"Overlay 2",order:17,hex:"#9399b2",rgb:{r:147,g:153,b:178},hsl:{h:228.38709677419354,s:.16756756756756758,l:.6372549019607843},accent:!1},overlay1:{name:"Overlay 1",order:18,hex:"#7f849c",rgb:{r:127,g:132,b:156},hsl:{h:229.65517241379308,s:.12775330396475776,l:.5549019607843138},accent:!1},overlay0:{name:"Overlay 0",order:19,hex:"#6c7086",rgb:{r:108,g:112,b:134},hsl:{h:230.7692307692308,s:.10743801652892565,l:.4745098039215686},accent:!1},surface2:{name:"Surface 2",order:20,hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},accent:!1},surface1:{name:"Surface 1",order:21,hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},accent:!1},surface0:{name:"Surface 0",order:22,hex:"#313244",rgb:{r:49,g:50,b:68},hsl:{h:236.84210526315792,s:.16239316239316234,l:.22941176470588237},accent:!1},base:{name:"Base",order:23,hex:"#1e1e2e",rgb:{r:30,g:30,b:46},hsl:{h:240,s:.21052631578947367,l:.14901960784313725},accent:!1},mantle:{name:"Mantle",order:24,hex:"#181825",rgb:{r:24,g:24,b:37},hsl:{h:240,s:.2131147540983607,l:.11960784313725491},accent:!1},crust:{name:"Crust",order:25,hex:"#11111b",rgb:{r:17,g:17,b:27},hsl:{h:240,s:.22727272727272727,l:.08627450980392157},accent:!1}},ansiColors:{black:{name:"Black",order:0,normal:{name:"Black",hex:"#45475a",rgb:{r:69,g:71,b:90},hsl:{h:234.2857142857143,s:.13207547169811326,l:.31176470588235294},code:0},bright:{name:"Bright Black",hex:"#585b70",rgb:{r:88,g:91,b:112},hsl:{h:232.5,s:.12,l:.39215686274509803},code:8}},red:{name:"Red",order:1,normal:{name:"Red",hex:"#f38ba8",rgb:{r:243,g:139,b:168},hsl:{h:343.2692307692308,s:.8124999999999998,l:.7490196078431373},code:1},bright:{name:"Bright Red",hex:"#f37799",rgb:{r:243,g:119,b:153},hsl:{h:343.54838709677415,s:.8378378378378376,l:.7098039215686274},code:9}},green:{name:"Green",order:2,normal:{name:"Green",hex:"#a6e3a1",rgb:{r:166,g:227,b:161},hsl:{h:115.45454545454544,s:.5409836065573769,l:.7607843137254902},code:2},bright:{name:"Bright Green",hex:"#89d88b",rgb:{r:137,g:216,b:139},hsl:{h:121.51898734177213,s:.5031847133757963,l:.692156862745098},code:10}},yellow:{name:"Yellow",order:3,normal:{name:"Yellow",hex:"#f9e2af",rgb:{r:249,g:226,b:175},hsl:{h:41.35135135135135,s:.8604651162790699,l:.8313725490196078},code:3},bright:{name:"Bright Yellow",hex:"#ebd391",rgb:{r:235,g:211,b:145},hsl:{h:44,s:.692307692307692,l:.7450980392156863},code:11}},blue:{name:"Blue",order:4,normal:{name:"Blue",hex:"#89b4fa",rgb:{r:137,g:180,b:250},hsl:{h:217.1681415929203,s:.9186991869918699,l:.7588235294117647},code:4},bright:{name:"Bright Blue",hex:"#74a8fc",rgb:{r:116,g:168,b:252},hsl:{h:217.05882352941174,s:.9577464788732396,l:.7215686274509804},code:12}},magenta:{name:"Magenta",order:5,normal:{name:"Magenta",hex:"#f5c2e7",rgb:{r:245,g:194,b:231},hsl:{h:316.4705882352941,s:.7183098591549301,l:.8607843137254902},code:5},bright:{name:"Bright Magenta",hex:"#f2aede",rgb:{r:242,g:174,b:222},hsl:{h:317.6470588235294,s:.7234042553191488,l:.8156862745098039},code:13}},cyan:{name:"Cyan",order:6,normal:{name:"Cyan",hex:"#94e2d5",rgb:{r:148,g:226,b:213},hsl:{h:170.00000000000003,s:.5735294117647057,l:.7333333333333334},code:6},bright:{name:"Bright Cyan",hex:"#6bd7ca",rgb:{r:107,g:215,b:202},hsl:{h:172.77777777777777,s:.5744680851063831,l:.6313725490196078},code:14}},white:{name:"White",order:7,normal:{name:"White",hex:"#a6adc8",rgb:{r:166,g:173,b:200},hsl:{h:227.6470588235294,s:.23611111111111102,l:.7176470588235294},code:7},bright:{name:"Bright White",hex:"#bac2de",rgb:{r:186,g:194,b:222},hsl:{h:226.66666666666669,s:.35294117647058837,l:.8},code:15}}}}},T=r=>Object.entries(r),{version:Ce,...ke}=xe,z=T(ke).reduce((r,[a,t])=>(r[a]={...t,colorEntries:T(t.colors),ansiColorEntries:T(t.ansiColors)},r),{});T(z);const p=({variant:r,settings:a,styles:t})=>{const n=b.EditorView.theme({"&":{backgroundColor:a.background,color:a.foreground},".cm-content":{caretColor:a.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:a.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:a.selection},".cm-activeLine":{backgroundColor:a.lineHighlight},".cm-gutters":{backgroundColor:a.gutterBackground,color:a.gutterForeground},".cm-activeLineGutter":{backgroundColor:a.lineHighlight}},{dark:r==="dark"}),c=M.HighlightStyle.define(t);return[n,M.syntaxHighlighting(c)]};p({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:e.tags.comment,color:"#404080"},{tag:[e.tags.string,e.tags.regexp],color:"#999999"},{tag:e.tags.number,color:"#7090B0"},{tag:[e.tags.bool,e.tags.null],color:"#8080A0"},{tag:[e.tags.punctuation,e.tags.derefOperator],color:"#805080"},{tag:e.tags.keyword,color:"#60B0FF"},{tag:e.tags.definitionKeyword,color:"#B0FFF0"},{tag:e.tags.moduleKeyword,color:"#60B0FF"},{tag:e.tags.operator,color:"#A0A0FF"},{tag:[e.tags.variableName,e.tags.self],color:"#008080"},{tag:e.tags.operatorKeyword,color:"#A0A0FF"},{tag:e.tags.controlKeyword,color:"#80A0FF"},{tag:e.tags.className,color:"#70E080"},{tag:[e.tags.function(e.tags.propertyName),e.tags.propertyName],color:"#50A0A0"},{tag:e.tags.tagName,color:"#009090"},{tag:e.tags.modifier,color:"#B0FFF0"},{tag:[e.tags.squareBracket,e.tags.attributeName],color:"#D0D0FF"}]}),p({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:e.tags.comment,color:"#787b8099"},{tag:e.tags.string,color:"#86b300"},{tag:e.tags.regexp,color:"#4cbf99"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#ffaa33"},{tag:e.tags.variableName,color:"#5c6166"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#fa8d3e"},{tag:[e.tags.keyword,e.tags.special(e.tags.brace)],color:"#fa8d3e"},{tag:e.tags.operator,color:"#ed9366"},{tag:e.tags.separator,color:"#5c6166b3"},{tag:e.tags.punctuation,color:"#5c6166"},{tag:[e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName)],color:"#f2ae49"},{tag:[e.tags.className,e.tags.definition(e.tags.typeName)],color:"#22a4e6"},{tag:[e.tags.tagName,e.tags.typeName,e.tags.self,e.tags.labelName],color:"#55b4d4"},{tag:e.tags.angleBracket,color:"#55b4d480"},{tag:e.tags.attributeName,color:"#f2ae49"}]}),p({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:e.tags.comment,color:"#6E6E6E"},{tag:[e.tags.string,e.tags.regexp,e.tags.special(e.tags.brace)],color:"#5C81B3"},{tag:e.tags.number,color:"#C1E1B8"},{tag:e.tags.bool,color:"#53667D"},{tag:[e.tags.definitionKeyword,e.tags.modifier,e.tags.function(e.tags.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[e.tags.keyword,e.tags.moduleKeyword,e.tags.operatorKeyword,e.tags.operator],color:"#697A8E",fontWeight:"bold"},{tag:[e.tags.variableName,e.tags.attributeName],color:"#708E67"},{tag:[e.tags.function(e.tags.variableName),e.tags.definition(e.tags.propertyName),e.tags.derefOperator],color:"#fff"},{tag:e.tags.tagName,color:"#A3D295"}]}),p({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:e.tags.comment,color:"#666666"},{tag:[e.tags.string,e.tags.special(e.tags.brace)],color:"#54BE0D"},{tag:e.tags.regexp,color:"#E9C062"},{tag:e.tags.number,color:"#CF6A4C"},{tag:[e.tags.keyword,e.tags.operator],color:"#5EA6EA"},{tag:e.tags.variableName,color:"#7587A6"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#F9EE98"},{tag:[e.tags.propertyName,e.tags.function(e.tags.variableName)],color:"#937121"},{tag:[e.tags.typeName,e.tags.angleBracket,e.tags.tagName],color:"#9B859D"}]}),p({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:e.tags.comment,color:"#6B4E32"},{tag:[e.tags.keyword,e.tags.operator,e.tags.derefOperator],color:"#EF5D32"},{tag:e.tags.className,color:"#EFAC32",fontWeight:"bold"},{tag:[e.tags.typeName,e.tags.propertyName,e.tags.function(e.tags.variableName),e.tags.definition(e.tags.variableName)],color:"#EFAC32"},{tag:e.tags.definition(e.tags.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:e.tags.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[e.tags.number,e.tags.bool],color:"#6C99BB"},{tag:[e.tags.variableName,e.tags.self],color:"#7DAF9C"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#D9D762"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.attributeName],color:"#EFCB43"}]}),p({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:e.tags.comment,color:"#404040"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#00D8FF"},{tag:e.tags.number,color:"#E62286"},{tag:[e.tags.variableName,e.tags.attributeName,e.tags.self],color:"#E62286",fontWeight:"bold"},{tag:e.tags.function(e.tags.variableName),color:"#fff",fontWeight:"bold"}]}),p({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:e.tags.comment,color:"#BCC8BA"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#5D90CD"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#46A609"},{tag:e.tags.keyword,color:"#AF956F"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#C52727"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.attributeName],color:"#606060"},{tag:e.tags.self,color:"#000"}]}),p({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:e.tags.comment,color:"#0088FF"},{tag:e.tags.string,color:"#3AD900"},{tag:e.tags.regexp,color:"#80FFC2"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#FF628C"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#FFEE80"},{tag:e.tags.variableName,color:"#CCCCCC"},{tag:e.tags.self,color:"#FF80E1"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.definition(e.tags.typeName),e.tags.labelName],color:"#FFDD00"},{tag:[e.tags.keyword,e.tags.operator],color:"#FF9D00"},{tag:[e.tags.propertyName,e.tags.typeName],color:"#80FFBB"},{tag:e.tags.special(e.tags.brace),color:"#EDEF7D"},{tag:e.tags.attributeName,color:"#9EFFFF"},{tag:e.tags.derefOperator,color:"#fff"}]}),p({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:e.tags.comment,color:"#AEAEAE"},{tag:[e.tags.string,e.tags.special(e.tags.brace),e.tags.regexp],color:"#8DFF8E"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.function(e.tags.definition(e.tags.variableName)),e.tags.definition(e.tags.typeName)],color:"#A3EBFF"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#62E9BD"},{tag:[e.tags.keyword,e.tags.operator],color:"#2BF1DC"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#F8FBB1"},{tag:[e.tags.variableName,e.tags.self],color:"#B683CA"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.typeName,e.tags.propertyName],color:"#60A4F1"},{tag:e.tags.derefOperator,color:"#E0E0E0"},{tag:e.tags.attributeName,color:"#7BACCA"}]}),p({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:e.tags.comment,color:"#6272a4"},{tag:[e.tags.string,e.tags.special(e.tags.brace)],color:"#f1fa8c"},{tag:[e.tags.number,e.tags.self,e.tags.bool,e.tags.null],color:"#bd93f9"},{tag:[e.tags.keyword,e.tags.operator],color:"#ff79c6"},{tag:[e.tags.definitionKeyword,e.tags.typeName],color:"#8be9fd"},{tag:e.tags.definition(e.tags.typeName),color:"#f8f8f2"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.attributeName],color:"#50fa7b"}]}),p({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:e.tags.comment,color:"#AAAAAA"},{tag:[e.tags.keyword,e.tags.operator,e.tags.typeName,e.tags.tagName,e.tags.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[e.tags.attributeName,e.tags.definition(e.tags.propertyName)],color:"#4F9FD0"},{tag:[e.tags.className,e.tags.string,e.tags.special(e.tags.brace)],color:"#CF4F5F"},{tag:e.tags.number,color:"#CF4F5F",fontWeight:"bold"},{tag:e.tags.variableName,fontWeight:"bold"}]}),p({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:e.tags.comment,color:"#9995b7"},{tag:e.tags.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#ff5792"},{tag:[e.tags.className,e.tags.tagName,e.tags.definition(e.tags.typeName)],color:"#0094f0"},{tag:[e.tags.number,e.tags.bool,e.tags.null,e.tags.special(e.tags.brace)],color:"#5842ff"},{tag:[e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName)],color:"#0095a8"},{tag:e.tags.typeName,color:"#b3694d"},{tag:[e.tags.propertyName,e.tags.variableName],color:"#fa8900"},{tag:e.tags.operator,color:"#ff5792"},{tag:e.tags.self,color:"#e64100"},{tag:[e.tags.string,e.tags.regexp],color:"#00b368"},{tag:[e.tags.paren,e.tags.bracket],color:"#0431fa"},{tag:e.tags.labelName,color:"#00bdd6"},{tag:e.tags.attributeName,color:"#e64100"},{tag:e.tags.angleBracket,color:"#9995b7"}]}),p({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:e.tags.comment,color:"#9893a5"},{tag:[e.tags.bool,e.tags.null],color:"#286983"},{tag:e.tags.number,color:"#d7827e"},{tag:e.tags.className,color:"#d7827e"},{tag:[e.tags.angleBracket,e.tags.tagName,e.tags.typeName],color:"#56949f"},{tag:e.tags.attributeName,color:"#907aa9"},{tag:e.tags.punctuation,color:"#797593"},{tag:[e.tags.keyword,e.tags.modifier],color:"#286983"},{tag:[e.tags.string,e.tags.regexp],color:"#ea9d34"},{tag:e.tags.variableName,color:"#d7827e"}]}),p({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:e.tags.comment,color:"#CFCFCF"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#E66C29"},{tag:[e.tags.className,e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName),e.tags.labelName,e.tags.definition(e.tags.typeName)],color:"#2EB43B"},{tag:e.tags.keyword,color:"#D8B229"},{tag:e.tags.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#925A47"},{tag:e.tags.string,color:"#704D3D"},{tag:e.tags.typeName,color:"#2F8996"},{tag:[e.tags.variableName,e.tags.propertyName],color:"#77ACB0"},{tag:e.tags.self,color:"#77ACB0",fontWeight:"bold"},{tag:e.tags.regexp,color:"#E3965E"},{tag:[e.tags.tagName,e.tags.angleBracket],color:"#BAA827"},{tag:e.tags.attributeName,color:"#B06520"},{tag:e.tags.derefOperator,color:"#000"}]}),p({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:e.tags.comment,color:"#93A1A1"},{tag:e.tags.string,color:"#2AA198"},{tag:e.tags.regexp,color:"#D30102"},{tag:e.tags.number,color:"#D33682"},{tag:e.tags.variableName,color:"#268BD2"},{tag:[e.tags.keyword,e.tags.operator,e.tags.punctuation],color:"#859900"},{tag:[e.tags.definitionKeyword,e.tags.modifier],color:"#073642",fontWeight:"bold"},{tag:[e.tags.className,e.tags.self,e.tags.definition(e.tags.propertyName)],color:"#268BD2"},{tag:e.tags.function(e.tags.variableName),color:"#268BD2"},{tag:[e.tags.bool,e.tags.null],color:"#B58900"},{tag:e.tags.tagName,color:"#268BD2",fontWeight:"bold"},{tag:e.tags.angleBracket,color:"#93A1A1"},{tag:e.tags.attributeName,color:"#93A1A1"},{tag:e.tags.typeName,color:"#859900"}]}),p({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:e.tags.comment,color:"#8E908C"},{tag:[e.tags.variableName,e.tags.self,e.tags.propertyName,e.tags.attributeName,e.tags.regexp],color:"#C82829"},{tag:[e.tags.number,e.tags.bool,e.tags.null],color:"#F5871F"},{tag:[e.tags.className,e.tags.typeName,e.tags.definition(e.tags.typeName)],color:"#C99E00"},{tag:[e.tags.string,e.tags.special(e.tags.brace)],color:"#718C00"},{tag:e.tags.operator,color:"#3E999F"},{tag:[e.tags.definition(e.tags.propertyName),e.tags.function(e.tags.variableName)],color:"#4271AE"},{tag:e.tags.keyword,color:"#8959A8"},{tag:e.tags.derefOperator,color:"#4D4D4C"}]}),console.log(z),console.log(e.tags);const q=new Q.Compartment,Y=(r="latte")=>{const a=z[r].colors,t=a.base,n=r==="latte"?"#484b64":a.text.hex,c=ye(a.crust.rgb,t.rgb,.1);return[p({variant:r==="latte"?"light":"dark",settings:{background:t.hex,foreground:n,caret:a.rosewater.hex,lineHighlight:K(a.overlay1.rgb,.1),gutterBackground:t.hex,gutterForeground:n},styles:[{tag:e.tags.modifier,color:a.mauve.hex},{tag:e.tags.controlKeyword,color:a.mauve.hex},{tag:e.tags.operatorKeyword,color:a.mauve.hex},{tag:e.tags.definitionKeyword,color:a.mauve.hex},{tag:e.tags.moduleKeyword,color:a.mauve.hex},{tag:e.tags.bool,color:a.peach.hex},{tag:e.tags.null,color:a.peach.hex},{tag:e.tags.null,color:a.peach.hex},{tag:[e.tags.function(e.tags.variableName)],color:a.blue.hex},{tag:[e.tags.function(e.tags.definition(e.tags.variableName))],color:a.blue.hex},{tag:[e.tags.definition(e.tags.className)],color:a.yellow.hex,fontWeight:"bold"},{tag:e.tags.propertyName,color:a.blue.hex},{tag:[e.tags.function(e.tags.propertyName)],color:a.blue.hex},{tag:e.tags.lineComment,color:a.overlay2.hex},{tag:e.tags.number,color:a.peach.hex},{tag:e.tags.string,color:a.green.hex},{tag:[e.tags.special(e.tags.string)],color:a.green.hex,fontWeight:"600"},{tag:e.tags.arithmeticOperator,color:a.sky.hex},{tag:e.tags.bitwiseOperator,color:a.sky.hex},{tag:e.tags.compareOperator,color:a.sky.hex},{tag:e.tags.definitionOperator,color:a.sky.hex},{tag:e.tags.punctuation,color:a.peach.hex},{tag:e.tags.meta,color:a.teal.hex},{tag:e.tags.paren,color:a.overlay2.hex},{tag:e.tags.squareBracket,color:a.overlay2.hex},{tag:e.tags.brace,color:a.overlay2.hex},{tag:e.tags.derefOperator,color:a.overlay2.hex},{tag:e.tags.separator,color:a.overlay2.hex},{tag:e.tags.definitionKeyword,color:a.mauve.hex},{tag:e.tags.self,color:a.red.hex},{tag:[e.tags.standard(e.tags.typeName)],color:a.yellow.hex},{tag:e.tags.typeName,color:a.yellow.hex},{tag:e.tags.namespace,color:a.yellow.hex},{tag:e.tags.labelName,color:a.teal.hex},{tag:e.tags.variableName,color:n},{tag:e.tags.operator,color:a.sky.hex},{tag:e.tags.logicOperator,color:a.sky.hex},{tag:e.tags.updateOperator,color:a.sky.hex},{tag:e.tags.character,color:a.green.hex},{tag:e.tags.escape,color:a.pink.hex},{tag:e.tags.literal,color:a.sky.hex},{tag:e.tags.processingInstruction,color:a.mauve.hex},{tag:e.tags.angleBracket,color:a.overlay2.hex},{tag:e.tags.keyword,color:a.yellow.hex},{tag:e.tags.tagName,color:a.blue.hex},{tag:e.tags.className,color:a.teal.hex},{tag:[e.tags.constant(e.tags.className)],color:a.teal.hex},{tag:e.tags.attributeName,color:a.peach.hex},{tag:e.tags.atom,color:a.yellow.hex},{tag:e.tags.unit,color:a.yellow.hex},{tag:e.tags.color,color:a.pink.hex},{tag:e.tags.macroName,color:a.peach.hex}]}),b.EditorView.theme({"& .cm-selectionBackground, ::selection":{background:`${K(a.overlay2.rgb,.3)} !important`},"& .cb-content, & .ic":{backgroundColor:c},".cb-icon":{fill:n},".wg-codeblock-btn:hover":{backgroundColor:K(a.overlay1.rgb,.2)}},{dark:r!=="latte"})]},ye=(r,a,t)=>{const n=[r.r,r.g,r.b],c=[a.r,a.g,a.b];return`rgba(${Z(n,c,t,.3).join(", ")})`},K=(r,a)=>`rgba(${r.r}, ${r.g}, ${r.b}, ${a})`,X=(r={markdown:{}})=>{const{markdown:{defaultCodeLanguage:a,codeLanguages:t,addKeymap:n,base:c,completeHTMLTags:d,htmlTagLanguage:s,extensions:o=[]},inline:l,Heading:g,Hr:f,List:y,Code:H}=r,i={defaultCodeLanguage:a,codeLanguages:t||k.languages,addKeymap:n,base:c,completeHTMLTags:d,htmlTagLanguage:s,extensions:[...o,_.GFM,U]};return[N.markdown(i),q.of(Y()),W(l),$(g),R(y),O(f),P()]};typeof window<"u"&&(window.gnosis=X,window.HrPlugin=O,window.ListPlugin=R,window.CodePlugin=P,window.InlinePlugin=W,window.HeadingPlugin=$),m.CodePlugin=P,m.HeadingPlugin=$,m.HrPlugin=O,m.InlinePlugin=W,m.ListPlugin=R,m.catppuccin=Y,m.gnosis=X,m.themeVariant=q,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(d,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("@codemirror/language-data"),require("@codemirror/lang-markdown"),require("@lezer/markdown"),require("@lezer/highlight"),require("@codemirror/view"),require("@codemirror/language"),require("codemirror")):typeof define=="function"&&define.amd?define(["exports","@codemirror/language-data","@codemirror/lang-markdown","@lezer/markdown","@lezer/highlight","@codemirror/view","@codemirror/language","codemirror"],m):(d=typeof globalThis<"u"?globalThis:d||self,m(d.gnosis={},d.languageData,d.langMarkdown,d.markdown,d.highlight,d.view,d.language,d.codemirror))})(this,function(d,m,b,R,P,i,X,p){"use strict";var Z=Object.defineProperty;var v=(d,m,b)=>m in d?Z(d,m,{enumerable:!0,configurable:!0,writable:!0,value:b}):d[m]=b;var M=(d,m,b)=>v(d,typeof m!="symbol"?m+"":m,b);const u=P.Tag.define("none"),q={props:[P.styleTags({"Blockquote/...":u,HorizontalRule:u,"ATXHeading1/... SetextHeading1/...":u,"ATXHeading2/... SetextHeading2/...":u,"ATXHeading3/...":u,"ATXHeading4/...":u,"ATXHeading5/...":u,"ATXHeading6/...":u,"Comment CommentBlock":u,Escape:u,Entity:u,"Emphasis/...":u,"StrongEmphasis/...":u,"Strikethrough/...":u,"TableHeader/...":u,"Link/... Image/...":u,"OrderedList/... BulletList/...":u,"BlockQuote/...":u,"InlineCode CodeText":u,"URL Autolink":u,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark StrikethroughMark":u,"CodeInfo LinkLabel TaskMarker TableDelimiter":u,LinkTitle:u,Paragraph:u})]},T=(t,a,r={})=>{const s=class{constructor(l){M(this,"decorations");M(this,"conf");this.conf=a,this.decorations=t(l,this.conf)}update(l){(l.docChanged||l.viewportChanged||l.selectionSet)&&(this.decorations=t(l.view,this.conf))}};return i.ViewPlugin.fromClass(s,{decorations:c=>c.decorations,...r})},D=(t,a,r)=>{const s=t.state.selection.ranges;for(let c of s)if(c.from>=a&&c.from<=r||c.to>=a&&c.to<=r||c.from<=a&&c.to>=r)return!0;return!1},w=(t,a)=>{for(const{from:r,to:s}of t.visibleRanges)X.syntaxTree(t.state).iterate({...a,from:r,to:s})};function B(t,a){const r=["Document"],s={},c={HorizontalRule:(n,e,o=!0)=>[i.Decoration.line({class:"hr "+(o?"sw":"")}).range(n),i.Decoration.mark({class:"mk"}).range(n,e)]},l=[];return w(t,{enter:({type:n,from:e,to:o})=>(n.name in c&&l.push(...c[n.name](e,o,D(t,e,o))),r.includes(n.name)||n.name in s)}),i.Decoration.set(l,!1)}const V=t=>{const{color:a="black"}=t||{};return p.EditorView.baseTheme({".hr":{position:"relative"},".hr > .mk":{fontSize:"0"},".hr.sw > .mk":{fontSize:"inherit"},".hr::before":{content:'""',position:"absolute",width:"calc(100% - 12px)",height:".2ch",backgroundColor:a},".hr.sw::before":{width:"0",height:"0"}})},H=(t={})=>[T(B,{}),V(t==null?void 0:t.color)];function O(t,a){const r=["FencedCode"],s={StrongEmphasis:(n=!0,e,o)=>i.Decoration.mark({class:"il st "+(n?"sw":"")}).range(e,o),Strikethrough:(n=!0,e,o)=>i.Decoration.mark({class:"il sk "+(n?"sw":"")}).range(e,o),InlineCode:(n=!0,e,o)=>i.Decoration.mark({class:"il ic "+(n?"sw":"")}).range(e,o),Emphasis:(n=!0,e,o)=>i.Decoration.mark({class:"il it "+(n?"sw":"")}).range(e,o),Mark:(n,e)=>i.Decoration.mark({class:"mkl"}).range(n,e)},c=["EmphasisMark","CodeMark","StrikethroughMark"],l=[];return w(t,{enter:({type:{name:n},from:e,to:o})=>c.includes(n)?(l.push(s.Mark(e,o)),!1):(n in s&&l.push(s[n](D(t,e,o),e,o)),!r.includes(n))}),i.Decoration.set(l,!1)}const W=p.EditorView.baseTheme({".it ":{fontStyle:"italic"},".st ":{fontWeight:"bold"},".sk ":{textDecoration:"line-through"},".ic ":{fontFamily:"monospace",paddingInline:".6ch",borderRadius:".6ch"}}),$=p.EditorView.baseTheme({".il .mkl":{fontSize:"0"},".il.sw .mkl":{fontSize:"inherit"}}),S=(t={})=>{const{hideMarks:a=!0}=t;return[T(O,{}),W,a?$:[]]};class j extends i.WidgetType{constructor(r){super();M(this,"checked",!1);this.checked=r}toDOM(){let r=document.createElement("span");r.setAttribute("aria-hidden","true"),r.className="TaskMark";let s=r.appendChild(document.createElement("input"));return s.type="checkbox",s.checked=this.checked,r}ignoreEvent(){return!1}}function F(t,a){const r=["Document","ListItem","Task"],s={BulletList:"bl",OrderedList:"ol"},c={ListMark:(e,o,g,h=!0)=>i.Decoration.mark({class:`${g} lm ${h?"sw":""}`}).range(e,o),TaskMarker:(e,o,g,h=!0)=>{const k=t.state.doc.sliceString(e+1,o-1)==="x";return h?i.Decoration.mark({class:`tm ${k?"ck":""}`}).range(e,o):i.Decoration.replace({widget:new j(k)}).range(e,o)}},l=[],n=[];return w(t,{enter:({type:e,from:o,to:g})=>e.name in s?(n.push({name:e.name,from:o,to:g}),!0):(e.name in c&&l.push(c[e.name](o,g,s[n.slice(-1)[0].name],D(t,o,g))),r.includes(e.name)),leave:({type:{name:e},from:o,to:g})=>{const h=n.slice(-1)[0];h&&h.name===e&&h.from===o&&h.to===g&&n.pop()}}),i.Decoration.set(l,!1)}const N=(t,a)=>{var s;let r=t.target;if(r.nodeName==="INPUT"&&((s=r.parentElement)!=null&&s.classList.contains("TaskMark")))return _(a,a.posAtDOM(r))},_=(t,a)=>{const r=a-2,s=a-1;let c=t.state.doc.sliceString(Math.max(0,r),s),l;if(c==="x")l={from:r,to:s,insert:" "};else if(c===" ")l={from:r,to:s,insert:"x"};else return!1;return t.dispatch({changes:l}),!0},Q=t=>{const{color:a="black"}=t||{};return p.EditorView.baseTheme({".lm.bl":{position:"relative",paddingInlineStart:"1ch",color:"transparent"},".lm.bl::before":{content:'""',display:"inline",position:"absolute",backgroundColor:a,borderRadius:"50%",top:"50%",left:".5ch",transform:"translate(0, -50%)",height:".4em",width:".4em"},".lm.bl.sw, .lm.bl.sw::before":{backgroundColor:"transparent",color:"inherit"}})},C=(t={})=>[T(F,{},{eventHandlers:{mousedown:N}}),Q(t==null?void 0:t.color)];class z extends i.WidgetType{constructor(r){super();M(this,"classes","");this.classes=r}toDOM(){let r=document.createElement("span");return r.setAttribute("aria-hidden","true"),r.className=this.classes,r.textContent=" ",r}ignoreEvent(){return!1}}function y(t,a){const{mode:r}=a,s=["Document","Blockquote"],c={FencedCode:A,CodeBlock:A},l={CodeMark:(e,o)=>i.Decoration.mark({class:"cb-mk"}).range(e,o),CodeInfo:(e,o)=>i.Decoration.mark({class:"cb-mi"}).range(e,o)},n=[];return w(t,{enter:({type:{name:e},from:o,to:g})=>(r==="type"&&e in c&&n.push(...c[e](t,o,g)),r==="mark"&&e in l&&n.push(l[e](o,g)),s.includes(e)||e in c)}),{type:i.Decoration.set(n,!0),mark:i.Decoration.set(n,!0)}[r]}const A=(t,a,r)=>{const s=[],c=t.state.doc.lineAt(a),l=a-c.from,n=D(t,c.from,r),e=c.number,o=t.state.doc.sliceString(a,r).split(`
|
|
2
|
+
`).length;for(let g=e;g<o+e;g++){const h=["cb-content"],{from:k,to:L}=t.state.doc.line(g),f=Math.max(k+l,0);f===L?(h.push("wg"),s.push(i.Decoration.widget({widget:new z(h.join(" ")+" start"),side:0}).range(f)),s.push(i.Decoration.widget({widget:new z(h.join(" ")+" end"),side:1}).range(f))):(g===e&&h.push("cb-start"),g===o+e-1&&h.push("cb-end"),n&&h.push("sw"),L>f&&s.push(i.Decoration.mark({class:h.join(" ")}).range(f,L))),k!==f&&s.push(i.Decoration.mark({class:"cb-spacer"}).range(k,f)),s.push(i.Decoration.line({class:"cb-line"}).range(k))}return s},U=p.EditorView.baseTheme({".cb-content":{backgroundColor:"#e1e4ea"}}),G=()=>p.EditorView.baseTheme({".cb-start":{borderRadius:"1ch 1ch 0 0"},".cb-end ":{borderRadius:"0 0 1ch 1ch"},".cb-start.cb-end":{borderRadius:"1ch"},".cb-line":{display:"flex !important"},".cb-content":{display:"inline-block",zIndex:"-1",flex:"1",marginLeft:"2px",paddingLeft:"6px",paddingRigth:"2px"},".cb-content.wg":{cursor:"text"},".cb-content.wg.start":{maxWidth:"1px",Width:"1px",paddingLeft:"5px"},".cb-content.wg.end":{marginLeft:"0",paddingLeft:"0"},".cb-mi, .cb-mk":{color:"transparent"},".cb-content.sw > .cb-mi, .cb-content.sw > .cb-mk":{color:"inherit"}}),x=(t={})=>[T(y,{mode:"mark"}),T(y,{mode:"type"}),U,G()];function K(t,a){const r=["Document"],s={ATXHeading1:(n,e=!0)=>i.Decoration.line({class:"h1 hg "+(e?"sw":"")}).range(n),ATXHeading2:(n,e=!0)=>i.Decoration.line({class:"h2 hg "+(e?"sw":"")}).range(n),ATXHeading3:(n,e=!0)=>i.Decoration.line({class:"h3 hg "+(e?"sw":"")}).range(n),ATXHeading4:(n,e=!0)=>i.Decoration.line({class:"h4 hg "+(e?"sw":"")}).range(n),ATXHeading5:(n,e=!0)=>i.Decoration.line({class:"h5 hg "+(e?"sw":"")}).range(n),ATXHeading6:(n,e=!0)=>i.Decoration.line({class:"h6 hg "+(e?"sw":"")}).range(n)},c={HeaderMark:(n,e)=>i.Decoration.mark({class:"mk"}).range(n,e)},l=[];return w(t,{enter:({type:n,from:e,to:o})=>(n.name in s&&l.push(s[n.name](e,D(t,e,o))),n.name in c&&l.push(c[n.name](e,o+1)),r.includes(n.name)||n.name in s)}),i.Decoration.set(l,!1)}const J=p.EditorView.baseTheme({".h1 ":{fontSize:"2.6rem"},".h2 ":{fontSize:"2.0rem"},".h3 ":{fontSize:"1.8rem"},".h4 ":{fontSize:"1.6rem"},".h5 ":{fontSize:"1.4rem"},".h6 ":{fontSize:"1.2rem"}}),Y=p.EditorView.baseTheme({".hg .mk":{fontSize:"0"},".hg.sw .mk":{fontSize:"inherit"}}),E=(t={})=>[T(K,{}),J,Y],I=(t={markdown:{}})=>{const{markdown:{defaultCodeLanguage:a,codeLanguages:r,addKeymap:s,base:c,completeHTMLTags:l,htmlTagLanguage:n,extensions:e=[]},inline:o,Heading:g,Hr:h,List:k,Code:L}=t,f={defaultCodeLanguage:a,codeLanguages:r||m.languages,addKeymap:s,base:c,completeHTMLTags:l,htmlTagLanguage:n,extensions:[...e,R.GFM,q]};return[b.markdown(f),S(o),E(g),C(k),H(h),x(L)]};typeof window<"u"&&(window.gnosis=I,window.HrPlugin=H,window.ListPlugin=C,window.CodePlugin=x,window.InlinePlugin=S,window.HeadingPlugin=E),d.CodePlugin=x,d.HeadingPlugin=E,d.HrPlugin=H,d.InlinePlugin=S,d.ListPlugin=C,d.gnosis=I,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|