","+","~");var nm=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t.forEach((function(t){"text"===t.type?n+=t.value:"element"===t.type&&t.children&&Array.isArray(t.children)&&(n+=e(t.children))})),n},rm=function(e){var t=e||{},n=t.selector,r=t.rewrite;return function(e){if(r&&"function"===typeof r)if(n&&"string"===typeof n){var t=tm(n,e);t&&t.length>0&&Dc(e,t,(function(e,t,n){r(e,t,n)}))}else Dc(e,(function(e,t,n){r(e,t,n)}))}},im={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]},om=n(8469),am=n.n(om);var sm=function(e){return void 0===e&&(e={}),function(e){Dc(e,(function(e){"element"===e.type&&"code"===e.tagName&&e.data&&e.data.meta&&(e.properties=ee({},e.properties,{"data-meta":String(e.data.meta)}))}))}},um=["prefixCls","className","source","style","disableCopy","onScroll","onMouseOver","pluginsFilter","rehypeRewrite","warpperElement"],lm=Y.forwardRef((function(e,t){var n=e.prefixCls,r=void 0===n?"wmde-markdown wmde-markdown-color":n,i=e.className,o=e.source,a=e.style,s=e.disableCopy,u=void 0!==s&&s,l=e.onScroll,c=e.onMouseOver,h=e.pluginsFilter,f=e.rehypeRewrite,d=e.warpperElement,p=void 0===d?{}:d,m=Ne(e,um),g=Y.createRef();(0,Y.useImperativeHandle)(t,(function(){return ee({},e,{mdp:g})}),[g,e]);var v=(r||"")+" "+(i||""),O=[sm,[cp,{ignoreMissing:!0}],Xd,rd,cd,Jd,[rm,{rewrite:function(e,t,n){if("element"===e.type&&n&&"root"===n.type&&/h(1|2|3|4|5|6)/.test(e.tagName)){var r=e.children&&e.children[0];r&&r.properties&&"true"===r.properties.ariaHidden&&(r.properties=ee({class:"anchor"},r.properties),r.children=[im])}if("element"===e.type&&"pre"===e.tagName&&!u){var i=nm(e.children);e.children.push((void 0===(o=i)&&(o=""),{type:"element",tagName:"div",properties:{onClick:function(e){var t=e.currentTarget||e.target;t.classList.add("active"),am()(t.dataset.code,(function(){setTimeout((function(){t.classList.remove("active")}),2e3)}))},"data-code":o,class:"copied"},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}))}var o;f&&f(e,t,n)}}],[Kd,{properties:"attr"}]].concat((0,ze.Z)(m.rehypePlugins||[])),y={allowElement:function(e,t,n){return m.allowElement?m.allowElement(e,t,n):/^[A-Za-z0-9]+$/.test(e.tagName)}},k=[].concat((0,ze.Z)(m.remarkPlugins||[]),[Gf]);return(0,Ie.jsx)("div",ee({ref:g,onScroll:l,onMouseOver:c},p,{className:v,style:a,children:(0,Ie.jsx)(xh,ee({},m,y,{rehypePlugins:h?h("rehype",O):O,remarkPlugins:h?h("remark",k):k,children:o||""}))}))})),cm={name:"bold",keyCommand:"bold",button:{"aria-label":"Add bold text"},icon:(0,Ie.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 384 512",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M304.793 243.891c33.639-18.537 53.657-54.16 53.657-95.693 0-48.236-26.25-87.626-68.626-104.179C265.138 34.01 240.849 32 209.661 32H24c-8.837 0-16 7.163-16 16v33.049c0 8.837 7.163 16 16 16h33.113v318.53H24c-8.837 0-16 7.163-16 16V464c0 8.837 7.163 16 16 16h195.69c24.203 0 44.834-1.289 66.866-7.584C337.52 457.193 376 410.647 376 350.014c0-52.168-26.573-91.684-71.207-106.123zM142.217 100.809h67.444c16.294 0 27.536 2.019 37.525 6.717 15.828 8.479 24.906 26.502 24.906 49.446 0 35.029-20.32 56.79-53.029 56.79h-76.846V100.809zm112.642 305.475c-10.14 4.056-22.677 4.907-31.409 4.907h-81.233V281.943h84.367c39.645 0 63.057 25.38 63.057 63.057.001 28.425-13.66 52.483-34.782 61.284z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&n.dispatch(n.state.changeByRange((function(e){return{changes:[{from:e.from,insert:"**"},{from:e.to,insert:"**"}],range:pi.jT.range(e.from+2,e.to+2)}})))}},hm={name:"italic",keyCommand:"italic",button:{"aria-label":"Add italic text"},icon:(0,Ie.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 320 512",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&n.dispatch(n.state.changeByRange((function(e){return{changes:[{from:e.from,insert:"*"},{from:e.to,insert:"*"}],range:pi.jT.range(e.from+1,e.to+1)}})))}},fm={name:"header",keyCommand:"header",button:{"aria-label":"Add header text"},icon:(0,Ie.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 512 512",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M496 80V48c0-8.837-7.163-16-16-16H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.621v128H154.379V96H192c8.837 0 16-7.163 16-16V48c0-8.837-7.163-16-16-16H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h37.275v320H32c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.621V288H357.62v128H320c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h160c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-37.275V96H480c8.837 0 16-7.163 16-16z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="#",o=r.text.match(/^#+/);if(o&&o[0]){var a=o[0];a.length<6&&(i=a+"#")}i.length>6&&(i="#");var s=r.text.replace(/^#+/,"");n.dispatch({changes:{from:r.from,to:r.to,insert:i+" "+s},selection:{anchor:r.from+i.length+1}})}}},dm={name:"strike",keyCommand:"strike",button:{"aria-label":"Add strike text"},icon:(0,Ie.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 512 512",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M496 288H16c-8.837 0-16-7.163-16-16v-32c0-8.837 7.163-16 16-16h480c8.837 0 16 7.163 16 16v32c0 8.837-7.163 16-16 16zm-214.666 16c27.258 12.937 46.524 28.683 46.524 56.243 0 33.108-28.977 53.676-75.621 53.676-32.325 0-76.874-12.08-76.874-44.271V368c0-8.837-7.164-16-16-16H113.75c-8.836 0-16 7.163-16 16v19.204c0 66.845 77.717 101.82 154.487 101.82 88.578 0 162.013-45.438 162.013-134.424 0-19.815-3.618-36.417-10.143-50.6H281.334zm-30.952-96c-32.422-13.505-56.836-28.946-56.836-59.683 0-33.92 30.901-47.406 64.962-47.406 42.647 0 64.962 16.593 64.962 32.985V136c0 8.837 7.164 16 16 16h45.613c8.836 0 16-7.163 16-16v-30.318c0-52.438-71.725-79.875-142.575-79.875-85.203 0-150.726 40.972-150.726 125.646 0 22.71 4.665 41.176 12.777 56.547h129.823z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&n.dispatch(n.state.changeByRange((function(e){return{changes:[{from:e.from,insert:"~~"},{from:e.to,insert:"~~"}],range:pi.jT.range(e.from+2,e.to+2)}})))}},pm={name:"underline",keyCommand:"underline",button:{"aria-label":"Add underline text"},icon:(0,Ie.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 20 20",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M10 17c3.3 0 6-2.7 6-6V3.5c0-.8-.7-1.5-1.5-1.5S13 2.7 13 3.5V11c0 1.7-1.3 3-3 3s-3-1.3-3-3V3.5C7 2.7 6.3 2 5.5 2S4 2.7 4 3.5V11c0 3.3 2.7 6 6 6zM16.5 19h-13c-.3 0-.5.2-.5.5s.2.5.5.5h13c.3 0 .5-.2.5-.5s-.2-.5-.5-.5z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&n.dispatch(n.state.changeByRange((function(e){return{changes:[{from:e.from,insert:""},{from:e.to,insert:""}],range:pi.jT.range(e.from+3,e.to+3)}})))}},mm={name:"olist",keyCommand:"olist",button:{"aria-label":"Add olist text"},icon:(0,Ie.jsx)("svg",{viewBox:"0 0 576 512",height:"16",width:"16",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M55.1 56.04c0-13.26 11.64-24 24-24h32c14.2 0 24 10.74 24 24V176h16c14.2 0 24 10.8 24 24 0 13.3-9.8 24-24 24h-80c-12.36 0-24-10.7-24-24 0-13.2 11.64-24 24-24h16V80.04h-8c-12.36 0-24-10.75-24-24zm63.6 285.16c-6.6-7.4-18.3-6.9-24.05 1.2l-11.12 15.5c-7.7 10.8-22.69 13.3-33.48 5.6-10.79-7.7-13.28-22.7-5.58-33.4l11.12-15.6c23.74-33.3 72.31-35.7 99.21-4.9 21.3 23.5 20.8 60.9-1.1 84.7L118.8 432H152c13.3 0 24 10.7 24 24s-10.7 24-24 24H64c-9.53 0-18.16-5.6-21.98-14.4-3.83-8.7-2.12-18.9 4.34-25.9l72.04-78c5.3-5.8 5.4-14.6.3-20.5zM512 64c17.7 0 32 14.33 32 32 0 17.7-14.3 32-32 32H256c-17.7 0-32-14.3-32-32 0-17.67 14.3-32 32-32h256zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32s14.3-32 32-32h256zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32s14.3-32 32-32h256z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="- ",o=r.text.match(/^-/);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},gm={name:"ulist",keyCommand:"ulist",button:{"aria-label":"Add ulist text"},icon:(0,Ie.jsx)("svg",{viewBox:"0 0 512 512",height:"16",width:"16",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M88 48c13.3 0 24 10.75 24 24v48c0 13.3-10.7 24-24 24H40c-13.25 0-24-10.7-24-24V72c0-13.25 10.75-24 24-24h48zm392 16c17.7 0 32 14.33 32 32 0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32 0-17.67 14.3-32 32-32h288zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32h288zm0 160c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32s14.3-32 32-32h288zM16 232c0-13.3 10.75-24 24-24h48c13.3 0 24 10.7 24 24v48c0 13.3-10.7 24-24 24H40c-13.25 0-24-10.7-24-24v-48zm72 136c13.3 0 24 10.7 24 24v48c0 13.3-10.7 24-24 24H40c-13.25 0-24-10.7-24-24v-48c0-13.3 10.75-24 24-24h48z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="1. ",o=r.text.match(/^\1\./);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},vm={name:"quote",keyCommand:"quote",button:{"aria-label":"Add quote text"},icon:(0,Ie.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 512 512",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M512 80v128c0 137.018-63.772 236.324-193.827 271.172-15.225 4.08-30.173-7.437-30.173-23.199v-33.895c0-10.057 6.228-19.133 15.687-22.55C369.684 375.688 408 330.054 408 256h-72c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h128c26.51 0 48 21.49 48 48zM176 32H48C21.49 32 0 53.49 0 80v128c0 26.51 21.49 48 48 48h72c0 74.054-38.316 119.688-104.313 143.528C6.228 402.945 0 412.021 0 422.078v33.895c0 15.762 14.948 27.279 30.173 23.199C160.228 444.324 224 345.018 224 208V80c0-26.51-21.49-48-48-48z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="> ",o=r.text.match(/^>\s/);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},Om={name:"link",keyCommand:"link",button:{"aria-label":"Add link text"},icon:(0,Ie.jsx)("svg",{viewBox:"0 0 640 512",height:"16",width:"16",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M172.5 131.1c55.6-55.59 148-55.59 203.6 0 50 50 57.4 129.7 16.3 187.2l-1.1 1.6c-10.3 14.3-30.3 17.7-44.6 7.4-14.4-10.3-17.8-30.3-7.5-44.6l1.1-1.6c22.9-32.1 19.3-76-8.6-103.9-31.4-31.4-82.5-31.4-114 0L105.5 289.5c-31.51 30.6-31.51 82.5 0 114 27.8 27.9 71.8 31.5 103.8 8.6l1.6-2c14.4-9.4 34.4-6.1 44.6 8.3 10.3 14.4 7 34.4-7.4 44.7l-1.6 1.1c-58.4 41.1-136.3 34.5-186.29-15.4-56.469-56.5-56.469-148.1 0-204.5L172.5 131.1zm295 248.9c-56.5 56.5-148 56.5-204.5 0-50-50-56.5-128.8-15.4-186.3l1.1-1.6c9.4-14.3 29.4-17.7 44.6-7.4 14.4 9.4 17.8 29.4 7.5 44.6l-1.1 1.6c-22.9 31.2-19.3 76 8.6 103.9 31.4 31.4 82.5 31.4 114 0l112.2-112.3c31.5-31.5 31.5-83.4 0-114-27.8-27.87-71.8-31.51-103.8-8.6l-1.6 1.1c-14.4 10.3-34.4 6.1-44.6-7.42-10.3-14.38-7-34.37 7.4-44.64l1.6-1.12C451 6.731 529.8 13.25 579.8 63.24c56.5 56.46 56.5 148.06 0 204.46L467.5 380z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n&&t&&n){var r=n.state.selection.main,i=n.state.sliceDoc(n.state.selection.main.from,n.state.selection.main.to);n.dispatch({changes:{from:r.from,to:r.to,insert:"["+i+"]()"},selection:pi.jT.range(r.from+3+i.length,r.to+3)})}}},ym={name:"todo",keyCommand:"todo",button:{"aria-label":"Add todo List"},icon:(0,Ie.jsx)("svg",{viewBox:"0 0 512 512",height:"16",width:"16",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M152.1 38.16c9.8 8.87 10.6 24.04 1.7 33.9L81.84 152.1c-4.41 4.8-10.63 7.7-17.21 7-6.58 1.1-12.94-1.5-17.6-7l-40.001-40c-9.372-8.5-9.372-23.7 0-33.07 9.371-9.37 24.571-9.37 33.941 0l22.11 22.07 55.12-61.16c8.8-9.85 24-10.65 33.9-1.78zm0 160.04c9.8 8.8 10.6 24 1.7 33.9l-71.96 80c-4.41 4.8-10.63 7.7-17.21 7-6.58 1.1-12.94-1.5-17.6-7l-40.001-40c-9.372-8.5-9.372-23.7 0-33.1 9.371-9.3 24.571-9.3 33.941 0l22.11 22.1 55.12-61.2c8.8-9.8 24-10.6 33.9-1.7zM224 96c0-17.67 14.3-32 32-32h224c17.7 0 32 14.33 32 32 0 17.7-14.3 32-32 32H256c-17.7 0-32-14.3-32-32zm0 160c0-17.7 14.3-32 32-32h224c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32zm-64 160c0-17.7 14.3-32 32-32h288c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32zM0 416c0-26.5 21.49-48 48-48s48 21.5 48 48-21.49 48-48 48-48-21.5-48-48z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.doc.lineAt(n.state.selection.main.from),i="- [ ] ",o=r.text.match(/^-\s\[\s\]\s/);o&&o[0]&&(i=""),n.dispatch({changes:{from:r.from,to:r.to,insert:""+i+r.text},selection:{anchor:n.state.selection.main.from+i.length}})}}},km={name:"image",keyCommand:"image",button:{"aria-label":"Add image text"},icon:(0,Ie.jsx)("svg",{viewBox:"0 0 512 512",height:"16",width:"16",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M447.1 32h-384C28.64 32-.01 60.65-.01 96v320c0 35.35 28.65 64 63.1 64h384c35.35 0 64-28.65 64-64V96c.01-35.35-27.79-64-63.99-64zm-336 64c26.51 0 48 21.49 48 48s-20.6 48-48 48-48-21.49-48-48 22.38-48 48-48zm335 311.6c-2.8 5.2-8.2 8.4-14.1 8.4H82.01a15.993 15.993 0 0 1-14.26-8.75 16 16 0 0 1 1.334-16.68l70-96C142.1 290.4 146.9 288 152 288s9.916 2.441 12.93 6.574l32.46 44.51 93.3-139.1C293.7 194.7 298.7 192 304 192s10.35 2.672 13.31 7.125l128 192c3.29 4.875 3.59 11.175.79 16.475z"})}),execute:function(e){var t=e.state,n=e.view;if(t&&n){var r=n.state.selection.main,i=n.state.sliceDoc(n.state.selection.main.from,n.state.selection.main.to);n.dispatch({changes:{from:r.from,to:r.to,insert:""},selection:pi.jT.range(r.from+4,r.to+4)})}}},bm={name:"redo",keyCommand:"redo",button:{"aria-label":"redo text"},icon:(0,Ie.jsx)("svg",{viewBox:"0 0 512 512",height:"14",width:"14",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M58.79,439.13A16,16,0,0,1,48,424c0-73.1,14.68-131.56,43.65-173.77,35-51,90.21-78.46,164.35-81.87V88a16,16,0,0,1,27.05-11.57l176,168a16,16,0,0,1,0,23.14l-176,168A16,16,0,0,1,256,424V344.23c-45,1.36-79,8.65-106.07,22.64-29.25,15.12-50.46,37.71-73.32,67a16,16,0,0,1-17.82,5.28Z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&Ni(n)}},Tm={name:"undo",keyCommand:"undo",button:{"aria-label":"undo text"},icon:(0,Ie.jsx)("svg",{viewBox:"0 0 512 512",height:"14",width:"14",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M448,440a16,16,0,0,1-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335,352.88,301,345.59,256,344.23V424A16,16,0,0,1,229,435.57l-176-168a16,16,0,0,1,0-23.14l176-168A16,16,0,0,1,256,88v80.36c74.14,3.41,129.38,30.91,164.35,81.87C449.32,292.44,464,350.9,464,424a16,16,0,0,1-16,16Z"})}),execute:function(e){var t=e.state,n=e.view;t&&n&&Di(n)}},xm=function(e){var t=e.editorProps,n=(0,Y.useRef)(0),r=(0,Y.useState)(!1),i=(0,J.Z)(r,2),o=i[0],a=i[1];return(0,Y.useEffect)((function(){if(t.containerEditor&&t.containerEditor.current&&t.containerEditor.current.parentElement){var e=t.containerEditor.current.parentElement;new ResizeObserver((function(e){var r,i=(0,vi.Z)(e);try{for(i.s();!(r=i.n()).done;){var a,s,u,l=r.value;n.current||(n.current=l.target.clientHeight),null!=(a=t.editor)&&null!=(s=a.current)&&null!=(u=s.view)&&u.dom&&(o?t.editor.current.view.dom.style.height=l.target.clientHeight+"px":t.editor.current.view.dom.removeAttribute("style"))}}catch(c){i.e(c)}finally{i.f()}})).observe(e)}}),[t.containerEditor,t.editor,o]),(0,Y.useEffect)((function(){if(document&&t&&t.container&&t.container.current&&t.editor){var e=t.container.current;document.body.style.overflow=o?"hidden":"initial",e&&o?(e.style.zIndex="999",e.style.position="fixed",e.style.top="0px",e.style.bottom="0px",e.style.left="0px",e.style.right="0px"):e&&(e.style.position="initial",e.style.top="initial",e.style.bottom="initial",e.style.left="initial",e.style.right="initial")}}),[o,t]),(0,Ie.jsx)("button",{onClick:function(){return a(!o)},type:"button",className:o?"active":"",children:e.command.icon})},Sm={name:"fullscreen",keyCommand:"fullscreen",button:function(e,t,n){return(0,Ie.jsx)(xm,{command:e,editorProps:ee({},t,n)})},icon:(0,Ie.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 1024 1024",children:[(0,Ie.jsx)("path",{fill:"currentColor",d:"M189.75 428.89a36.87 36.87 0 0 0 36.84-36.85V228.12h164a36.85 36.85 0 1 0 0-73.7H189.75a36.82 36.82 0 0 0-36.8 36.85v200.8a36.83 36.83 0 0 0 36.8 36.82zM834.26 595.06a36.82 36.82 0 0 0-36.8 36.84v164H633.41a36.85 36.85 0 0 0 0 73.7h200.85a36.87 36.87 0 0 0 36.84-36.85V631.9a36.86 36.86 0 0 0-36.84-36.84zM797.46 228.12v179.31a36.82 36.82 0 1 0 73.64 0V191.24a36.86 36.86 0 0 0-36.84-36.85H602.33a36.85 36.85 0 0 0 0 73.7zM421.62 795.9H226.54V616.56a36.82 36.82 0 1 0-73.64 0v216.19a36.83 36.83 0 0 0 36.85 36.85h231.87a36.85 36.85 0 0 0 0-73.7z"}),(0,Ie.jsx)("path",{fill:"currentColor",d:"M306.5 307.94m32.95 0l345.1 0q32.95 0 32.95 32.95l0 342.22q0 32.95-32.95 32.95l-345.1 0q-32.95 0-32.95-32.95l0-342.22q0-32.95 32.95-32.95Z"})]})},wm=function(e){var t=e.editorProps,n=t.containerEditor,r=t.preview,i=(0,Y.useState)(e.editorProps.visible),o=(0,J.Z)(i,2),a=o[0],s=o[1];return(0,Y.useEffect)((function(){return s(e.editorProps.visible)}),[e.editorProps.visible]),(0,Y.useEffect)((function(){if(r.current){var e=r.current;r&&(e.style.borderBottomRightRadius="3px"),e&&a?(e.style.width="50%",e.style.overflow="auto",e.style.borderLeft="1px solid var(--color-border-muted)",e.style.padding="20px",n.current&&(n.current.style.width="50%")):e&&(e.style.width="0%",e.style.overflow="hidden",e.style.borderLeft="0px",e.style.padding="0",n.current&&(n.current.style.width="100%"))}}),[a,n,r]),(0,Ie.jsx)("button",{onClick:function(){return s(!a)},type:"button",className:a?"active":"",children:e.command.icon})},Cm={name:"preview",keyCommand:"preview",button:function(e,t,n){return(0,Ie.jsx)(wm,{command:e,editorProps:ee({},t,n)})},icon:(0,Ie.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 32 32",children:(0,Ie.jsx)("path",{fill:"currentColor",d:"M0 16c3.037-5.864 9.058-9.802 16-9.802s12.963 3.938 15.953 9.703l0.047 0.1c-3.037 5.864-9.058 9.802-16 9.802s-12.963-3.938-15.953-9.703l-0.047-0.1zM16 22.531c3.607 0 6.531-2.924 6.531-6.531s-2.924-6.531-6.531-6.531v0c-3.607 0-6.531 2.924-6.531 6.531s2.924 6.531 6.531 6.531v0zM16 19.265c-1.804 0-3.265-1.461-3.265-3.265s1.461-3.265 3.265-3.265v0c1.804 0 3.265 1.461 3.265 3.265s-1.461 3.265-3.265 3.265v0z"})})},Em={undo:Tm,redo:bm,bold:cm,italic:hm,header:fm,strike:dm,underline:pm,quote:vm,olist:mm,ulist:gm,todo:ym,link:Om,image:km,fullscreen:Sm,preview:Cm},Am=function(){return Object.keys(Em).filter((function(e){return!/^(fullscreen|preview)/.test(e)})).map((function(e){return Em[e]}))},_m=function(){return[Cm,Sm]},Qm=["prefixCls","className","onClick","toolbars","editor","mode","preview","container","containerEditor","editorProps"];function Pm(e){var t=e.prefixCls,n=void 0===t?"md-editor":t,r=e.className,i=e.toolbars,o=void 0===i?[]:i,a=e.editor,s=e.mode,u=e.preview,l=e.container,c=e.containerEditor,h=e.editorProps,f=void 0===h?{}:h,d=Ne(e,Qm);if(!o||0===o.length)return null;return(0,Ie.jsx)("div",ee({className:n+"-toolbar "+(r||"")+" "+(s?n+"-toolbar-mode":"")},d,{children:(0,ze.Z)(o).map((function(e,t){var n={type:"button"},r="string"===typeof e?Em[e]:e;if(!r)return null;if(n.children=r.icon,n.onClick=function(){var e;(e=r.execute)&&a&&a&&e(a.current)},r.button&&"object"===typeof r.button){var i=r.button;Object.keys(i).forEach((function(e){n[e]=i[e]}))}else if("function"===typeof r.button)return Y.cloneElement(r.button(r,f,{preview:u,container:l,containerEditor:c,editor:a,editorProps:f}),{key:t});return(0,Y.createElement)("button",ee({},n,{key:t}))}))}))}var Rm=function(e){var t=e.theme,n=e.settings,r=e.styles,i={"&":{backgroundColor:n.background,color:n.foreground},".cm-gutters":{}};n.gutterBackground&&(i[".cm-gutters"].backgroundColor=n.gutterBackground),n.gutterForeground&&(i[".cm-gutters"].color=n.gutterForeground),n.gutterBorder&&(i[".cm-gutters"].borderRightColor=n.gutterBorder),n.caret&&(i[".cm-content"]={caretColor:n.caret},i[".cm-cursor, .cm-dropCursor"]={borderLeftColor:n.caret}),n.lineHighlight&&(i[".cm-activeLine"]={backgroundColor:n.lineHighlight},i[".cm-activeLineGutter"]={backgroundColor:n.lineHighlight}),n.selection&&(i["&.cm-focused .cm-selectionBackground .cm-selectionBackground, & .cm-selectionLayer .cm-selectionBackground, ::selection"]={backgroundColor:n.selection}),n.selectionMatch&&(i["& .cm-selectionMatch"]={backgroundColor:n.selectionMatch});var o=di.tk.theme(i,{dark:"dark"===t}),a=li.Qf.define(r);return[o,(0,li.nF)(a)]},Dm=Rm({theme:"light",settings:{background:"var(--color-canvas-subtle)",foreground:"var(--color-fg-default)",caret:"var(--color-fg-default)",selection:"var(--color-border-default)",selectionMatch:"var(--color-border-muted)",lineHighlight:"var(--color-neutral-muted)",gutterBackground:"var(--color-canvas-subtle)",gutterForeground:"var(--color-fg-muted)",gutterBorder:"var(--color-border-muted)"},styles:[{tag:As.pJ.comment,color:"var(--color-prettylights-syntax-comment)"},{tag:As.pJ.variableName,color:"var(--color-prettylights-syntax-variable)"},{tag:[As.pJ.string,As.pJ.special(As.pJ.brace)],color:"var(--color-prettylights-syntax-entity)"},{tag:As.pJ.number,color:"var(--color-prettylights-syntax-variable)"},{tag:[As.pJ.bool,As.pJ.null],color:"var(--color-prettylights-syntax-entity)"},{tag:As.pJ.keyword,color:"var(--color-prettylights-syntax-keyword)",fontWeight:"bold"},{tag:As.pJ.string,color:"var(--color-prettylights-syntax-string)"},{tag:As.pJ.operator,color:"var(--color-accent-emphasis)"},{tag:As.pJ.deleted,color:"var(--color-prettylights-syntax-markup-deleted-bg)"},{tag:As.pJ.deleted,color:"red"},{tag:As.pJ.className,color:"var(--color-prettylights-syntax-variable)"},{tag:As.pJ.definition(As.pJ.typeName),color:"var(--color-prettylights-syntax-entity)"},{tag:As.pJ.typeName,color:"var(--color-prettylights-syntax-entity)"},{tag:As.pJ.list,color:"var(--color-prettylights-syntax-markup-list)"},{tag:As.pJ.heading,color:"var(--color-prettylights-syntax-markup-heading)",fontWeight:"bold"},{tag:As.pJ.regexp,color:"var(--color-prettylights-syntax-string-regexp)"},{tag:As.pJ.literal,color:"var(--color-prettylights-syntax-markup-italic)"},{tag:As.pJ.link,color:"var(--color-prettylights-syntax-constant-other-reference-link)",textDecoration:"underline"},{tag:As.pJ.angleBracket,color:"var(--color-fg-default)"},{tag:As.pJ.tagName,color:"var(--color-prettylights-syntax-entity-tag)"},{tag:As.pJ.attributeName,color:"var(--color-prettylights-syntax-constant)"}]}),Nm=["prefixCls","className","onChange","toolbars","toolbarsMode","visible","renderPreview","visibleEditor","hideToolbar","previewProps","extensions"],Im=di.tk.theme({"&.cm-editor, & .cm-scroller":{borderBottomRightRadius:"3px",borderBottomLeftRadius:"3px"}}),Mm=Y.forwardRef(Lm);function Lm(e,t){var n=e.prefixCls,r=void 0===n?"md-editor":n,i=e.className,o=e.onChange,a=e.toolbars,s=void 0===a?Am():a,u=e.toolbarsMode,l=void 0===u?_m():u,c=e.visible,h=void 0===c||c,f=e.renderPreview,d=e.visibleEditor,p=void 0===d||d,m=e.hideToolbar,g=void 0===m||m,v=e.previewProps,O=void 0===v?{}:v,y=e.extensions,k=void 0===y?[]:y,b=Ne(e,Nm),T=(0,Y.useState)(e.value||""),x=(0,J.Z)(T,2),S=x[0],w=x[1],C=(0,Y.useRef)(null),E=(0,Y.useRef)(null),A=(0,Y.useRef)(null),_=(0,Y.useRef)(null);(0,Y.useImperativeHandle)(t,(function(){return{editor:C,preview:_}}),[C]);var Q={preview:_,editor:C,container:E,containerEditor:A,editorProps:e},P="number"===typeof b.height?b.height+"px":b.height,R=[(0,ui.markdown)({base:ui.markdownLanguage,codeLanguages:fi}),Im].concat((0,ze.Z)(k)),D=r+"-preview",N=[r,"wmde-markdown-var",i].filter(Boolean).join(" ");O.source=S;return(0,Ie.jsxs)("div",{className:N,ref:E,children:[g&&(0,Ie.jsxs)("div",{children:[(0,Ie.jsx)(Pm,ee({},Q,{toolbars:l,mode:!0})),(0,Ie.jsx)(Pm,ee({},Q,{toolbars:s}))]}),(0,Ie.jsxs)("div",{className:r+"-content",style:{height:b.height},children:[(0,Ie.jsx)("div",{className:r+"-content-editor",ref:A,children:p&&(0,Ie.jsx)(zs,ee({theme:Dm},b,{extensions:R,height:P,ref:C,onChange:function(e,t){w(e),o&&o(e,t)}}))}),(0,Ie.jsx)("div",{className:D,ref:_,children:f?f(O,!!h):(0,Ie.jsx)(lm,ee({},O,{"data-visible":!!h}))})]})]})}var $m='\n\n
\u5fae\u4fe1\u516c\u4f17\u53f7 Markdown \u7f16\u8f91\u5668
\n\n\n\n\u5fae\u4fe1\u516c\u4f17\u53f7\u6587\u7ae0 Markdown \u7f16\u8f91\u5668\uff0c\u4f7f\u7528 markdown \u8bed\u6cd5\u521b\u5efa\u4e00\u7bc7\u7b80\u4ecb\u7f8e\u89c2\u5927\u65b9\u7684\u5fae\u4fe1\u516c\u4f17\u53f7\u56fe\u6587\u3002\u7531\u4e8e\u53d1\u7248\u672c\u9ebb\u70e6\uff0c\u548c\u4e00\u4e9b\u529f\u80fd\u65e0\u6cd5\u6269\u5c55\u505c\u6ede\u5f00\u53d1\u4e86\uff0c\u672a\u6765\u4e0d\u518d\u5f00\u53d1 Chrome \u7684\u5de5\u5177(\u6682\u5b58\u5728 chrome \u5206\u652f)\uff0c\u901a\u8fc7 web \u7248\u672c\u5b9a\u5236\u66f4\u4e30\u5bcc\u7684\u529f\u80fd\u3002\n\n## \u529f\u80fd\u7279\u6027\n\n\u5f00\u53d1\u8ba1\u5212\u548c\u4e00\u4e9b\u529f\u80fd\u4ecb\u7ecd\uff0c\u6709\u9700\u6c42\u53ef\u4ee5\u5728 issue \u4e2d\u63d0\uff0c\u4f7f\u5f97\u5de5\u5177\u53d8\u5f97\u66f4\u52a0\u5b8c\u5584\u3002\u4e0b\u9762\u793a\u4f8b\u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\n- [x] \u652f\u6301 Markdown \u6240\u6709\u57fa\u7840\u8bed\u6cd5\n- [x] \u652f\u6301\u81ea\u5b9a\u4e49 CSS \u6837\u5f0f\n- [ ] \u652f\u6301\u4e3b\u9898\u9009\u62e9 & \u914d\u7f6e\u3002\n- [x] \u652f\u6301\u660e\u6697\u4e24\u79cd\u4e3b\u9898\u9884\u89c8\u3002\n- [ ] \u652f\u6301\u8272\u76d8\u53d6\u8272\uff0c\u5feb\u901f\u66ff\u6362\u6587\u7ae0\u6574\u4f53\u8272\u8c03\n\n### \u652f\u6301\u4ee3\u7801\u5757\u6837\u5f0f\n\n\u4e0b\u9762\u662f `jsx` \u4ee3\u7801\u5757\u5c55\u793a\u793a\u4f8b\uff0c\u5e76\u9ad8\u4eae\u4ee3\u7801\uff0c\u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\n```jsx\nfunction Demo() {\n return Hello World!
\n}\n```\n\n\u4e0b\u9762\u662f `css` \u4ee3\u7801\u5757\u5c55\u793a\u793a\u4f8b\uff0c\u5e76\u9ad8\u4eae\u4ee3\u7801\uff0c\u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\n```css\nli {\n font-size: 16px;\n margin: 0;\n line-height: 26px;\n color: rgb(30 41 59);\n font-family:-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif;\n}\n```\n\n### \u652f\u6301\u5185\u8054\u4ee3\u7801\n\n> \u7528\u4e8e web \u5e94\u7528\u4e2d\u6548\u679c\u5c55\u793a\u3002\n\nInline Code `{code: 0}`\n\n### \u652f\u6301\u8868\u683c\n\n\u8868\u683c\u65e0\u6cd5\u4f7f\u7528\u81ea\u5b9a\u4e49\u6837\u5f0f\uff0c\u6682\u65f6\u6ca1\u627e\u5230\u89e3\u51b3\u9014\u5f84\n\n| Header 1 | Header 2 |\n| --- | --- |\n| Key 1 | Value 1 |\n| Key 2 | Value 2 |\n| Key 3 | Value 3 |\n\n### \u652f\u6301 GFM \u811a\u6ce8\n\n\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u811a\u6ce8[^1]\u3002 \u9875\u9762\u6700\u540e\u6709\u4e00\u4e9b\u989d\u5916\u7684\u6587\u5b57\u63cf\u8ff0\u3002\u6ce8\u610f\u8fd9\u4e0d\u662f\u5b8c\u6574\u7684\u6ce8\u811a[^2]\u3002\n\n[^1]: https://github.github.com/gfm/\n[^2]: \u5fae\u4fe1\u6587\u7ae0\u4e0d\u652f\u6301\u951a\u70b9\u8df3\u8f6c\u548c\u6253\u5f00\u7b2c\u4e09\u65b9 URL \u8d85\u94fe\u63a5\uff0c\u6240\u4ee5\u4e0d\u652f\u6301\u5b8c\u6574\u7684\u6ce8\u811a\n\n### \u652f\u6301\u6ce8\u91ca\n\n\n \u6c49 \n \u5b57 \n \u62fc \n \u97f3 \n \u6ce8 \n \u97f3 \n\n\n## License\n\nLicensed under the MIT License.\n',Zm=10,Fm=11,jm=12,Bm=13,zm=15,Wm=16,Hm=17,Um=18,Xm=19,Gm=20,qm=21,Vm=22,Ym=23,Km=24,Jm=25;function eg(e){return e>=48&&e<=57}function tg(e){return eg(e)||e>=65&&e<=70||e>=97&&e<=102}function ng(e){return e>=65&&e<=90}function rg(e){return function(e){return ng(e)||function(e){return e>=97&&e<=122}(e)}(e)||function(e){return e>=128}(e)||95===e}function ig(e){return rg(e)||eg(e)||45===e}function og(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e}function ag(e){return 10===e||13===e||12===e}function sg(e){return ag(e)||32===e||9===e}function ug(e,t){return 92===e&&(!ag(t)&&0!==t)}function lg(e,t,n){return 45===e?rg(t)||45===t||ug(t,n):!!rg(e)||92===e&&ug(e,t)}function cg(e,t,n){return 43===e||45===e?eg(t)?2:46===t&&eg(n)?3:0:46===e?eg(t)?2:0:eg(e)?1:0}function hg(e){return 65279===e||65534===e?1:0}for(var fg=new Array(128),dg=130,pg=0;pge.length)return!1;for(var i=t;i=55296&&t<=57343||t>1114111)&&(t=65533),String.fromCodePoint(t)}var Eg=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token"];function Ag(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return null===e||e.length0?hg(t.charCodeAt(0)):0,i=Ag(e.lines,n),o=Ag(e.columns,n),a=e.startLine,s=e.startColumn,u=r;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.source=e,this.startOffset=t,this.startLine=n,this.startColumn=r,this.computed=!1}},{key:"getLocation",value:function(e,t){return this.computed||_g(this),{source:t,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}},{key:"getLocationRange",value:function(e,t,n){return this.computed||_g(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+t,line:this.lines[t],column:this.columns[t]}}}}]),e}(),Pg=16777215,Rg=24,Dg=new Map([[2,Vm],[qm,Vm],[Xm,Gm],[Ym,Km]]),Ng=function(){function e(t,n){(0,mi.Z)(this,e),this.setSource(t,n)}return(0,gi.Z)(e,[{key:"reset",value:function(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}},{key:"setSource",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=(e=String(e||"")).length,r=Ag(this.offsetAndType,e.length+1),i=Ag(this.balance,e.length+1),o=0,a=0,s=0,u=-1;for(this.offsetAndType=null,this.balance=null,t(e,(function(e,t,l){switch(e){default:i[o]=n;break;case a:var c=s&Pg;for(s=i[c],a=s>>Rg,i[o]=c,i[c++]=o;c>Rg:0}},{key:"lookupOffset",value:function(e){return(e+=this.tokenIndex)0?e>Rg,this.tokenEnd=t&Pg):(this.tokenIndex=this.tokenCount,this.next())}},{key:"next",value:function(){var e=this.tokenIndex+1;e>Rg,this.tokenEnd=e&Pg):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=0,this.tokenStart=this.tokenEnd=this.source.length)}},{key:"skipSC",value:function(){for(;this.tokenType===Bm||this.tokenType===Jm;)this.next()}},{key:"skipUntilBalanced",value:function(e,t){var n,r,i=e;e:for(;i0?this.offsetAndType[i-1]&Pg:this.firstCharOffset,t(this.source.charCodeAt(r))){case 1:break e;case 2:i++;break e;default:this.balance[n]===i&&(i=n)}this.skip(i-this.tokenIndex)}},{key:"forEachToken",value:function(e){for(var t=0,n=this.firstCharOffset;t>Rg,r,o,t)}}},{key:"dump",value:function(){var e=this,t=new Array(this.tokenCount);return this.forEachToken((function(n,r,i,o){t[o]={idx:o,type:Eg[n],chunk:e.source.substring(r,i),balance:e.balance[o]}})),t}}]),e}();function Ig(e,t){function n(t){return t=e.length?void(l=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}var $g=null,Zg=function(e){function t(){(0,mi.Z)(this,t),this.head=null,this.tail=null,this.cursor=null}return(0,gi.Z)(t,[{key:"createItem",value:function(e){return t.createItem(e)}},{key:"allocateCursor",value:function(e,t){var n;return null!==$g?(n=$g,$g=$g.cursor,n.prev=e,n.next=t,n.cursor=this.cursor):n={prev:e,next:t,cursor:this.cursor},this.cursor=n,n}},{key:"releaseCursor",value:function(){var e=this.cursor;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=$g,$g=e}},{key:"updateCursors",value:function(e,t,n,r){for(var i=this.cursor;null!==i;)i.prev===e&&(i.prev=t),i.next===n&&(i.next=r),i=i.cursor}},{key:e,value:Lg().mark((function e(){var t;return Lg().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(null===t){e.next=7;break}return e.next=4,t.data;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))},{key:"size",get:function(){for(var e=0,t=this.head;null!==t;t=t.next)e++;return e}},{key:"isEmpty",get:function(){return null===this.head}},{key:"first",get:function(){return this.head&&this.head.data}},{key:"last",get:function(){return this.tail&&this.tail.data}},{key:"fromArray",value:function(e){var n=null;this.head=null;var r,i=(0,vi.Z)(e);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=t.createItem(o);null!==n?n.next=a:this.head=a,a.prev=n,n=a}}catch(s){i.e(s)}finally{i.f()}return this.tail=n,this}},{key:"toArray",value:function(){return(0,ze.Z)(this)}},{key:"toJSON",value:function(){return(0,ze.Z)(this)}},{key:"forEach",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=this.allocateCursor(null,this.head);null!==n.next;){var r=n.next;n.next=r.next,e.call(t,r.data,r,this)}this.releaseCursor()}},{key:"forEachRight",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=this.allocateCursor(this.tail,null);null!==n.prev;){var r=n.prev;n.prev=r.prev,e.call(t,r.data,r,this)}this.releaseCursor()}},{key:"reduce",value:function(e,t){for(var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,i=this.allocateCursor(null,this.head),o=t;null!==i.next;)n=i.next,i.next=n.next,o=e.call(r,o,n.data,n,this);return this.releaseCursor(),o}},{key:"reduceRight",value:function(e,t){for(var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,i=this.allocateCursor(this.tail,null),o=t;null!==i.prev;)n=i.prev,i.prev=n.prev,o=e.call(r,o,n.data,n,this);return this.releaseCursor(),o}},{key:"some",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=this.head;null!==n;n=n.next)if(e.call(t,n.data,n,this))return!0;return!1}},{key:"map",value:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,r=new t,i=this.head;null!==i;i=i.next)r.appendData(e.call(n,i.data,i,this));return r}},{key:"filter",value:function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,r=new t,i=this.head;null!==i;i=i.next)e.call(n,i.data,i,this)&&r.appendData(i.data);return r}},{key:"nextUntil",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;if(null!==e){for(var r=this.allocateCursor(null,e);null!==r.next;){var i=r.next;if(r.next=i.next,t.call(n,i.data,i,this))break}this.releaseCursor()}}},{key:"prevUntil",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this;if(null!==e){for(var r=this.allocateCursor(e,null);null!==r.prev;){var i=r.prev;if(r.prev=i.prev,t.call(n,i.data,i,this))break}this.releaseCursor()}}},{key:"clear",value:function(){this.head=null,this.tail=null}},{key:"copy",value:function(){var e,n=new t,r=(0,vi.Z)(this);try{for(r.s();!(e=r.n()).done;){var i=e.value;n.appendData(i)}}catch(o){r.e(o)}finally{r.f()}return n}},{key:"prepend",value:function(e){return this.updateCursors(null,e,this.head,e),null!==this.head?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}},{key:"prependData",value:function(e){return this.prepend(t.createItem(e))}},{key:"append",value:function(e){return this.insert(e)}},{key:"appendData",value:function(e){return this.insert(t.createItem(e))}},{key:"insert",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null!==t)if(this.updateCursors(t.prev,e,t,e),null===t.prev){if(this.head!==t)throw new Error("before doesn't belong to list");this.head=e,t.prev=e,e.next=t,this.updateCursors(null,e)}else t.prev.next=e,e.prev=t.prev,t.prev=e,e.next=t;else this.updateCursors(this.tail,e,null,e),null!==this.tail?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}},{key:"insertData",value:function(e,n){return this.insert(t.createItem(e),n)}},{key:"remove",value:function(e){if(this.updateCursors(e,e.prev,e,e.next),null!==e.prev)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(null!==e.next)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}},{key:"push",value:function(e){this.insert(t.createItem(e))}},{key:"pop",value:function(){return null!==this.tail?this.remove(this.tail):null}},{key:"unshift",value:function(e){this.prepend(t.createItem(e))}},{key:"shift",value:function(){return null!==this.head?this.remove(this.head):null}},{key:"prependList",value:function(e){return this.insertList(e,this.head)}},{key:"appendList",value:function(e){return this.insertList(e)}},{key:"insertList",value:function(e,t){return null===e.head||(void 0!==t&&null!==t?(this.updateCursors(t.prev,e.tail,t,e.head),null!==t.prev?(t.prev.next=e.head,e.head.prev=t.prev):this.head=e.head,t.prev=e.tail,e.tail.next=t):(this.updateCursors(this.tail,e.tail,null,e.head),null!==this.tail?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null),this}},{key:"replace",value:function(e,t){"head"in t?this.insertList(t,e):this.insert(t,e),this.remove(e)}}],[{key:"createItem",value:function(e){return{prev:null,next:null,data:e}}}]),t}(Symbol.iterator);function Fg(e,t){var n=Object.create(SyntaxError.prototype),r=new Error;return Object.assign(n,{name:e,message:t,get stack(){return(r.stack||"").replace(/^(.+\n){1,3}/,"".concat(e,": ").concat(t,"\n"))}})}var jg=" ";function Bg(e,t){var n=e.source,r=e.line,i=e.column;function o(e,t){return a.slice(e,t).map((function(t,n){return String(e+n+1).padStart(l)+" |"+t})).join("\n")}var a=n.split(/\r\n?|\n|\f/),s=Math.max(1,r-t)-1,u=Math.min(r+t,a.length+1),l=Math.max(4,String(u).length)+1,c=0;(i+=(jg.length-1)*(a[r-1].substr(0,i-1).match(/\t/g)||[]).length)>100&&(c=i-60+3,i=58);for(var h=s;h<=u;h++)h>=0&&h0&&a[h].length>c?"\u2026":"")+a[h].substr(c,98)+(a[h].length>c+100-1?"\u2026":""));return[o(s,r),new Array(i+l+2).join("-")+"^",o(r,u)].filter(Boolean).join("\n")}function zg(e,t,n,r,i){return Object.assign(Fg("SyntaxError",e),{source:t,offset:n,line:r,column:i,sourceFragment:function(e){return Bg({source:t,line:r,column:i},isNaN(e)?0:e)},get formattedMessage(){return"Parse error: ".concat(e,"\n")+Bg({source:t,line:r,column:i},2)}})}function Wg(e){for(var t=this.createList(),n=!1,r={recognizer:e};!this.eof;){switch(this.tokenType){case Jm:this.next();continue;case Bm:n=!0,this.next();continue}var i=e.getNode.call(this,r);if(void 0===i)break;n&&(e.onWhiteSpace&&e.onWhiteSpace.call(this,i,t,r),n=!1),t.push(i)}return n&&e.onWhiteSpace&&e.onWhiteSpace.call(this,null,t,r),t}var Hg=function(){};function Ug(e){return function(){return this[e]()}}function Xg(e){var t=Object.create(null);for(var n in e){var r=e[n],i=r.parse||r;i&&(t[n]=i)}return t}function Gg(e){var t="",n="",r=!1,i=Hg,o=!1,a=new Qg,s=Object.assign(new Ng,function(e){var t={context:Object.create(null),scope:Object.assign(Object.create(null),e.scope),atrule:Xg(e.atrule),pseudo:Xg(e.pseudo),node:Xg(e.node)};for(var n in e.parseContext)switch(typeof e.parseContext[n]){case"function":t.context[n]=e.parseContext[n];break;case"string":t.context[n]=Ug(e.parseContext[n])}return(0,We.Z)((0,We.Z)({config:t},t),t.node)}(e||{}),{parseAtrulePrelude:!0,parseRulePrelude:!0,parseValue:!0,parseCustomProperty:!1,readSequence:Wg,consumeUntilBalanceEnd:function(){return 0},consumeUntilLeftCurlyBracket:function(e){return 123===e?1:0},consumeUntilLeftCurlyBracketOrSemicolon:function(e){return 123===e||59===e?1:0},consumeUntilExclamationMarkOrSemicolon:function(e){return 33===e||59===e?1:0},consumeUntilSemicolonIncluded:function(e){return 59===e?2:0},createList:function(){return new Zg},createSingleNodeList:function(e){return(new Zg).appendData(e)},getFirstListNode:function(e){return e&&e.first},getLastListNode:function(e){return e&&e.last},parseWithFallback:function(e,t){var n=this.tokenIndex;try{return e.call(this)}catch(Ue){if(o)throw Ue;var r=t.call(this,n);return o=!0,i(Ue,r),o=!1,r}},lookupNonWSType:function(e){var t;do{if((t=this.lookupType(e++))!==Bm)return t}while(0!==t);return 0},charCodeAt:function(e){return e>=0&&e=0&&sg(e.charCodeAt(t));t--);return t+1}(t,t.length-1)):a.getLocation(this.tokenStart);throw new zg(e||"Unexpected input",t,r.offset,r.line,r.column)}});return Object.assign((function(e,u){t=e,u=u||{},s.setSource(t,Ig),a.setSource(t,u.offset,u.line,u.column),n=u.filename||"",r=Boolean(u.positions),i="function"===typeof u.onParseError?u.onParseError:Hg,o=!1,s.parseAtrulePrelude=!("parseAtrulePrelude"in u)||Boolean(u.parseAtrulePrelude),s.parseRulePrelude=!("parseRulePrelude"in u)||Boolean(u.parseRulePrelude),s.parseValue=!("parseValue"in u)||Boolean(u.parseValue),s.parseCustomProperty="parseCustomProperty"in u&&Boolean(u.parseCustomProperty);var l=u,c=l.context,h=void 0===c?"default":c,f=l.onComment;if(h in s.context===!1)throw new Error("Unknown context `"+h+"`");"function"===typeof f&&s.forEachToken((function(e,n,r){if(e===Jm){var i=s.getLocation(n,r),o=yg(t,r-2,r,"*/")?t.slice(n+2,r-2):t.slice(n+2,r);f(o,i)}}));var d=s.context[h].call(s,u);return s.eof||s.error(),d}),{SyntaxError:zg,config:s.config})}var qg=n(7806),Vg=new Set(["Atrule","Selector","Declaration"]);var Yg=function(e,t){if(9===e&&(e=t),"string"===typeof e){var n=e.charCodeAt(0);return n>127?32768:n<<8}return e},Kg=[[1,1],[1,2],[1,7],[1,8],[1,"-"],[1,Zm],[1,Fm],[1,jm],[1,zm],[1,qm],[3,1],[3,2],[3,7],[3,8],[3,"-"],[3,Zm],[3,Fm],[3,jm],[3,zm],[4,1],[4,2],[4,7],[4,8],[4,"-"],[4,Zm],[4,Fm],[4,jm],[4,zm],[jm,1],[jm,2],[jm,7],[jm,8],[jm,"-"],[jm,Zm],[jm,Fm],[jm,jm],[jm,zm],["#",1],["#",2],["#",7],["#",8],["#","-"],["#",Zm],["#",Fm],["#",jm],["#",zm],["-",1],["-",2],["-",7],["-",8],["-","-"],["-",Zm],["-",Fm],["-",jm],["-",zm],[Zm,1],[Zm,2],[Zm,7],[Zm,8],[Zm,Zm],[Zm,Fm],[Zm,jm],[Zm,"%"],[Zm,zm],["@",1],["@",2],["@",7],["@",8],["@","-"],["@",zm],[".",Zm],[".",Fm],[".",jm],["+",Zm],["+",Fm],["+",jm],["/","*"]],Jg=Kg.concat([[1,4],[jm,4],[4,4],[3,qm],[3,5],[3,Wm],[Fm,Fm],[Fm,jm],[Fm,2],[Fm,"-"],[Vm,1],[Vm,2],[Vm,Fm],[Vm,jm],[Vm,4],[Vm,"-"]]);function ev(e){var t=new Set(e.map((function(e){var t=(0,J.Z)(e,2),n=t[0],r=t[1];return Yg(n)<<16|Yg(r)})));return function(e,n,r){var i=Yg(n,r),o=r.charCodeAt(0);return(45===o&&1!==n&&2!==n&&n!==zm||43===o?t.has(e<<16|o<<8):t.has(e<<16|i))&&this.emit(" ",Bm,!0),i}}var tv=ev(Kg),nv=ev(Jg);function rv(e,t){var n=this;if("function"!==typeof t)e.children.forEach(this.node,this);else{var r=null;e.children.forEach((function(e){null!==r&&t.call(n,r),n.node(e),r=e}))}}function iv(e){var t=this;Ig(e,(function(n,r,i){t.token(n,e.slice(r,i))}))}function ov(e){var t=new Map;for(var n in e.node){var r=e.node[n];"function"===typeof(r.generate||r)&&t.set(n,r.generate||r)}return function(e,n){var r="",o=0,a={node:function(e){if(!t.has(e.type))throw new Error("Unknown node type: "+e.type);t.get(e.type).call(s,e)},tokenBefore:nv,token:function(e,t){o=this.tokenBefore(o,e,t),this.emit(t,e,!1),9===e&&92===t.charCodeAt(0)&&this.emit("\n",Bm,!0)},emit:function(e){r+=e},result:function(){return r}};n&&("function"===typeof n.decorator&&(a=n.decorator(a)),n.sourceMap&&(a=function(e){var t=new qg.h,n={line:1,column:0},r={line:0,column:0},i={line:1,column:0},o={generated:i},a=1,s=0,u=!1,l=e.node;e.node=function(e){if(e.loc&&e.loc.start&&Vg.has(e.type)){var c=e.loc.start.line,h=e.loc.start.column-1;r.line===c&&r.column===h||(r.line=c,r.column=h,n.line=a,n.column=s,u&&(u=!1,n.line===i.line&&n.column===i.column||t.addMapping(o)),u=!0,t.addMapping({source:e.loc.source,original:r,generated:n}))}l.call(this,e),u&&Vg.has(e.type)&&(i.line=a,i.column=s)};var c=e.emit;e.emit=function(e,t,n){for(var r=0;r";break;case"Property":i="<'"+e.name+"'>";break;case"Keyword":i=e.name;break;case"AtKeyword":i="@"+e.name;break;case"Function":i=e.name+"(";break;case"String":case"Token":i=e.value;break;case"Comma":i=",";break;default:throw new Error("Unknown node type `"+e.type+"`")}return t(i,e)}function gv(e,t){var n=pv,r=!1,i=!1;return"function"===typeof t?n=t:t&&(r=Boolean(t.forceBraces),i=Boolean(t.compact),"function"===typeof t.decorate&&(n=t.decorate)),mv(e,n,r,i)}var vv={offset:0,line:1,column:1};function Ov(e,t){var n=e&&e.loc&&e.loc[t];return n?"line"in n?yv(n):n:null}function yv(e,t){var n={offset:e.offset,line:e.line,column:e.column};if(t){var r=t.split(/\n|\r\n?|\f/);n.offset+=t.length,n.line+=r.length-1,n.column=1===r.length?n.column+t.length:r.pop().length+1}return n}var kv=function(e,t){var n=Fg("SyntaxReferenceError",e+(t?" `"+t+"`":""));return n.reference=t,n},bv=function(e,t,n,r){var i=Fg("SyntaxMatchError",e),o=function(e,t){for(var n,r,i=e.tokens,o=e.longestMatch,a=o1?(n=Ov(s||t,"end")||yv(vv,h),r=yv(n)):(n=Ov(s,"start")||yv(Ov(t,"start")||vv,h.slice(0,u)),r=Ov(s,"end")||yv(n,h.substr(u,l))),{css:h,mismatchOffset:u,mismatchLength:l,start:n,end:r}}(r,n),a=o.css,s=o.mismatchOffset,u=o.mismatchLength,l=o.start,c=o.end;return i.rawMessage=e,i.syntax=t?gv(t):"",i.css=a,i.mismatchOffset=s,i.mismatchLength=u,i.message=e+"\n syntax: "+i.syntax+"\n value: "+(a||"")+"\n --------"+new Array(i.mismatchOffset+1).join("-")+"^",Object.assign(i,l),i.loc={source:n&&n.loc&&n.loc.source||"",start:l,end:c},i},Tv=new Map,xv=new Map,Sv=function(e){if(Tv.has(e))return Tv.get(e);var t=e.toLowerCase(),n=Tv.get(t);if(void 0===n){var r=Cv(t,0),i=r?"":Ev(t,0);n=Object.freeze({basename:t.substr(i.length),name:t,prefix:i,vendor:i,custom:r})}return Tv.set(e,n),n},wv=function(e){if(xv.has(e))return xv.get(e);var t=e,n=e[0];"/"===n?n="/"===e[1]?"//":"/":"_"!==n&&"*"!==n&&"$"!==n&&"#"!==n&&"+"!==n&&"&"!==n&&(n="");var r=Cv(t,n.length);if(!r&&(t=t.toLowerCase(),xv.has(t))){var i=xv.get(t);return xv.set(e,i),i}var o=r?"":Ev(t,n.length),a=t.substr(0,n.length+o.length),s=Object.freeze({basename:t.substr(a.length),name:t.substr(n.length),hack:n,vendor:o,prefix:a,custom:r});return xv.set(e,s),s};function Cv(e,t){return t=t||0,e.length-t>=2&&45===e.charCodeAt(t)&&45===e.charCodeAt(t+1)}function Ev(e,t){if(t=t||0,e.length-t>=3&&45===e.charCodeAt(t)&&45!==e.charCodeAt(t+1)){var n=e.indexOf("-",t+2);if(-1!==n)return e.substring(t,n+1)}return""}var Av=["initial","inherit","unset","revert","revert-layer"],_v=45,Qv=!0;function Pv(e,t){return null!==e&&9===e.type&&e.value.charCodeAt(0)===t}function Rv(e,t,n){for(;null!==e&&(e.type===Bm||e.type===Jm);)e=n(++t);return t}function Dv(e,t,n,r){if(!e)return 0;var i=e.value.charCodeAt(t);if(43===i||i===_v){if(n)return 0;t++}for(;t6)return 0}return r}function Lv(e,t,n){if(!e)return 0;for(;Iv(n(t),63);){if(++e>6)return 0;t++}return t}var $v=["calc(","-moz-calc(","-webkit-calc("],Zv=new Map([[2,Vm],[qm,Vm],[Xm,Gm],[Ym,Km]]);function Fv(e,t){return te.max&&"string"!==typeof e.max)return!0}return!1}function Hv(e){return function(t,n,r){return null===t?0:2===t.type&&Bv(t.value,$v)?function(e,t){var n=0,r=[],i=0;e:do{switch(e.type){case Km:case Vm:case Gm:if(e.type!==n)break e;if(n=r.pop(),0===r.length){i++;break e}break;case 2:case qm:case Xm:case Ym:r.push(n),n=Zv.get(e.type)}i++}while(e=t(i));return i}(t,n):e(t,n,r)}}function Uv(e){return function(t){return null===t||t.type!==e?0:1}}function Xv(e){return e&&(e=new Set(e)),function(t,n,r){if(null===t||t.type!==jm)return 0;var i=Sg(t.value,0);if(null!==e){var o=t.value.indexOf("\\",i),a=-1!==o&&zv(t.value,o)?t.value.substring(i,o):t.value.substr(i);if(!1===e.has(a.toLowerCase()))return 0}return Wv(r,t.value,i)?0:1}}function Gv(e){return"function"!==typeof e&&(e=function(){return 0}),function(t,n,r){return null!==t&&t.type===Zm&&0===Number(t.value)?1:e(t,n,r)}}var qv={"ident-token":Uv(1),"function-token":Uv(2),"at-keyword-token":Uv(3),"hash-token":Uv(4),"string-token":Uv(5),"bad-string-token":Uv(6),"url-token":Uv(7),"bad-url-token":Uv(8),"delim-token":Uv(9),"number-token":Uv(Zm),"percentage-token":Uv(Fm),"dimension-token":Uv(jm),"whitespace-token":Uv(Bm),"CDO-token":Uv(14),"CDC-token":Uv(zm),"colon-token":Uv(Wm),"semicolon-token":Uv(Hm),"comma-token":Uv(Um),"[-token":Uv(Xm),"]-token":Uv(Gm),"(-token":Uv(qm),")-token":Uv(Vm),"{-token":Uv(Ym),"}-token":Uv(Km),string:Uv(5),ident:Uv(1),"custom-ident":function(e){if(null===e||1!==e.type)return 0;var t=e.value.toLowerCase();return Bv(t,Av)||jv(t,"default")?0:1},"custom-property-name":function(e){return null===e||1!==e.type||45!==Fv(e.value,0)||45!==Fv(e.value,1)?0:1},"hex-color":function(e){if(null===e||4!==e.type)return 0;var t=e.value.length;if(4!==t&&5!==t&&7!==t&&9!==t)return 0;for(var n=1;n=128||0===Jv[n])break}return e.pos===t&&e.error("Expect a keyword"),e.substringToPos(t)}function rO(e){for(var t=e.pos;t57)break}return e.pos===t&&e.error("Expect a number"),e.substringToPos(t)}function iO(e){var t=e.str.indexOf("'",e.pos+1);return-1===t&&(e.pos=e.str.length,e.error("Expect an apostrophe")),e.substringToPos(t+1)}function oO(e){var t,n=null;return e.eat(Kv),t=rO(e),44===e.charCode()?(e.pos++,125!==e.charCode()&&(n=rO(e))):n=t,e.eat(125),{min:Number(t),max:n?Number(n):0}}function aO(e,t){var n=function(e){var t=null,n=!1;switch(e.charCode()){case 42:e.pos++,t={min:0,max:0};break;case 43:e.pos++,t={min:1,max:0};break;case 63:e.pos++,t={min:0,max:1};break;case 35:e.pos++,n=!0,e.charCode()===Kv?t=oO(e):63===e.charCode()?(e.pos++,t={min:0,max:0}):t={min:1,max:0};break;case Kv:t=oO(e);break;default:return null}return{type:"Multiplier",comma:n,min:t.min,max:t.max,term:null}}(e);return null!==n?(n.term=t,35===e.charCode()&&43===e.charCodeAt(e.pos-1)?aO(e,n):n):t}function sO(e){var t=e.peek();return""===t?null:{type:"Token",value:t}}function uO(e){var t,n=null;return e.eat(60),t=nO(e),40===e.charCode()&&41===e.nextCharCode()&&(e.pos+=2,t+="()"),91===e.charCodeAt(e.findWsEnd(e.pos))&&(tO(e),n=function(e){var t=null,n=null,r=1;return e.eat(91),45===e.charCode()&&(e.peek(),r=-1),-1==r&&8734===e.charCode()?e.peek():(t=r*Number(rO(e)),0!==Jv[e.charCode()]&&(t+=nO(e))),tO(e),e.eat(44),tO(e),8734===e.charCode()?e.peek():(r=1,45===e.charCode()&&(e.peek(),r=-1),n=r*Number(rO(e)),0!==Jv[e.charCode()]&&(n+=nO(e))),e.eat(93),{type:"Range",min:t,max:n}}(e)),e.eat(62),aO(e,{type:"Type",name:t,opts:n})}function lO(e,t){function n(e,t){return{type:"Group",terms:e,combinator:t,disallowEmpty:!1,explicit:!1}}var r;for(t=Object.keys(t).sort((function(e,t){return eO[e]-eO[t]}));t.length>0;){r=t.shift();for(var i=0,o=0;i1&&(e.splice(o,i-o,n(e.slice(o,i),r)),i=o+1),o=-1))}-1!==o&&t.length&&e.splice(o,i-o,n(e.slice(o,i),r))}return r}function cO(e){for(var t,n=[],r={},i=null,o=e.pos;t=hO(e);)"Spaces"!==t.type&&("Combinator"===t.type?(null!==i&&"Combinator"!==i.type||(e.pos=o,e.error("Unexpected combinator")),r[t.value]=!0):null!==i&&"Combinator"!==i.type&&(r[" "]=!0,n.push({type:"Combinator",value:" "})),n.push(t),i=t,o=e.pos);return null!==i&&"Combinator"===i.type&&(e.pos-=o,e.error("Unexpected combinator")),{type:"Group",terms:n,combinator:lO(n,r)||" ",disallowEmpty:!1,explicit:!1}}function hO(e){var t=e.charCode();if(t<128&&1===Jv[t])return function(e){var t=nO(e);return 40===e.charCode()?(e.pos++,{type:"Function",name:t}):aO(e,{type:"Keyword",name:t})}(e);switch(t){case 93:break;case 91:return aO(e,function(e){var t;return e.eat(91),t=cO(e),e.eat(93),t.explicit=!0,33===e.charCode()&&(e.pos++,t.disallowEmpty=!0),t}(e));case 60:return 39===e.nextCharCode()?function(e){var t;return e.eat(60),e.eat(39),t=nO(e),e.eat(39),e.eat(62),aO(e,{type:"Property",name:t})}(e):uO(e);case 124:return{type:"Combinator",value:e.substringToPos(e.pos+(124===e.nextCharCode()?2:1))};case 38:return e.pos++,e.eat(38),{type:"Combinator",value:"&&"};case 44:return e.pos++,{type:"Comma"};case 39:return aO(e,{type:"String",value:iO(e)});case 32:case 9:case 10:case 13:case 12:return{type:"Spaces",value:tO(e)};case 64:return(t=e.nextCharCode())<128&&1===Jv[t]?(e.pos++,{type:"AtKeyword",name:nO(e)}):sO(e);case 42:case 43:case 63:case 35:case 33:break;case Kv:if((t=e.nextCharCode())<48||t>57)return sO(e);break;default:return sO(e)}}function fO(e){var t=new Yv(e),n=cO(t);return t.pos!==e.length&&t.error("Unexpected input"),1===n.terms.length&&"Group"===n.terms[0].type?n.terms[0]:n}var dO=function(){};function pO(e){return"function"===typeof e?e:dO}var mO={decorator:function(e){var t=[],n=null;return(0,We.Z)((0,We.Z)({},e),{},{node:function(t){var r=n;n=t,e.node.call(this,t),n=r},emit:function(e,r,i){t.push({type:r,value:e,node:i?null:n})},result:function(){return t}})}};function gO(e,t){return"string"===typeof e?function(e){var t=[];return Ig(e,(function(n,r,i){return t.push({type:n,value:e.slice(r,i),node:null})})),t}(e):t.generate(e,mO)}var vO={type:"Match"},OO={type:"Mismatch"},yO={type:"DisallowEmpty"};function kO(e,t,n){return t===vO&&n===OO||e===vO&&t===vO&&n===vO?e:("If"===e.type&&e.else===OO&&t===vO&&(t=e.then,e=e.match),{type:"If",match:e,then:t,else:n})}function bO(e){return e.length>2&&40===e.charCodeAt(e.length-2)&&41===e.charCodeAt(e.length-1)}function TO(e){return"Keyword"===e.type||"AtKeyword"===e.type||"Function"===e.type||"Type"===e.type&&bO(e.name)}function xO(e,t,n){switch(e){case" ":for(var r=vO,i=t.length-1;i>=0;i--){r=kO(t[i],r,OO)}return r;case"|":for(var o=OO,a=null,s=t.length-1;s>=0;s--){var u=t[s];if(TO(u)&&(null===a&&s>0&&TO(t[s-1])&&(o=kO({type:"Enum",map:a=Object.create(null)},vO,o)),null!==a)){var l=(bO(u.name)?u.name.slice(0,-1):u.name).toLowerCase();if(l in a===!1){a[l]=u;continue}}a=null,o=kO(u,vO,o)}return o;case"&&":if(t.length>5)return{type:"MatchOnce",terms:t,all:!0};for(var c=OO,h=function(n){var r=t[n],i=void 0;i=t.length>1?xO(e,t.filter((function(e){return e!==r})),!1):vO,c=kO(r,i,c)},f=t.length-1;f>=0;f--)h(f);return c;case"||":if(t.length>5)return{type:"MatchOnce",terms:t,all:!1};for(var d=n?vO:OO,p=function(n){var r=t[n],i=void 0;i=t.length>1?xO(e,t.filter((function(e){return e!==r})),!0):vO,d=kO(r,i,d)},m=t.length-1;m>=0;m--)p(m);return d}}function SO(e){if("function"===typeof e)return{type:"Generic",fn:e};switch(e.type){case"Group":var t=xO(e.combinator,e.terms.map(SO),!1);return e.disallowEmpty&&(t=kO(t,yO,OO)),t;case"Multiplier":return function(e){var t=vO,n=SO(e.term);if(0===e.max)n=kO(n,yO,OO),(t=kO(n,null,OO)).then=kO(vO,vO,t),e.comma&&(t.then.else=kO({type:"Comma",syntax:e},t,OO));else for(var r=e.min||1;r<=e.max;r++)e.comma&&t!==vO&&(t=kO({type:"Comma",syntax:e},t,OO)),t=kO(n,kO(vO,vO,t),OO);if(0===e.min)t=kO(vO,vO,t);else for(var i=0;i=65&&i<=90&&(i|=32),i!==r)return!1}return!0}function QO(e){return null===e||(e.type===Um||2===e.type||e.type===qm||e.type===Xm||e.type===Ym||function(e){return 9===e.type&&"?"!==e.value}(e))}function PO(e){return null===e||(e.type===Vm||e.type===Gm||e.type===Km||9===e.type&&"/"===e.value)}function RO(e,t,n){function r(){do{v++,g=vO&&(O=v)}function l(){y=2===y.type?y.prev:{type:3,syntax:c.syntax,token:y.token,prev:y},c=c.prev}var c=null,h=null,f=null,d=null,p=0,m=null,g=null,v=-1,O=0,y={type:0,syntax:null,token:null,prev:null};for(r();null===m&&++p<15e3;)switch(t.type){case"Match":if(null===h){if(null!==g&&(v!==e.length-1||"\\0"!==g.value&&"\\9"!==g.value)){t=OO;break}m=EO;break}if((t=h.nextState)===yO){if(h.matchStack===y){t=OO;break}t=vO}for(;h.syntaxStack!==c;)l();h=h.prev;break;case"Mismatch":if(null!==d&&!1!==d)(null===f||v>f.tokenIndex)&&(f=d,d=!1);else if(null===f){m="Mismatch";break}t=f.nextState,h=f.thenStack,c=f.syntaxStack,y=f.matchStack,v=f.tokenIndex,g=vv){for(;v":"<'"+t.name+"'>"));if(!1!==d&&null!==g&&"Type"===t.type)if("custom-ident"===t.name&&1===g.type||"length"===t.name&&"0"===g.value){null===d&&(d=o(t,f)),t=OO;break}c={syntax:t.syntax,opts:t.syntax.opts||null!==c&&c.opts||null,prev:c},y={type:2,syntax:t.syntax,token:y.token,prev:y},t=C.match;break;case"Keyword":var E=t.name;if(null!==g){var A=g.value;if(-1!==A.indexOf("\\")&&(A=A.replace(/\\[09].*$/,"")),_O(A,E)){u(),t=vO;break}}t=OO;break;case"AtKeyword":case"Function":if(null!==g&&_O(g.value,t.name)){u(),t=vO;break}t=OO;break;case"Token":if(null!==g&&g.value===t.value){u(),t=vO;break}t=OO;break;case"Comma":null!==g&&g.type===Um?QO(y.token)?t=OO:(u(),t=PO(g)?OO:vO):t=QO(y.token)||PO(g)?vO:OO;break;case"String":for(var _="",Q=v;Q=0}function WO(e){return Boolean(e)&&zO(e.offset)&&zO(e.line)&&zO(e.column)}function HO(e,t){return function(n,r){if(!n||n.constructor!==Object)return r(n,"Type of node should be an Object");for(var i in n){var o=!0;if(!1!==BO.call(n,i)){if("type"===i)n.type!==e&&r(n,"Wrong node type `"+n.type+"`, expected `"+e+"`");else if("loc"===i){if(null===n.loc)continue;if(n.loc&&n.loc.constructor===Object)if("string"!==typeof n.loc.source)i+=".source";else if(WO(n.loc.start)){if(WO(n.loc.end))continue;i+=".end"}else i+=".start";o=!1}else if(t.hasOwnProperty(i)){o=!1;for(var a=0;!o&&a");else{if(!Array.isArray(l))throw new Error("Wrong value `"+l+"` in `"+e+"."+o+"` structure definition");a.push("List")}}i[o]=a.join(" | ")}return{docs:i,check:HO(e,r)}}var XO=wO(Av.join(" | "));function GO(e,t,n){var r={};for(var i in e)e[i].syntax&&(r[i]=n?e[i].syntax:gv(e[i].syntax,{compact:t}));return r}function qO(e,t,n){for(var r={},i=0,o=Object.entries(e);i3&&void 0!==arguments[3]?arguments[3]:null,i={type:t,name:n},o={type:t,name:n,parent:r,serializable:"string"===typeof e||e&&"string"===typeof e.type,syntax:null,match:null};return"function"===typeof e?o.match=wO(e,i):("string"===typeof e?Object.defineProperty(o,"syntax",{get:function(){return Object.defineProperty(o,"syntax",{value:fO(e)}),o.syntax}}):o.syntax=e,Object.defineProperty(o,"match",{get:function(){return Object.defineProperty(o,"match",{value:wO(o.syntax,i)}),o.match}})),o}},{key:"addAtrule_",value:function(e,t){var n=this;t&&(this.atrules[e]={type:"Atrule",name:e,prelude:t.prelude?this.createDescriptor(t.prelude,"AtrulePrelude",e):null,descriptors:t.descriptors?Object.keys(t.descriptors).reduce((function(r,i){return r[i]=n.createDescriptor(t.descriptors[i],"AtruleDescriptor",i,e),r}),Object.create(null)):null})}},{key:"addProperty_",value:function(e,t){t&&(this.properties[e]=this.createDescriptor(t,"Property",e))}},{key:"addType_",value:function(e,t){t&&(this.types[e]=this.createDescriptor(t,"Type",e))}},{key:"checkAtruleName",value:function(e){if(!this.getAtrule(e))return new kv("Unknown at-rule","@"+e)}},{key:"checkAtrulePrelude",value:function(e,t){var n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e);return!r.prelude&&t?new SyntaxError("At-rule `@"+e+"` should not contain a prelude"):!r.prelude||t||YO(this,r.prelude,"",!1).matched?void 0:new SyntaxError("At-rule `@"+e+"` should contain a prelude")}},{key:"checkAtruleDescriptorName",value:function(e,t){var n=this.checkAtruleName(e);if(n)return n;var r=this.getAtrule(e),i=Sv(t);return r.descriptors?r.descriptors[i.name]||r.descriptors[i.basename]?void 0:new kv("Unknown at-rule descriptor",t):new SyntaxError("At-rule `@"+e+"` has no known descriptors")}},{key:"checkPropertyName",value:function(e){if(!this.getProperty(e))return new kv("Unknown property",e)}},{key:"matchAtrulePrelude",value:function(e,t){var n=this.checkAtrulePrelude(e,t);if(n)return VO(null,n);var r=this.getAtrule(e);return r.prelude?YO(this,r.prelude,t||"",!1):VO(null,null)}},{key:"matchAtruleDescriptor",value:function(e,t,n){var r=this.checkAtruleDescriptorName(e,t);if(r)return VO(null,r);var i=this.getAtrule(e),o=Sv(t);return YO(this,i.descriptors[o.name]||i.descriptors[o.basename],n,!1)}},{key:"matchDeclaration",value:function(e){return"Declaration"!==e.type?VO(null,new Error("Not a Declaration node")):this.matchProperty(e.property,e.value)}},{key:"matchProperty",value:function(e,t){if(wv(e).custom)return VO(null,new Error("Lexer matching doesn't applicable for custom properties"));var n=this.checkPropertyName(e);return n?VO(null,n):YO(this,this.getProperty(e),t,!0)}},{key:"matchType",value:function(e,t){var n=this.getType(e);return n?YO(this,n,t,!1):VO(null,new kv("Unknown type",e))}},{key:"match",value:function(e,t){return"string"===typeof e||e&&e.type?("string"!==typeof e&&e.match||(e=this.createDescriptor(e,"Type","anonymous")),YO(this,e,t,!1)):VO(null,new kv("Bad syntax"))}},{key:"findValueFragments",value:function(e,t,n,r){return jO(this,t,this.matchProperty(e,t),n,r)}},{key:"findDeclarationValueFragments",value:function(e,t,n){return jO(this,e.value,this.matchDeclaration(e),t,n)}},{key:"findAllFragments",value:function(e,t,n){var r=this,i=[];return this.syntax.walk(e,{visit:"Declaration",enter:function(e){i.push.apply(i,r.findDeclarationValueFragments(e,t,n))}}),i}},{key:"getAtrule",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Sv(e),r=n.vendor&&t?this.atrules[n.name]||this.atrules[n.basename]:this.atrules[n.name];return r||null}},{key:"getAtrulePrelude",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.getAtrule(e,t);return n&&n.prelude||null}},{key:"getAtruleDescriptor",value:function(e,t){return this.atrules.hasOwnProperty(e)&&this.atrules.declarators&&this.atrules[e].declarators[t]||null}},{key:"getProperty",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=wv(e),r=n.vendor&&t?this.properties[n.name]||this.properties[n.basename]:this.properties[n.name];return r||null}},{key:"getType",value:function(e){return hasOwnProperty.call(this.types,e)?this.types[e]:null}},{key:"validate",value:function(){function e(r,i,o,a){if(o.has(i))return o.get(i);o.set(i,!1),null!==a.syntax&&function(e,t,n){var r=dO,i=dO;if("function"===typeof t?r=t:t&&(r=pO(t.enter),i=pO(t.leave)),r===dO&&i===dO)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");!function e(t){switch(r.call(n,t),t.type){case"Group":t.terms.forEach(e);break;case"Multiplier":e(t.term);break;case"Type":case"Property":case"Keyword":case"AtKeyword":case"Function":case"String":case"Token":case"Comma":break;default:throw new Error("Unknown type: "+t.type)}i.call(n,t)}(e)}(a.syntax,(function(a){if("Type"===a.type||"Property"===a.type){var s="Type"===a.type?r.types:r.properties,u="Type"===a.type?t:n;hasOwnProperty.call(s,a.name)&&!e(r,a.name,u,s[a.name])||o.set(i,!0)}}),this)}var t=new Map,n=new Map;for(var r in this.types)e(this,r,t,this.types[r]);for(var i in this.properties)e(this,i,n,this.properties[i]);return t=(0,ze.Z)(t.keys()).filter((function(e){return t.get(e)})),n=(0,ze.Z)(n.keys()).filter((function(e){return n.get(e)})),t.length||n.length?{types:t,properties:n}:null}},{key:"dump",value:function(e,t){return{generic:this.generic,types:GO(this.types,!t,e),properties:GO(this.properties,!t,e),atrules:qO(this.atrules,!t,e)}}},{key:"toString",value:function(){return JSON.stringify(this.dump())}}]),e}(),JO=Object.prototype.hasOwnProperty,ey={generic:!0,types:iy,atrules:{prelude:oy,descriptors:oy},properties:iy,parseContext:function(e,t){return Object.assign(e,t)},scope:function e(t,n){for(var r in n)JO.call(n,r)&&(ty(t[r])?e(t[r],n[r]):t[r]=ny(n[r]));return t},atrule:["parse"],pseudo:["parse"],node:["name","structure","parse","generate","walkContext"]};function ty(e){return e&&e.constructor===Object}function ny(e){return ty(e)?(0,We.Z)({},e):e}function ry(e,t){return"string"===typeof t&&/^\s*\|/.test(t)?"string"===typeof e?e+t:t.replace(/^\s*\|\s*/,""):t||null}function iy(e,t){if("string"===typeof t)return ry(e,t);var n=(0,We.Z)({},e);for(var r in t)JO.call(t,r)&&(n[r]=ry(JO.call(e,r)?e[r]:void 0,t[r]));return n}function oy(e,t){var n=iy(e,t);return!ty(n)||Object.keys(n).length?n:null}function ay(e,t,n){for(var r in n)if(!1!==JO.call(n,r))if(!0===n[r])JO.call(t,r)&&(e[r]=ny(t[r]));else if(n[r])if("function"===typeof n[r]){var i=n[r];e[r]=i({},e[r]),e[r]=i(e[r]||{},t[r])}else if(ty(n[r])){var o={};for(var a in e[r])o[a]=ay({},e[r][a],n[r]);for(var s in t[r])o[s]=ay(o[s]||{},t[r][s],n[r]);e[r]=o}else if(Array.isArray(n[r])){for(var u={},l=n[r].reduce((function(e,t){return e[t]=!0,e}),{}),c=0,h=Object.entries(e[r]||{});c0&&this.skip(e),0===t&&(n=this.charCodeAt(this.tokenStart))!==ly&&n!==cy&&this.error("Number sign is expected"),py.call(this,0!==t),t===cy?"-"+this.consume(Zm):this.consume(Zm)}var vy="AnPlusB",Oy={a:[String,null],b:[String,null]};function yy(){var e=this.tokenStart,t=null,n=null;if(this.tokenType===Zm)py.call(this,false),n=this.consume(Zm);else if(1===this.tokenType&&this.cmpChar(this.tokenStart,cy))switch(t="-1",my.call(this,1,hy),this.tokenEnd-this.tokenStart){case 2:this.next(),n=gy.call(this);break;case 3:my.call(this,2,cy),this.next(),this.skipSC(),py.call(this,fy),n="-"+this.consume(Zm);break;default:my.call(this,2,cy),dy.call(this,3,fy),this.next(),n=this.substrToCursor(e+2)}else if(1===this.tokenType||this.isDelim(ly)&&1===this.lookupType(1)){var r=0;switch(t="1",this.isDelim(ly)&&(r=1,this.next()),my.call(this,0,hy),this.tokenEnd-this.tokenStart){case 1:this.next(),n=gy.call(this);break;case 2:my.call(this,1,cy),this.next(),this.skipSC(),py.call(this,fy),n="-"+this.consume(Zm);break;default:my.call(this,1,cy),dy.call(this,2,fy),this.next(),n=this.substrToCursor(e+r+1)}}else if(this.tokenType===jm){for(var i=this.charCodeAt(this.tokenStart),o=i===ly||i===cy,a=this.tokenStart+o;a=2&&42===this.charCodeAt(t-2)&&47===this.charCodeAt(t-1)&&(t-=2),{type:"Comment",loc:this.getLocation(e,this.tokenStart),value:this.substring(e+2,t)}}function vk(e){this.token(Jm,"/*"+e.value+"*/")}function Ok(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!0)}function yk(e){return this.Raw(e,this.consumeUntilExclamationMarkOrSemicolon,!1)}function kk(){var e=this.tokenIndex,t=this.Value();return"Raw"!==t.type&&!1===this.eof&&this.tokenType!==Hm&&!1===this.isDelim(33)&&!1===this.isBalanceEdge(e)&&this.error(),t}var bk="Declaration",Tk="declaration",xk={important:[Boolean,String],property:String,value:["Value","Raw"]};function Sk(){var e,t=this.tokenStart,n=this.tokenIndex,r=Ck.call(this),i=Cv(r),o=i?this.parseCustomProperty:this.parseValue,a=i?yk:Ok,s=!1;this.skipSC(),this.eat(Wm);var u=this.tokenIndex;if(i||this.skipSC(),e=o?this.parseWithFallback(kk,a):a.call(this,this.tokenIndex),i&&"Value"===e.type&&e.children.isEmpty)for(var l=u-this.tokenIndex;l<=0;l++)if(this.lookupType(l)===Bm){e.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}return this.isDelim(33)&&(s=Ek.call(this),this.skipSC()),!1===this.eof&&this.tokenType!==Hm&&!1===this.isBalanceEdge(n)&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:s,property:r,value:e}}function wk(e){this.token(1,e.property),this.token(Wm,":"),this.node(e.value),e.important&&(this.token(9,"!"),this.token(1,!0===e.important?"important":e.important))}function Ck(){var e=this.tokenStart;if(9===this.tokenType)switch(this.charCodeAt(this.tokenStart)){case 42:case 36:case 43:case 35:case 38:this.next();break;case 47:this.next(),this.isDelim(47)&&this.next()}return 4===this.tokenType?this.eat(4):this.eat(1),this.substrToCursor(e)}function Ek(){this.eat(9),this.skipSC();var e=this.consume(1);return"important"===e||e}function Ak(e){return this.Raw(e,this.consumeUntilSemicolonIncluded,!0)}var _k="DeclarationList",Qk={children:[["Declaration"]]};function Pk(){for(var e=this.createList();!this.eof;)switch(this.tokenType){case Bm:case Jm:case Hm:this.next();break;default:e.push(this.parseWithFallback(this.Declaration,Ak))}return{type:"DeclarationList",loc:this.getLocationFromList(e),children:e}}function Rk(e){var t=this;this.children(e,(function(e){"Declaration"===e.type&&t.token(Hm,";")}))}var Dk="Dimension",Nk={value:String,unit:String};function Ik(){var e=this.tokenStart,t=this.consumeNumber(jm);return{type:"Dimension",loc:this.getLocation(e,this.tokenStart),value:t,unit:this.substring(e+t.length,this.tokenStart)}}function Mk(e){this.token(jm,e.value+e.unit)}var Lk="Function",$k="function",Zk={name:String,children:[[]]};function Fk(e,t){var n,r=this.tokenStart,i=this.consumeFunctionName(),o=i.toLowerCase();return n=t.hasOwnProperty(o)?t[o].call(this,t):e.call(this,t),this.eof||this.eat(Vm),{type:"Function",loc:this.getLocation(r,this.tokenStart),name:i,children:n}}function jk(e){this.token(2,e.name+"("),this.children(e),this.token(Vm,")")}var Bk="XXX",zk="Hash",Wk={value:String};function Hk(){var e=this.tokenStart;return this.eat(4),{type:"Hash",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e+1)}}function Uk(e){this.token(4,"#"+e.value)}var Xk="Identifier",Gk={name:String};function qk(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(1)}}function Vk(e){this.token(1,e.name)}var Yk="IdSelector",Kk={name:String};function Jk(){var e=this.tokenStart;return this.eat(4),{type:"IdSelector",loc:this.getLocation(e,this.tokenStart),name:this.substrToCursor(e+1)}}function eb(e){this.token(9,"#"+e.name)}var tb="MediaFeature",nb={name:String,value:["Identifier","Number","Dimension","Ratio",null]};function rb(){var e,t=this.tokenStart,n=null;if(this.eat(qm),this.skipSC(),e=this.consume(1),this.skipSC(),this.tokenType!==Vm){switch(this.eat(Wm),this.skipSC(),this.tokenType){case Zm:n=9===this.lookupNonWSType(1)?this.Ratio():this.Number();break;case jm:n=this.Dimension();break;case 1:n=this.Identifier();break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eat(Vm),{type:"MediaFeature",loc:this.getLocation(t,this.tokenStart),name:e,value:n}}function ib(e){this.token(qm,"("),this.token(1,e.name),null!==e.value&&(this.token(Wm,":"),this.node(e.value)),this.token(Vm,")")}var ob="MediaQuery",ab={children:[["Identifier","MediaFeature","WhiteSpace"]]};function sb(){var e=this.createList(),t=null;this.skipSC();e:for(;!this.eof;){switch(this.tokenType){case Jm:case Bm:this.next();continue;case 1:t=this.Identifier();break;case qm:t=this.MediaFeature();break;default:break e}e.push(t)}return null===t&&this.error("Identifier or parenthesis is expected"),{type:"MediaQuery",loc:this.getLocationFromList(e),children:e}}function ub(e){this.children(e)}var lb="MediaQueryList",cb={children:[["MediaQuery"]]};function hb(){var e=this.createList();for(this.skipSC();!this.eof&&(e.push(this.MediaQuery()),this.tokenType===Um);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(e),children:e}}function fb(e){var t=this;this.children(e,(function(){return t.token(Um,",")}))}var db="Nth",pb={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function mb(){this.skipSC();var e,t=this.tokenStart,n=t,r=null;return e=this.lookupValue(0,"odd")||this.lookupValue(0,"even")?this.Identifier():this.AnPlusB(),n=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),r=this.SelectorList(),n=this.tokenStart),{type:"Nth",loc:this.getLocation(t,n),nth:e,selector:r}}function gb(e){this.node(e.nth),null!==e.selector&&(this.token(1,"of"),this.node(e.selector))}var vb="Number",Ob={value:String};function yb(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(Zm)}}function kb(e){this.token(Zm,e.value)}var bb="Operator",Tb={value:String};function xb(){var e=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function Sb(e){this.tokenize(e.value)}var wb="Parentheses",Cb={children:[[]]};function Eb(e,t){var n,r=this.tokenStart;return this.eat(qm),n=e.call(this,t),this.eof||this.eat(Vm),{type:"Parentheses",loc:this.getLocation(r,this.tokenStart),children:n}}function Ab(e){this.token(qm,"("),this.children(e),this.token(Vm,")")}var _b="Percentage",Qb={value:String};function Pb(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(Fm)}}function Rb(e){this.token(Fm,e.value+"%")}var Db="PseudoClassSelector",Nb="function",Ib={name:String,children:[["Raw"],null]};function Mb(){var e,t,n=this.tokenStart,r=null;return this.eat(Wm),2===this.tokenType?(t=(e=this.consumeFunctionName()).toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList()).push(this.Raw(this.tokenIndex,null,!1)),this.eat(Vm)):e=this.consume(1),{type:"PseudoClassSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function Lb(e){this.token(Wm,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(Vm,")"))}var $b="PseudoElementSelector",Zb="function",Fb={name:String,children:[["Raw"],null]};function jb(){var e,t,n=this.tokenStart,r=null;return this.eat(Wm),this.eat(Wm),2===this.tokenType?(t=(e=this.consumeFunctionName()).toLowerCase(),hasOwnProperty.call(this.pseudo,t)?(this.skipSC(),r=this.pseudo[t].call(this),this.skipSC()):(r=this.createList()).push(this.Raw(this.tokenIndex,null,!1)),this.eat(Vm)):e=this.consume(1),{type:"PseudoElementSelector",loc:this.getLocation(n,this.tokenStart),name:e,children:r}}function Bb(e){this.token(Wm,":"),this.token(Wm,":"),null===e.children?this.token(1,e.name):(this.token(2,e.name+"("),this.children(e),this.token(Vm,")"))}function zb(){this.skipSC();for(var e=this.consume(Zm),t=0;t0&&this.lookupType(-1)===Bm?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}var qb="Raw",Vb={value:String};function Yb(e,t,n){var r,i=this.getTokenStart(e);return this.skipUntilBalanced(e,t||this.consumeUntilBalanceEnd),r=n&&this.tokenStart>i?Gb.call(this):this.tokenStart,{type:"Raw",loc:this.getLocation(i,r),value:this.substring(i,r)}}function Kb(e){this.tokenize(e.value)}function Jb(e){return this.Raw(e,this.consumeUntilLeftCurlyBracket,!0)}function eT(){var e=this.SelectorList();return"Raw"!==e.type&&!1===this.eof&&this.tokenType!==Ym&&this.error(),e}var tT="Rule",nT="rule",rT={prelude:["SelectorList","Raw"],block:["Block"]};function iT(){var e,t,n=this.tokenIndex,r=this.tokenStart;return e=this.parseRulePrelude?this.parseWithFallback(eT,Jb):Jb.call(this,n),t=this.Block(!0),{type:"Rule",loc:this.getLocation(r,this.tokenStart),prelude:e,block:t}}function oT(e){this.node(e.prelude),this.node(e.block)}var aT="Selector",sT={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator","WhiteSpace"]]};function uT(){var e=this.readSequence(this.scope.Selector);return null===this.getFirstListNode(e)&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(e),children:e}}function lT(e){this.children(e)}var cT="SelectorList",hT="selector",fT={children:[["Selector","Raw"]]};function dT(){for(var e=this.createList();!this.eof&&(e.push(this.Selector()),this.tokenType===Um);)this.next();return{type:"SelectorList",loc:this.getLocationFromList(e),children:e}}function pT(e){var t=this;this.children(e,(function(){return t.token(Um,",")}))}function mT(e){for(var t=e.length,n=e.charCodeAt(0),r=34===n||39===n?1:0,i=1===r&&t>1&&e.charCodeAt(t-1)===n?t-2:t-1,o="",a=r;a<=i;a++){var s=e.charCodeAt(a);if(92===s){if(a===i){a!==t-1&&(o=e.substr(a+1));break}if(ug(92,s=e.charCodeAt(++a))){var u=a-1,l=Tg(e,u);a=l-1,o+=Cg(e.substring(u+1,l))}else 13===s&&10===e.charCodeAt(a+1)&&a++}else o+=e[a]}return o}var gT="String",vT={value:String};function OT(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:mT(this.consume(5))}}function yT(e){this.token(5,function(e,t){for(var n=t?"'":'"',r=t?39:34,i="",o=!1,a=0;a6&&this.error("Too many hex digits",r)}return this.next(),n}function RT(e){for(var t=0;this.isDelim(63);)++t>e&&this.error("Too many question marks"),this.next()}function DT(e){this.charCodeAt(this.tokenStart)!==e&&this.error((43===e?"Plus sign":"Hyphen minus")+" is expected")}function NT(){var e=0;switch(this.tokenType){case Zm:if(e=PT.call(this,1,!0),this.isDelim(63)){RT.call(this,6-e);break}if(this.tokenType===jm||this.tokenType===Zm){DT.call(this,45),PT.call(this,1,!1);break}break;case jm:(e=PT.call(this,1,!0))>0&&RT.call(this,6-e);break;default:if(this.eatDelim(43),1===this.tokenType){(e=PT.call(this,0,!0))>0&&RT.call(this,6-e);break}if(this.isDelim(63)){this.next(),RT.call(this,5);break}this.error("Hex digit or question mark is expected")}}var IT="UnicodeRange",MT={value:String};function LT(){var e=this.tokenStart;return this.eatIdent("u"),NT.call(this),{type:"UnicodeRange",loc:this.getLocation(e,this.tokenStart),value:this.substrToCursor(e)}}function $T(e){this.tokenize(e.value)}var ZT="Url",FT={value:String};function jT(){var e,t=this.tokenStart;switch(this.tokenType){case 7:e=function(e){for(var t=e.length,n=4,r=41===e.charCodeAt(t-1)?t-2:t-1,i="";n|","angle-percentage":"|","angular-color-hint":"","angular-color-stop":"&&?","angular-color-stop-list":"[ [, ]?]# , ","animateable-feature":"scroll-position|contents|",attachment:"scroll|fixed|local","attr()":"attr( ? [, ]? )","attr-matcher":"['~'|'|'|'^'|'$'|'*']? '='","attr-modifier":"i|s","attribute-selector":"'[' ']'|'[' [|] ? ']'","auto-repeat":"repeat( [auto-fill|auto-fit] , [? ]+ ? )","auto-track-list":"[? [|]]* ? [? [|]]* ?","baseline-position":"[first|last]? baseline","basic-shape":"||||","bg-image":"none|","bg-layer":"|| [/ ]?||||||||","bg-position":"[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]","bg-size":"[|auto]{1,2}|cover|contain","blur()":"blur( )","blend-mode":"normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity",box:"border-box|padding-box|content-box","brightness()":"brightness( )","calc()":"calc( )","calc-sum":" [['+'|'-'] ]*","calc-product":" ['*' |'/' ]*","calc-value":"|||( )","cf-final-image":"|","cf-mixing-image":"?&&","circle()":"circle( []? [at ]? )","clamp()":"clamp( #{3} )","class-selector":"'.' ","clip-source":"",color:"|||||||||currentcolor|","color-stop":"|","color-stop-angle":"{1,2}","color-stop-length":"{1,2}","color-stop-list":"[ [, ]?]# , ",combinator:"'>'|'+'|'~'|['||']","common-lig-values":"[common-ligatures|no-common-ligatures]","compat-auto":"searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button","composite-style":"clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor","compositing-operator":"add|subtract|intersect|exclude","compound-selector":"[? * [ *]*]!","compound-selector-list":"#","complex-selector":" [? ]*","complex-selector-list":"#","conic-gradient()":"conic-gradient( [from ]? [at ]? , )","contextual-alt-values":"[contextual|no-contextual]","content-distribution":"space-between|space-around|space-evenly|stretch","content-list":"[|contents||||||]+","content-position":"center|start|end|flex-start|flex-end","content-replacement":"","contrast()":"contrast( [] )",counter:"|","counter()":"counter(