comp-hub 0.1.13 → 0.1.15
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/dist/index.js +1 -1
- package/dist/website/dist/assets/{atom-one-dark-Bkn3VP4M.js → atom-one-dark-DBsRExYg.js} +1 -1
- package/dist/website/dist/assets/{index-Dq0blRri.css → index-BEUiJ6Cs.css} +1 -1
- package/dist/website/dist/assets/index-BQQlearB.js +1 -0
- package/dist/website/dist/assets/index-BdKocHcI.js +1 -0
- package/dist/website/dist/assets/index-C6FYKU0v.js +1 -0
- package/dist/website/dist/assets/index-C8LSpT-z.css +1 -0
- package/dist/website/dist/assets/index-CAuYBBI3.js +1 -0
- package/dist/website/dist/assets/index-CB7JXyjj.css +1 -0
- package/dist/website/dist/assets/{index-B_7h8RU-.js → index-CFekoWse.js} +37 -37
- package/dist/website/dist/assets/index-CczN5fLz.css +1 -0
- package/dist/website/dist/assets/index-CdUwR6qB.js +1 -0
- package/dist/website/dist/assets/index-CgH7YfTw.js +1 -0
- package/dist/website/dist/assets/index-D-vte0ne.js +10 -0
- package/dist/website/dist/assets/index-D1gqZaum.js +1 -0
- package/dist/website/dist/assets/index-DAmTCFk1.js +1 -0
- package/dist/website/dist/assets/{index-DF7AG7ST.js → index-DXLireuI.js} +1 -1
- package/dist/website/dist/assets/index-DctCZKbD.css +1 -0
- package/dist/website/dist/assets/index-Dg_jF_q0.js +1 -0
- package/dist/website/dist/assets/index-SBWV6_Eg.js +1 -0
- package/dist/website/dist/assets/index-T0ICpbUz.css +1 -0
- package/dist/website/dist/assets/{index-B1BP0nvv.js → index-VyWQu_En.js} +37 -27
- package/dist/website/dist/assets/{index-BW6kVljm.js → index-YeE3QOXJ.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-DfsCnqsS.js → index.vue_vue_type_script_setup_true_lang-BYF1Q35y.js} +1 -1
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-NjlsfCcn.js → index.vue_vue_type_script_setup_true_lang-D3QMZIzq.js} +1 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-Di0jkmxA.js +1 -0
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-DleQWiX2.js +1 -0
- package/dist/website/dist/assets/{index.vue_vue_type_script_setup_true_lang-CxwyQ8cG.js → index.vue_vue_type_script_setup_true_lang-Dpo8QS2d.js} +1 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-DzH2fNLq.js +1 -0
- package/dist/website/dist/assets/{index.vue_vue_type_style_index_0_lang-DZZ_0S9A.js → index.vue_vue_type_style_index_0_lang-BLRwStnI.js} +2 -2
- package/dist/website/dist/assets/{md5-Bj8dOOoI.js → md5-BHfO3cGC.js} +1 -1
- package/dist/website/dist/index.html +3 -2
- package/dist/website/dist/js/vue2-sfc-loader.js +1 -1
- package/dist/website/dist/js/vue3-sfc-loader.js +1 -1
- package/dist/website/dist/md/COMP_REPEAT.md +1 -1
- package/package.json +1 -1
- package/dist/website/dist/assets/index-6cwYvCpb.js +0 -1
- package/dist/website/dist/assets/index-BeyuLT3y.js +0 -1
- package/dist/website/dist/assets/index-Bhvb4p31.js +0 -1
- package/dist/website/dist/assets/index-Bjde2iaV.js +0 -1
- package/dist/website/dist/assets/index-BssohZIT.js +0 -1
- package/dist/website/dist/assets/index-C5tOMape.js +0 -1
- package/dist/website/dist/assets/index-CB8nyH-_.js +0 -1
- package/dist/website/dist/assets/index-CIBARELv.js +0 -1
- package/dist/website/dist/assets/index-CRFpFKvC.css +0 -1
- package/dist/website/dist/assets/index-CWDRcuvp.css +0 -1
- package/dist/website/dist/assets/index-Ck4C1E7S.css +0 -1
- package/dist/website/dist/assets/index-DLia3q8g.js +0 -1
- package/dist/website/dist/assets/index-Dm4jFJxt.js +0 -1
- package/dist/website/dist/assets/index-DwGS0Op7.js +0 -10
- package/dist/website/dist/assets/index-DzIqUKJQ.css +0 -1
- package/dist/website/dist/assets/index-DzrT0VOu.js +0 -1
- package/dist/website/dist/assets/index-Yu34eIW7.css +0 -1
- package/dist/website/dist/assets/index-dExr9we_.css +0 -1
- package/dist/website/dist/assets/index-yEA57PDq.js +0 -1
- package/dist/website/dist/assets/index.vue_vue_type_script_setup_true_lang-Huh-hfVs.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s}from"./index.vue_vue_type_style_index_0_lang-
|
|
1
|
+
import{_ as s}from"./index.vue_vue_type_style_index_0_lang-BLRwStnI.js";import{d as a,j as c,K as n,M as i,N as l,c as m,o as u,b as _}from"./index-CFekoWse.js";import"./atom-one-dark-DBsRExYg.js";const p={class:"md-container size-full w-[1300px] mx-auto overflow-auto"},v=a({__name:"index",setup(d){const r=n(),t=c(()=>{const{compPath:e,mdPath:o}=r.query;return!e||!o?"":`${e.replace(i.dirname,`${l}/`)}/${o.slice(1)}`});return(e,o)=>(u(),m("div",p,[_(s,{src:t.value,"show-toc":!0,scrollContainer:".md-container"},null,8,["src"])]))}});export{v as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as de,j as Te,bv as ie,al as Me,bw as Oe,d as Pe,bx as Ie,k as Fe,D as He,G as We,A as Ue,o as Ne,w as $e,aa as je,by as ze,a as Ke}from"./index-
|
|
1
|
+
import{h as de,j as Te,bv as ie,al as Me,bw as Oe,d as Pe,bx as Ie,k as Fe,D as He,G as We,A as Ue,o as Ne,w as $e,aa as je,by as ze,a as Ke}from"./index-CFekoWse.js";var Se={exports:{}},xe;function qe(){return xe||(xe=1,(function(Q,J){(function(Y,K){Q.exports=K()})(globalThis,(()=>(()=>{var Y={4567:function(d,s,o){var h=this&&this.__decorate||function(e,i,a,v){var p,m=arguments.length,u=m<3?i:v===null?v=Object.getOwnPropertyDescriptor(i,a):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(e,i,a,v);else for(var S=e.length-1;S>=0;S--)(p=e[S])&&(u=(m<3?p(u):m>3?p(i,a,u):p(i,a))||u);return m>3&&u&&Object.defineProperty(i,a,u),u},f=this&&this.__param||function(e,i){return function(a,v){i(a,v,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const n=o(9042),l=o(9924),_=o(844),g=o(4725),c=o(2585),t=o(3656);let r=s.AccessibilityManager=class extends _.Disposable{constructor(e,i,a,v){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=v,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let p=0;p<this._terminal.rows;p++)this._rowElements[p]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[p]);if(this._topBoundaryFocusListener=p=>this._handleBoundaryFocus(p,0),this._bottomBoundaryFocusListener=p=>this._handleBoundaryFocus(p,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new l.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((p=>this._handleResize(p.rows)))),this.register(this._terminal.onRender((p=>this._refreshRows(p.start,p.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((p=>this._handleChar(p)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
2
2
|
`)))),this.register(this._terminal.onA11yTab((p=>this._handleTab(p)))),this.register(this._terminal.onKey((p=>this._handleKey(p.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,t.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,_.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(e){for(let i=0;i<e;i++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,i){this._liveRegionDebouncer.refresh(e,i,this._terminal.rows)}_renderRows(e,i){const a=this._terminal.buffer,v=a.lines.length.toString();for(let p=e;p<=i;p++){const m=a.lines.get(a.ydisp+p),u=[],S=(m==null?void 0:m.translateToString(!0,void 0,void 0,u))||"",k=(a.ydisp+p+1).toString(),L=this._rowElements[p];L&&(S.length===0?(L.innerText=" ",this._rowColumns.set(L,[0,1])):(L.textContent=S,this._rowColumns.set(L,u)),L.setAttribute("aria-posinset",k),L.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,i){const a=e.target,v=this._rowElements[i===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(i===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==v)return;let p,m;if(i===0?(p=a,m=this._rowElements.pop(),this._rowContainer.removeChild(m)):(p=this._rowElements.shift(),m=a,this._rowContainer.removeChild(p)),p.removeEventListener("focus",this._topBoundaryFocusListener),m.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){const u=this._createAccessibilityTreeNode();this._rowElements.unshift(u),this._rowContainer.insertAdjacentElement("afterbegin",u)}else{const u=this._createAccessibilityTreeNode();this._rowElements.push(u),this._rowContainer.appendChild(u)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var S;if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let i={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((i.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||i.node===a.node&&i.offset>a.offset)&&([i,a]=[a,i]),i.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(i={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(i.node))return;const v=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(v)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:v,offset:((S=v.textContent)==null?void 0:S.length)??0}),!this._rowContainer.contains(a.node))return;const p=({node:k,offset:L})=>{const x=k instanceof Text?k.parentNode:k;let w=parseInt(x==null?void 0:x.getAttribute("aria-posinset"),10)-1;if(isNaN(w))return console.warn("row is invalid. Race condition?"),null;const B=this._rowColumns.get(x);if(!B)return console.warn("columns is null. Race condition?"),null;let M=L<B.length?B[L]:B.slice(-1)[0]+1;return M>=this._terminal.cols&&(++w,M=0),{row:w,column:M}},m=p(i),u=p(a);if(m&&u){if(m.row>u.row||m.row===u.row&&m.column>=u.column)throw new Error("invalid range");this._terminal.select(m.column,m.row,(u.row-m.row)*this._terminal.cols-m.column+u.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};s.AccessibilityManager=r=h([f(1,c.IInstantiationService),f(2,g.ICoreBrowserService),f(3,g.IRenderService)],r)},3614:(d,s)=>{function o(l){return l.replace(/\r?\n/g,"\r")}function h(l,_){return _?"\x1B[200~"+l+"\x1B[201~":l}function f(l,_,g,c){l=h(l=o(l),g.decPrivateModes.bracketedPasteMode&&c.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(l,!0),_.value=""}function n(l,_,g){const c=g.getBoundingClientRect(),t=l.clientX-c.left-10,r=l.clientY-c.top-10;_.style.width="20px",_.style.height="20px",_.style.left=`${t}px`,_.style.top=`${r}px`,_.style.zIndex="1000",_.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=o,s.bracketTextForPaste=h,s.copyHandler=function(l,_){l.clipboardData&&l.clipboardData.setData("text/plain",_.selectionText),l.preventDefault()},s.handlePasteEvent=function(l,_,g,c){l.stopPropagation(),l.clipboardData&&f(l.clipboardData.getData("text/plain"),_,g,c)},s.paste=f,s.moveTextAreaUnderMouseCursor=n,s.rightClickHandler=function(l,_,g,c,t){n(l,_,g),t&&c.rightClickSelect(l),_.value=c.selectionText,_.select()}},7239:(d,s,o)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const h=o(1505);s.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(f,n,l){this._css.set(f,n,l)}getCss(f,n){return this._css.get(f,n)}setColor(f,n,l){this._color.set(f,n,l)}getColor(f,n){return this._color.get(f,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(d,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(o,h,f,n){o.addEventListener(h,f,n);let l=!1;return{dispose:()=>{l||(l=!0,o.removeEventListener(h,f,n))}}}},3551:function(d,s,o){var h=this&&this.__decorate||function(r,e,i,a){var v,p=arguments.length,m=p<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,i):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(r,e,i,a);else for(var u=r.length-1;u>=0;u--)(v=r[u])&&(m=(p<3?v(m):p>3?v(e,i,m):v(e,i))||m);return p>3&&m&&Object.defineProperty(e,i,m),m},f=this&&this.__param||function(r,e){return function(i,a){e(i,a,r)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier=void 0;const n=o(3656),l=o(8460),_=o(844),g=o(2585),c=o(4725);let t=s.Linkifier=class extends _.Disposable{get currentLink(){return this._currentLink}constructor(r,e,i,a,v){super(),this._element=r,this._mouseService=e,this._renderService=i,this._bufferService=a,this._linkProviderService=v,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new l.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new l.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,_.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,_.toDisposable)((()=>{var p;this._lastMouseEvent=void 0,(p=this._activeProviderReplies)==null||p.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(r){this._lastMouseEvent=r;const e=this._positionFromMouseEvent(r,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const i=r.composedPath();for(let a=0;a<i.length;a++){const v=i[a];if(v.classList.contains("xterm"))break;if(v.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(r){if(this._activeLine!==r.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(r,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,r)||(this._clearCurrentLink(),this._askForLink(r,!0))}_askForLink(r,e){var a,v;this._activeProviderReplies&&e||((a=this._activeProviderReplies)==null||a.forEach((p=>{p==null||p.forEach((m=>{m.link.dispose&&m.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=r.y);let i=!1;for(const[p,m]of this._linkProviderService.linkProviders.entries())e?(v=this._activeProviderReplies)!=null&&v.get(p)&&(i=this._checkLinkProviderResult(p,r,i)):m.provideLinks(r.y,(u=>{var k,L;if(this._isMouseOut)return;const S=u==null?void 0:u.map((x=>({link:x})));(k=this._activeProviderReplies)==null||k.set(p,S),i=this._checkLinkProviderResult(p,r,i),((L=this._activeProviderReplies)==null?void 0:L.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(r.y,this._activeProviderReplies)}))}_removeIntersectingLinks(r,e){const i=new Set;for(let a=0;a<e.size;a++){const v=e.get(a);if(v)for(let p=0;p<v.length;p++){const m=v[p],u=m.link.range.start.y<r?0:m.link.range.start.x,S=m.link.range.end.y>r?this._bufferService.cols:m.link.range.end.x;for(let k=u;k<=S;k++){if(i.has(k)){v.splice(p--,1);break}i.add(k)}}}}_checkLinkProviderResult(r,e,i){var p;if(!this._activeProviderReplies)return i;const a=this._activeProviderReplies.get(r);let v=!1;for(let m=0;m<r;m++)this._activeProviderReplies.has(m)&&!this._activeProviderReplies.get(m)||(v=!0);if(!v&&a){const m=a.find((u=>this._linkAtPosition(u.link,e)));m&&(i=!0,this._handleNewLink(m))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let m=0;m<this._activeProviderReplies.size;m++){const u=(p=this._activeProviderReplies.get(m))==null?void 0:p.find((S=>this._linkAtPosition(S.link,e)));if(u){i=!0,this._handleNewLink(u);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(r){if(!this._currentLink)return;const e=this._positionFromMouseEvent(r,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(r,this._currentLink.link.text)}_clearCurrentLink(r,e){this._currentLink&&this._lastMouseEvent&&(!r||!e||this._currentLink.link.range.start.y>=r&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,_.disposeArray)(this._linkCacheDisposables))}_handleNewLink(r){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(r.link,e)&&(this._currentLink=r,this._currentLink.state={decorations:{underline:r.link.decorations===void 0||r.link.decorations.underline,pointerCursor:r.link.decorations===void 0||r.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,r.link,this._lastMouseEvent),r.link.decorations={},Object.defineProperties(r.link.decorations,{pointerCursor:{get:()=>{var i,a;return(a=(i=this._currentLink)==null?void 0:i.state)==null?void 0:a.decorations.pointerCursor},set:i=>{var a;(a=this._currentLink)!=null&&a.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>{var i,a;return(a=(i=this._currentLink)==null?void 0:i.state)==null?void 0:a.decorations.underline},set:i=>{var a,v,p;(a=this._currentLink)!=null&&a.state&&((p=(v=this._currentLink)==null?void 0:v.state)==null?void 0:p.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(r.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((i=>{if(!this._currentLink)return;const a=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=v&&(this._clearCurrentLink(a,v),this._lastMouseEvent)){const p=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);p&&this._askForLink(p,!1)}}))))}_linkHover(r,e,i){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&r.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(i,e.text)}_fireUnderlineEvent(r,e){const i=r.range,a=this._bufferService.buffer.ydisp,v=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-a-1,i.end.x,i.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(v)}_linkLeave(r,e,i){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&r.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(i,e.text)}_linkAtPosition(r,e){const i=r.range.start.y*this._bufferService.cols+r.range.start.x,a=r.range.end.y*this._bufferService.cols+r.range.end.x,v=e.y*this._bufferService.cols+e.x;return i<=v&&v<=a}_positionFromMouseEvent(r,e,i){const a=i.getCoords(r,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(r,e,i,a,v){return{x1:r,y1:e,x2:i,y2:a,cols:this._bufferService.cols,fg:v}}};s.Linkifier=t=h([f(1,c.IMouseService),f(2,c.IRenderService),f(3,g.IBufferService),f(4,c.ILinkProviderService)],t)},9042:(d,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(d,s,o){var h=this&&this.__decorate||function(c,t,r,e){var i,a=arguments.length,v=a<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,r):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(c,t,r,e);else for(var p=c.length-1;p>=0;p--)(i=c[p])&&(v=(a<3?i(v):a>3?i(t,r,v):i(t,r))||v);return a>3&&v&&Object.defineProperty(t,r,v),v},f=this&&this.__param||function(c,t){return function(r,e){t(r,e,c)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const n=o(511),l=o(2585);let _=s.OscLinkProvider=class{constructor(c,t,r){this._bufferService=c,this._optionsService=t,this._oscLinkService=r}provideLinks(c,t){var S;const r=this._bufferService.buffer.lines.get(c-1);if(!r)return void t(void 0);const e=[],i=this._optionsService.rawOptions.linkHandler,a=new n.CellData,v=r.getTrimmedLength();let p=-1,m=-1,u=!1;for(let k=0;k<v;k++)if(m!==-1||r.hasContent(k)){if(r.loadCell(k,a),a.hasExtendedAttrs()&&a.extended.urlId){if(m===-1){m=k,p=a.extended.urlId;continue}u=a.extended.urlId!==p}else m!==-1&&(u=!0);if(u||m!==-1&&k===v-1){const L=(S=this._oscLinkService.getLinkData(p))==null?void 0:S.uri;if(L){const x={start:{x:m+1,y:c},end:{x:k+(u||k!==v-1?0:1),y:c}};let w=!1;if(!(i!=null&&i.allowNonHttpProtocols))try{const B=new URL(L);["http:","https:"].includes(B.protocol)||(w=!0)}catch{w=!0}w||e.push({text:L,range:x,activate:(B,M)=>i?i.activate(B,M,x):g(0,M),hover:(B,M)=>{var I;return(I=i==null?void 0:i.hover)==null?void 0:I.call(i,B,M,x)},leave:(B,M)=>{var I;return(I=i==null?void 0:i.leave)==null?void 0:I.call(i,B,M,x)}})}u=!1,a.hasExtendedAttrs()&&a.extended.urlId?(m=k,p=a.extended.urlId):(m=-1,p=-1)}}t(e)}};function g(c,t){if(confirm(`Do you want to navigate to ${t}?
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o,h as s,ao as r}from"./index-
|
|
1
|
+
import{d as o,h as s,ao as r}from"./index-CFekoWse.js";const i=o({__name:"index",setup(l){const e=s(!1);function n(){e.value=!0}function a(){e.value=!1}return(t,u)=>r(t.$slots,"default",{instance:{start:n,end:a},loading:e.value})}});export{i as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as g,T as A,a as L}from"./index.vue_vue_type_script_setup_true_lang-DleQWiX2.js";import{h as k,a0 as P,a1 as M,d as x,i as N,a2 as S,A as f,o as m,r as u,a3 as I,w as r,b as n,a4 as h,f as C,a5 as v,k as b,a6 as z,c as E,F as D,a7 as O,u as V,t as $,R as G,a8 as B,a9 as q,n as K,a as R}from"./index-CFekoWse.js";function T(){const _=k(!0);return P(()=>{_.value=!0}),M(()=>{_.value=!1}),_}const j=x({__name:"index",setup(_){const t=N({keyword:""}),s=v("compListStore"),l=T(),i=()=>{s.setQuery({...s.query,keyword:t.keyword})},a=()=>{t.keyword="",s.setQuery({...s.query,keyword:""})};return S(()=>s.query.keyword,(c,e)=>{c!==e&&l.value&&s.getCompList()}),(c,e)=>{const o=u("el-input"),p=u("el-form-item"),d=u("el-button"),y=u("el-form");return m(),f(y,{inline:!0,model:t,"label-width":"auto",onSubmit:e[1]||(e[1]=I(()=>{},["prevent"]))},{default:r(()=>[n(p,{label:"关键词:"},{default:r(()=>[n(o,{modelValue:t.keyword,"onUpdate:modelValue":e[0]||(e[0]=w=>t.keyword=w),modelModifiers:{trim:!0},placeholder:"组件名/组件描述",onKeyup:h(i,["enter"])},null,8,["modelValue"])]),_:1}),n(p,null,{default:r(()=>[n(d,{type:"primary",onClick:i},{default:r(()=>[...e[2]||(e[2]=[C("查询",-1)])]),_:1}),n(d,{type:"primary",onClick:a},{default:r(()=>[...e[3]||(e[3]=[C("重置",-1)])]),_:1})]),_:1})]),_:1},8,["model"])}}}),F={class:"flex justify-start mb-[5px]"},Q=x({__name:"index",setup(_){const t=v("compListStore"),s=T();function l(a){return a.value===t.selectTag}const i=a=>{t.setSelectTag(a.value)};return S(()=>t.selectTag,(a,c)=>{!a||a===c||s.value&&t.getCompList()}),b(()=>{t.selectTag&&z(t.selectTag)}),(a,c)=>{const e=u("el-button");return m(),E("div",F,[(m(!0),E(D,null,O(V(t).tagGroup,o=>(m(),f(e,{type:l(o)?"primary":"default",text:"",key:o.label,value:o.value,onClick:p=>i(o)},{default:r(()=>[C($(o.label),1)]),_:2},1032,["type","value","onClick"]))),128))])}}}),U={class:"bg-[#fff] rounded-sm p-[10px]"},Y=x({__name:"index",setup(_){const t=v("callbacks"),s=v("compListStore"),l=k(0),i=k("");function a(){l.value=0}async function c(e){return await s.getCompDetail(e||"")}return b(()=>{const e=l.value;e&&q(e.toString())}),t.set(G.OPEN_COMP_TERMINAL,e=>{const o=Number(B());l.value=Math.max(o,500),i.value=e}),(e,o)=>{const p=u("el-splitter-panel"),d=u("el-splitter");return m(),f(d,null,{default:r(()=>[n(p,{min:400,class:"h-full min-w-[400px] flex flex-col gap-[10px]"},{default:r(()=>[R("div",U,[n(j),n(Q)]),n(g,{class:"flex-1"})]),_:1}),l.value?(m(),f(p,{key:0,size:l.value,"onUpdate:size":o[0]||(o[0]=y=>l.value=y),collapsible:""},{default:r(()=>[n(L,{title:"依赖安装",onClose:a},{default:r(()=>[n(A,{compId:i.value,getCompDetail:c},null,8,["compId"])]),_:1})]),_:1},8,["size"])):K("",!0)]),_:1})}}});export{Y as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as A,r as D,c as x,o as v,b as g,aw as Ee,w as C,x as ae,h as w,A as I,U as de,F as H,a7 as G,f as Z,t as M,aG as se,u as T,k as pe,ax as fe,a as y,j as E,aa as Ie,n as B,D as me,b0 as Me,b1 as ze,b2 as Le,a5 as ce,T as Pe,p as Re,av as Ae,a2 as K,X as Fe,Y as Ne,b3 as je,E as Q,aZ as W,R as oe,af as le,a_ as be,b4 as Be,b5 as Ve,a$ as Ue,b6 as We,b7 as He,b8 as Ge,aR as ke,b9 as Ye,ba as k,bb as ee,i as ue,a1 as Xe,a0 as qe,aq as Ze,ar as Ke,bc as Je,bd as Qe,be as et,bf as xe,bg as tt,bh as nt,ao as ot}from"./index-CFekoWse.js";import{a as lt,d as st,_ as at,c as rt,G as it}from"./index-VyWQu_En.js";import{_ as ct}from"./index.vue_vue_type_script_setup_true_lang-Dpo8QS2d.js";import{_ as ut}from"./index.vue_vue_type_script_setup_true_lang-BYF1Q35y.js";const dt={class:"collect"},pt=A({__name:"index",props:{isCollect:{type:Boolean,default:!1}},emits:["collect"],setup(t,{emit:o}){const n=t,e=o;function r(){e("collect",!n.isCollect)}return(d,u)=>{const l=D("StarFilled"),s=D("el-icon");return v(),x("div",dt,[g(s,{class:Ee(["collect-icon",{"is-collect":t.isCollect}]),onClick:r},{default:C(()=>[g(l)]),_:1},8,["class"])])}}}),ft=ae(pt,[["__scopeId","data-v-25eb2692"]]),mt=A({__name:"index",setup(t,{expose:o}){const n=w(!1),e=w(null),r=l=>{n.value=!0,e.value=l},d=()=>{n.value=!1,e.value=null},u=l=>{e.value&&e.value(l)};return o({open:r,close:d}),(l,s)=>(v(),I(ct,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i),title:"项目文件夹",width:"50%","show-close":""},{default:C(()=>[g(lt,{onSelect:u})]),_:1},8,["modelValue"]))}}),Ce=A({__name:"index",props:{title:{type:String,default:""},column:{type:Number,default:3},items:{type:Array,default:()=>[]}},setup(t){const o=de();return(n,e)=>{const r=D("el-descriptions-item"),d=D("el-descriptions");return v(),I(d,se({column:t.column,title:t.title},T(o)),{default:C(()=>[(v(!0),x(H,null,G(t.items,(u,l)=>(v(),I(r,{key:l,label:u.label},{default:C(()=>[Z(M(u.value),1)]),_:2},1032,["label"]))),128))]),_:1},16,["column","title"])}}}),vt={class:"comp-desc-container"},_t=A({__name:"index",props:{desc:{type:String,default:""}},setup(t){const o=w(null),n=w(!1),e=t;return pe(async()=>{if(e.desc){await fe();const r=o.value;if(!r)return;n.value=r.scrollHeight>r.clientHeight}}),(r,d)=>{const u=D("el-popover");return v(),x("div",vt,[g(u,{disabled:!n.value,content:t.desc,placement:"bottom",width:"300","show-after":1e3},{reference:C(()=>[y("p",{ref_key:"paraRef",ref:o},M(t.desc),513)]),_:1},8,["disabled","content"])])}}}),ht=ae(_t,[["__scopeId","data-v-9e567a05"]]),gt={key:0,class:"size-full flex items-center gap-[5px] overflow-hidden whitespace-nowrap"},yt={key:0,class:"shrink-0 text-xs text-gray-400 ml-1"},bt={class:"absolute pointer-events-none opacity-0 -z-50 flex gap-1"},xt=5,Ct=70,Te=A({__name:"index",props:{compDeps:{}},setup(t){const o=t,n=w(0),e=w([]);function r(i){n.value=i[0].contentRect.width}function d(i){!i||i instanceof Element||fe().then(()=>{const c=i.$el||i;e.value.push(c.offsetWidth)})}const u=E(()=>{let i=0,c=0;const f=n.value-Ct;for(let p=0;p<e.value.length&&(i+=e.value[p]+(p?xt:0),!(i>f));p++)c++;return Math.max(0,c)}),l=E(()=>o.compDeps.slice(0,u.value)),s=E(()=>o.compDeps.length-u.value);return(i,c)=>{const f=D("el-tag");return v(),I(Ie,{resize:r},{default:C(()=>[i.compDeps.length?(v(),x("div",gt,[(v(!0),x(H,null,G(l.value,p=>(v(),I(f,{key:p.name,type:"success"},{default:C(()=>[Z(M(p.name)+" "+M(p.version),1)]),_:2},1024))),128)),s.value>0?(v(),x("span",yt,"+"+M(s.value)+" more",1)):B("",!0)])):B("",!0),y("div",bt,[(v(!0),x(H,null,G(i.compDeps,p=>(v(),I(f,{key:"m-"+p.name,type:"success",ref_for:!0,ref:d},{default:C(()=>[Z(M(p.name)+" "+M(p.version),1)]),_:2},1024))),128))])]),_:1})}}}),wt={class:"w-[100px]"},St=A({__name:"index",props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(t,{emit:o}){const n=o,e=de(),r=w([]);async function d(){const s=await Me({compName:e.name});r.value=s.data.map(i=>({value:i.version,label:i.version}))}function u(s){console.log("切换版本号",s),n("update:modelValue",s)}function l(){r.value=[{value:e.version,label:e.version}],n("update:modelValue",e.version)}return me(()=>{l()}),(s,i)=>{const c=D("el-option"),f=D("el-select");return v(),x("div",wt,[g(f,{"model-value":t.modelValue,onChange:u,onVisibleChange:d},{default:C(()=>[(v(!0),x(H,null,G(r.value,p=>(v(),I(c,{key:p.value,label:p.label,value:p.value},null,8,["label","value"]))),128))]),_:1},8,["model-value"])])}}}),Et={class:"flex justify-center items-center gap-[5px]"},kt={class:"text-[12px] text-[#857e7e]"},Tt=A({__name:"index",props:{nickname:{type:String,default:""},avatar:{type:String,default:""}},setup(t){const o=t,n=w(Le);return pe(async()=>{if(!o.avatar)return;const e=await ze({objectId:o.avatar});n.value=e.data.signUrl}),(e,r)=>{const d=D("el-avatar");return v(),x("div",Et,[y("span",kt,M(t.nickname),1),g(d,{size:15,src:n.value},null,8,["src"])])}}}),Dt=ae(Tt,[["__scopeId","data-v-911677f5"]]),Ot={class:"bg-[#fff] flex items-center justify-center flex-col size-full overflow-hidden"},$t={class:"h-[270px] overflow-hidden w-full"},It={class:"flex flex-1 justify-start gap-[5px]"},Mt={class:"text-left flex-1 flex flex-col w-full overflow-hidden p-[5px] gap-[5px]"},zt={class:"flex justify-between"},Lt={class:"font-medium"},Pt={class:"desc-content flex-1"},Rt={class:"h-[30px] p-[5px] overflow-hidden w-full flex items-center justify-between"},At={class:"flex gap-[5px]"},Ft={class:"flex"},Nt=A({__name:"index",setup(t){const o=ce("compListStore"),n=ce("callbacks"),e=de(),r=Pe(),d=Re(),u=w(),l=w([{key:"delete",text:"删除",handler:P,type:"danger"},{key:"update",text:"更新",handler:N,type:"primary"},{key:"preview",text:"预览",handler:Y,type:"primary"},{key:"download",text:"下载",handler:R,type:"primary"},{key:"collect",text:"收藏",handler:z}]),s=w(""),i=w([]),c=E(()=>o.operate.length?o.operate.map(a=>l.value.find(m=>m.key===a)):[]),f=E(()=>o.operate.includes("terminal")),p=E(()=>e.previewConfigs.filter(a=>{var m;return(m=a.path)==null?void 0:m.length}).slice(0,3).map(a=>{const m=a.path[a.path.length-1].replace(/[/\\]/g,"/"),_=i.value.find(O=>O.path===m);return{entryUrl:_==null?void 0:_.signedUrl}})),b=E(()=>[{label:"下载:",value:e.downloadCount},{label:"收藏:",value:e.collectCount}]),S=E(()=>Object.keys(e.dep).map(m=>{var _,O;return{name:m,version:(O=(_=e.dep)==null?void 0:_[m])==null?void 0:O.version}})),L=E(()=>({panelType:Ae.MINI,previews:p.value,dep:e.dep,bgColor:e.bgColor,signedUrls:i.value,onePageEntryNameToFile:o.onePageEntryNameToFile}));async function P(){!e.name||await le.confirm(W.CONFIRM.DELETE(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm"||Be({compId:e.id}).then(()=>Q.success(W.SUCCESS.DELETE)).finally(()=>n.get(oe.AFTER_COMP_DEL)(e.id))}function N(){e.id&&Ve({compId:e.id}).then(a=>{if(!a.data){Q.error("组件不在本地,请先下载后更新");return}r.setSelectedFolder(a.data),n.get(oe.BEFORE_COMP_GO_UPDATE)(e.id)})}function Y(){console.log("预览"),d.push({path:`/preview/${e.id}`})}async function R(a){var _;!a()||await le.confirm("当前选择的版本为:"+s.value+",确认下载吗?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).catch(()=>{console.log("取消下载")})!=="confirm"||(_=u.value)==null||_.open(J)}async function z(a){a()&&(console.log("收藏"),je({compId:e.id,isCollect:!e.isCollect}).then(()=>{Q.success(e.isCollect?W.SUCCESS.UNCOLLECT:W.SUCCESS.COLLECT);const m={...e,isCollect:!e.isCollect};e.isCollect?(o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount-1}),n.get(oe.AFTER_COMP_CANCEL_COLLECT)(e.id)):o.updateCompListItemById(e.id,{...m,collectCount:e.collectCount+1})}))}async function J(a){var h;if(await le.confirm(W.CONFIRM.DOWNLOAD(a.path),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;const _=await be({compId:e.id,savePath:a.path,compName:e.name,version:s.value}),{isRepeat:O=!1}=_.data;if(O){if(await le.confirm(W.CONFIRM.COVER(e.name),"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"})!=="confirm")return;await be({compId:e.id,savePath:a.path,compName:e.name,isCover:!0,version:s.value})}Q.success(W.SUCCESS.DOWNLOAD),o.updateCompListItemById(e.id,{...e,downloadCount:e.downloadCount+1}),(h=u.value)==null||h.close()}async function ie(){const a={objectId:e.objectId,compName:e.name,version:e.version,files:e.files.map(m=>m.path)};await Ue(a).then(m=>{i.value=m.data.signedUrls})}async function X(a){await We({compName:e.name,version:a}).then(m=>{o.updateCompListItemById(e.id,{...m.data,id:e.id,downloadCount:e.downloadCount,collectCount:e.collectCount,isCollect:e.isCollect})})}function ne(){n.get(oe.OPEN_COMP_TERMINAL)(e.id)}return K(()=>e.version,async(a,m)=>{a!==m&&(i.value=[],await ie())},{immediate:!0,deep:!0}),K(()=>s.value,async a=>{a!==e.version&&await X(a)}),(a,m)=>{const _=D("el-button"),O=D("el-divider");return v(),x("div",Ot,[y("div",$t,[g(st,se(L.value,{autoplay:""}),{compToolBar:C(()=>[y("div",It,[f.value?(v(),I(_,{key:0,color:"#414141",onClick:ne},{default:C(()=>[...m[1]||(m[1]=[Z("终端",-1)])]),_:1})):B("",!0),g(St,se({modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=h=>s.value=h)},T(e)),null,16,["modelValue"])])]),_:1},16)]),y("div",Mt,[y("div",zt,[y("h4",Lt,M(T(e).name),1),y("div",null,[g(Dt,Fe(Ne(T(e).authorId)),null,16)])]),y("div",Pt,[g(ht,{desc:T(e).desc},null,8,["desc"])]),g(Te,{compDeps:S.value},null,8,["compDeps"])]),g(O,{style:{margin:"3px"}}),y("div",Rt,[y("div",At,[g(Ce,{column:1,items:[b.value[0]]},null,8,["items"]),g(Ce,{column:1,items:[b.value[1]]},null,8,["items"])]),y("div",Ft,[(v(!0),x(H,null,G(c.value,(h,V)=>(v(),I(at,{key:V},{default:C(({isLogin:$})=>[(h==null?void 0:h.key)!=="collect"?(v(),I(_,{key:0,title:h==null?void 0:h.text,type:h==null?void 0:h.type,link:"",onClick:F=>h==null?void 0:h.handler($)},{default:C(()=>[Z(M(h==null?void 0:h.text),1)]),_:2},1032,["title","type","onClick"])):(v(),I(ft,{key:1,class:"pl-[5px]",isCollect:T(e).isCollect,onCollect:F=>z($)},null,8,["isCollect","onCollect"]))]),_:2},1024))),128))])]),g(mt,{ref_key:"DialogVueFinderRef",ref:u,onDownload:J},null,512)])}}});function ve(t){return He()?(Ge(t),!0):!1}const jt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const De=t=>t!=null,Bt=Object.prototype.toString,Vt=t=>Bt.call(t)==="[object Object]",j=()=>{};function Oe(t,o){function n(...e){return new Promise((r,d)=>{Promise.resolve(t(()=>o.apply(this,e),{fn:o,thisArg:this,args:e})).then(r).catch(d)})}return n}function Ut(t,o={}){let n,e,r=j;const d=s=>{clearTimeout(s),r(),r=j};let u;return s=>{const i=k(t),c=k(o.maxWait);return n&&d(n),i<=0||c!==void 0&&c<=0?(e&&(d(e),e=void 0),Promise.resolve(s())):new Promise((f,p)=>{r=o.rejectOnCancel?p:f,u=s,c&&!e&&(e=setTimeout(()=>{n&&d(n),e=void 0,f(u())},c)),n=setTimeout(()=>{e&&d(e),e=void 0,f(s())},i)})}}function Wt(...t){let o=0,n,e=!0,r=j,d,u,l,s,i;!Ye(t[0])&&typeof t[0]=="object"?{delay:u,trailing:l=!0,leading:s=!0,rejectOnCancel:i=!1}=t[0]:[u,l=!0,s=!0,i=!1]=t;const c=()=>{n&&(clearTimeout(n),n=void 0,r(),r=j)};return p=>{const b=k(u),S=Date.now()-o,L=()=>d=p();return c(),b<=0?(o=Date.now(),L()):(S>b&&(s||!e)?(o=Date.now(),L()):l&&(d=new Promise((P,N)=>{r=i?N:P,n=setTimeout(()=>{o=Date.now(),e=!0,P(L()),c()},Math.max(0,b-S))})),!s&&!n&&(n=setTimeout(()=>e=!0,b)),e=!1,d)}}function te(t){return Array.isArray(t)?t:[t]}function Ht(t){return ke()}function Gt(t,o=200,n={}){return Oe(Ut(o,n),t)}function Yt(t,o=200,n=!1,e=!0,r=!1){return Oe(Wt(o,n,e,r),t)}function Xt(t,o=!0,n){Ht()?me(t,n):o?t():fe(t)}function qt(t,o,n){return K(t,o,{...n,immediate:!0})}const re=jt?window:void 0;function q(t){var o;const n=k(t);return(o=n==null?void 0:n.$el)!=null?o:n}function we(...t){const o=[],n=()=>{o.forEach(l=>l()),o.length=0},e=(l,s,i,c)=>(l.addEventListener(s,i,c),()=>l.removeEventListener(s,i,c)),r=E(()=>{const l=te(k(t[0])).filter(s=>s!=null);return l.every(s=>typeof s!="string")?l:void 0}),d=qt(()=>{var l,s;return[(s=(l=r.value)==null?void 0:l.map(i=>q(i)))!=null?s:[re].filter(i=>i!=null),te(k(r.value?t[1]:t[0])),te(T(r.value?t[2]:t[1])),k(r.value?t[3]:t[2])]},([l,s,i,c])=>{if(n(),!(l!=null&&l.length)||!(s!=null&&s.length)||!(i!=null&&i.length))return;const f=Vt(c)?{...c}:c;o.push(...l.flatMap(p=>s.flatMap(b=>i.map(S=>e(p,b,S,f)))))},{flush:"post"}),u=()=>{d(),n()};return ve(n),u}function Zt(){const t=ee(!1),o=ke();return o&&me(()=>{t.value=!0},o),t}function $e(t){const o=Zt();return E(()=>(o.value,!!t()))}function Kt(t,o,n={}){const{window:e=re,...r}=n;let d;const u=$e(()=>e&&"MutationObserver"in e),l=()=>{d&&(d.disconnect(),d=void 0)},s=E(()=>{const p=k(t),b=te(p).map(q).filter(De);return new Set(b)}),i=K(s,p=>{l(),u.value&&p.size&&(d=new MutationObserver(o),p.forEach(b=>d.observe(b,r)))},{immediate:!0,flush:"post"}),c=()=>d==null?void 0:d.takeRecords(),f=()=>{i(),l()};return ve(f),{isSupported:u,stop:f,takeRecords:c}}function _n(t,o,n={}){const{root:e,rootMargin:r="0px",threshold:d=0,window:u=re,immediate:l=!0}=n,s=$e(()=>u&&"IntersectionObserver"in u),i=E(()=>{const S=k(t);return te(S).map(q).filter(De)});let c=j;const f=ee(l),p=s.value?K(()=>[i.value,q(e),f.value],([S,L])=>{if(c(),!f.value||!S.length)return;const P=new IntersectionObserver(o,{root:q(L),rootMargin:r,threshold:d});S.forEach(N=>N&&P.observe(N)),c=()=>{P.disconnect(),c=j}},{immediate:l,flush:"post"}):j,b=()=>{c(),p(),f.value=!1};return ve(b),{isSupported:s,isActive:f,pause(){c(),f.value=!1},resume(){f.value=!0},stop:b}}const Se=1;function Jt(t,o={}){const{throttle:n=0,idle:e=200,onStop:r=j,onScroll:d=j,offset:u={left:0,right:0,top:0,bottom:0},observe:l={mutation:!1},eventListenerOptions:s={capture:!1,passive:!0},behavior:i="auto",window:c=re,onError:f=a=>{console.error(a)}}=o,p=typeof l=="boolean"?{mutation:l}:l,b=ee(0),S=ee(0),L=E({get(){return b.value},set(a){N(a,void 0)}}),P=E({get(){return S.value},set(a){N(void 0,a)}});function N(a,m){var _,O,h,V;if(!c)return;const $=k(t);if(!$)return;(h=$ instanceof Document?c.document.body:$)==null||h.scrollTo({top:(_=k(m))!=null?_:P.value,left:(O=k(a))!=null?O:L.value,behavior:k(i)});const F=((V=$==null?void 0:$.document)==null?void 0:V.documentElement)||($==null?void 0:$.documentElement)||$;L!=null&&(b.value=F.scrollLeft),P!=null&&(S.value=F.scrollTop)}const Y=ee(!1),R=ue({left:!0,right:!1,top:!0,bottom:!1}),z=ue({left:!1,right:!1,top:!1,bottom:!1}),J=a=>{Y.value&&(Y.value=!1,z.left=!1,z.right=!1,z.top=!1,z.bottom=!1,r(a))},ie=Gt(J,n+e),X=a=>{var m;if(!c)return;const _=((m=a==null?void 0:a.document)==null?void 0:m.documentElement)||(a==null?void 0:a.documentElement)||q(a),{display:O,flexDirection:h,direction:V}=getComputedStyle(_),$=V==="rtl"?-1:1,F=_.scrollLeft;z.left=F<b.value,z.right=F>b.value;const _e=Math.abs(F*$)<=(u.left||0),he=Math.abs(F*$)+_.clientWidth>=_.scrollWidth-(u.right||0)-Se;O==="flex"&&h==="row-reverse"?(R.left=he,R.right=_e):(R.left=_e,R.right=he),b.value=F;let U=_.scrollTop;a===c.document&&!U&&(U=c.document.body.scrollTop),z.top=U<S.value,z.bottom=U>S.value;const ge=Math.abs(U)<=(u.top||0),ye=Math.abs(U)+_.clientHeight>=_.scrollHeight-(u.bottom||0)-Se;O==="flex"&&h==="column-reverse"?(R.top=ye,R.bottom=ge):(R.top=ge,R.bottom=ye),S.value=U},ne=a=>{var m;if(!c)return;const _=(m=a.target.documentElement)!=null?m:a.target;X(_),Y.value=!0,ie(a),d(a)};return we(t,"scroll",n?Yt(ne,n,!0,!1):ne,s),Xt(()=>{try{const a=k(t);if(!a)return;X(a)}catch(a){f(a)}}),p!=null&&p.mutation&&t!=null&&t!==c&&t!==document&&Kt(t,()=>{const a=k(t);a&&X(a)},{attributes:!0,childList:!0,subtree:!0}),we(t,"scrollend",J,s),{x:L,y:P,isScrolling:Y,arrivedState:R,directions:z,measure(){const a=k(t);c&&a&&X(a)}}}function Qt(t){const o=w(0),n=typeof t=="string"?w(document.querySelector(t)):t,{y:e}=Jt(n,{behavior:"auto"});return Xe(()=>{o.value=T(e)??0}),qe(async()=>{setTimeout(()=>{e.value=o.value},0)}),{memoryY:o}}const en={class:"h-full flex flex-col overflow-hidden gap-[10px]"},tn={key:0,class:"flex justify-center p-[5px]"},hn=A({__name:"index",props:{isPagination:{type:Boolean,default:!0}},setup(t){const o=w(null);Qt(o);const n=ce("compListStore"),e=E(()=>n.loading),r=ue({total:n.pagination.total,background:!0,layout:"total, sizes, prev, pager, next, jumper",pageSizes:[10,20,30],page:n.pagination.page,pageSize:n.pagination.pageSize});function d(l){Je(l.toString()),n.setPagination({...n.pagination,pageSize:l})}function u(l){n.setPagination({...n.pagination,page:l})}return K([()=>n.pagination.pageSize,()=>n.pagination.page],async()=>{await n.getComps()}),(l,s)=>{const i=D("el-pagination"),c=Ke("loading");return Ze((v(),x("div",en,[y("div",{class:"flex-1 overflow-auto",ref_key:"compListEl",ref:o},[g(rt,{isEmpty:T(n).list.length===0&&!e.value},{default:C(()=>[g(it,{itemMinWidth:310},{default:C(()=>[(v(!0),x(H,null,G(T(n).list,f=>(v(),x("div",{key:f.id,class:"h-[400px] overflow-hidden rounded-md"},[g(Nt,se({ref_for:!0},f),null,16)]))),128))]),_:1})]),_:1},8,["isEmpty"])],512),t.isPagination?(v(),x("div",tn,[g(i,{"current-page":r.page,"onUpdate:currentPage":s[0]||(s[0]=f=>r.page=f),"page-size":r.pageSize,"onUpdate:pageSize":s[1]||(s[1]=f=>r.pageSize=f),"page-sizes":r.pageSizes,background:r.background,layout:r.layout,total:T(n).pagination.total,onSizeChange:d,onCurrentChange:u},null,8,["current-page","page-size","page-sizes","background","layout","total"])])):B("",!0)])),[[c,e.value]])}}}),nn={class:"terminal-pane-container"},on={class:"deps-content"},ln={class:"comp-name"},sn={class:"cli-list"},an=A({__name:"index",props:{compId:{},getCompDetail:{type:Function}},setup(t){const o=t,n=w(),e=E(()=>n.value?Object.keys(n.value.dep).map(l=>{var s,i,c;return{name:l,version:(c=(i=(s=n.value)==null?void 0:s.dep)==null?void 0:i[l])==null?void 0:c.version}}):[]),r=(u,l)=>`npm install ${u}@${l}`,d=async u=>{const l=await Qe(r(u.name,u.version));l&&Q.success(l)};return pe(async()=>{const u=await o.getCompDetail(o.compId);u&&(n.value=u)}),(u,l)=>{const s=D("el-button"),i=D("el-splitter-panel"),c=D("el-splitter");return v(),x("div",nn,[g(c,{layout:"vertical"},{default:C(()=>[g(i,{size:"30%",min:200},{default:C(()=>{var f;return[y("div",on,[y("h4",null,[y("span",ln,M((f=n.value)==null?void 0:f.name),1)]),y("div",null,[g(Te,{compDeps:e.value},null,8,["compDeps"])]),l[1]||(l[1]=y("h4",null,"安装命令",-1)),y("div",sn,[(v(!0),x(H,null,G(e.value,p=>(v(),x("div",{key:p.name,class:"cli-item"},[y("span",null,M(r(p.name,p.version)),1),g(s,{type:"primary",onClick:b=>d(p)},{default:C(()=>[...l[0]||(l[0]=[Z("复制",-1)])]),_:1},8,["onClick"])]))),128))])])]}),_:1}),g(i,{min:200},{default:C(()=>[g(ut)]),_:1})]),_:1})])}}}),gn=ae(an,[["__scopeId","data-v-88ef56f4"]]),rn={class:"flex items-center justify-between px-3 py-2 bg-gray-50 border-b border-gray-200 select-none"},cn={class:"text-sm font-medium text-gray-800"},un={class:"flex gap-1.5"},dn={key:0,class:"flex-1 p-3 overflow-auto"},yn=A({__name:"index",props:{title:{type:String,default:""},actions:{type:Array,default:()=>["close","maximize","minimize"]}},emits:["close","maximize","minimize"],setup(t,{emit:o}){const n=t,e=o,r=w(!1),d=w(!1);function u(){e("close")}function l(){r.value=!r.value,e("maximize",r.value)}function s(){d.value=!d.value,e("minimize",d.value)}function i(c){return n.actions.includes(c)}return(c,f)=>{const p=D("el-button");return v(),x("div",{class:Ee(["rounded-sm flex flex-col w-full h-full bg-white border border-gray-200 overflow-hidden",{"fixed inset-0 z-50":r.value}])},[y("div",rn,[y("div",cn,M(t.title),1),y("div",un,[i("close")?(v(),I(p,{key:0,type:"primary",icon:T(et),circle:"",onClick:u},null,8,["icon"])):B("",!0),i("maximize")?(v(),I(p,{key:1,type:"primary",icon:r.value?T(xe):T(tt),circle:"",onClick:l},null,8,["icon"])):B("",!0),i("minimize")?(v(),I(p,{key:2,type:"primary",icon:d.value?T(xe):T(nt),circle:"",onClick:s},null,8,["icon"])):B("",!0)])]),d.value?B("",!0):(v(),x("div",dn,[ot(c.$slots,"default")]))],2)}}});export{gn as T,hn as _,yn as a,_n as b,mt as c,St as d,Te as e,Qt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,bt as c,j as u,A as p,o as m,
|
|
1
|
+
import{d as r,bt as c,j as u,A as p,o as m,aD as d,aP as f,u as l,bu as _,aR as i}from"./index-CFekoWse.js";const h=r({__name:"index",setup(x){const t=i(),s=c(),o={modal:!0,appendToBody:!0},a=u(()=>({...o,...s}));function n(e){t&&(t.exposed=e||{},t.exposeProxy=e||{})}return(e,g)=>(m(),p(d(f(l(_),{...a.value,ref:n},e.$slots))))}});export{h as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var y=Object.defineProperty;var S=(r,a,o)=>a in r?y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[a]=o;var i=(r,a,o)=>S(r,typeof a!="symbol"?a+"":a,o);import{d as M,h as u,B as b,D as T,G as D,c as R,o as _,a as P,H as l,J as E}from"./index-CFekoWse.js";const A={class:"size-full"},k=M({__name:"index",setup(r){const a=u(null),o=u(!1);let c=null;class v{constructor({cvs:t,ctx:s}){i(this,"rangeR");i(this,"r");i(this,"rSpeed");i(this,"cvs");i(this,"ctx");i(this,"x");i(this,"y");i(this,"xSpeed");i(this,"ySpeed");i(this,"lastMoveTime");i(this,"fillStyle");i(this,"maxTimeDiff",100);this.rangeR=[3,7],this.r=l(this.rangeR[0],this.rangeR[1]),this.rSpeed=l(-1,1),this.cvs=t,this.ctx=s,this.x=l(0+this.r,this.cvs.width-this.r),this.y=l(0+this.r,this.cvs.height-this.r),this.xSpeed=l(-10,10),this.ySpeed=l(-10,10),this.lastMoveTime=null,this.fillStyle=E()}setLastMoveTime(t){this.lastMoveTime=t}draw(){if(this.lastMoveTime){const n=Date.now()-this.lastMoveTime,e=Math.min(n,this.maxTimeDiff)/1e3;let h=this.x+e*this.xSpeed,m=this.y+e*this.ySpeed,x=this.r+e*this.rSpeed;x<=this.rangeR[0]?(x=this.rangeR[0],this.rSpeed=Math.abs(this.rSpeed)):x>=this.rangeR[1]&&(x=this.rangeR[1],this.rSpeed=-Math.abs(this.rSpeed)),h-this.r<0?(h=this.r,this.xSpeed=Math.abs(this.xSpeed)):h+this.r>this.cvs.width&&(h=this.cvs.width-this.r,this.xSpeed=-Math.abs(this.xSpeed)),m-this.r<0?(m=this.r,this.ySpeed=Math.abs(this.ySpeed)):m+this.r>this.cvs.height&&(m=this.cvs.height-this.r,this.ySpeed=-Math.abs(this.ySpeed)),this.x=h,this.y=m,this.r=x}const t=Math.max(0,this.r);this.ctx.beginPath(),this.ctx.arc(this.x,this.y,t,0,2*Math.PI),this.ctx.fillStyle=this.fillStyle,this.ctx.fill(),this.lastMoveTime=Date.now()}}class w{constructor({pointNumber:t=30,maxDis:s=100,cvs:n,ctx:e}){i(this,"points");i(this,"maxDis");i(this,"cvs");i(this,"ctx");this.points=new Array(t).fill(0).map(()=>new v({cvs:n,ctx:e})),this.maxDis=s,this.cvs=n,this.ctx=e}resetPointsTime(){const t=Date.now();this.points.forEach(s=>{s.setLastMoveTime(t)})}draw(){if(o.value){if(document.hidden){setTimeout(()=>this.draw(),100);return}requestAnimationFrame(()=>this.draw()),this.ctx.clearRect(0,0,this.cvs.width,this.cvs.height);for(let t=0;t<this.points.length;t++){const s=this.points[t];s.draw();for(let n=t+1;n<this.points.length;n++){const e=this.points[n],h=Math.sqrt((s.x-e.x)**2+(s.y-e.y)**2);isNaN(h)||h>this.maxDis||(this.ctx.beginPath(),this.ctx.moveTo(s.x,s.y),this.ctx.lineTo(e.x,e.y),this.ctx.strokeStyle=`rgba(200,200,200,${Math.max(0,Math.min(1,1-h/this.maxDis))})`,this.ctx.stroke(),this.ctx.closePath())}}}}}function g(){if(!a.value)return;console.log("渲染动画"),o.value=!0;const d=1920,t=110*window.innerWidth/d,s=80*window.innerWidth/d,n=a.value,e=n.getContext("2d");if(!e)return;const h=window.devicePixelRatio||1;n.width=window.innerWidth*h,n.height=window.innerHeight*h,e.scale(h,h),c=new w({pointNumber:Math.floor(t),maxDis:Math.floor(s),cvs:n,ctx:e}),c.draw()}const f=b.debounce(g,200);function p(){document.hidden?o.value=!1:a.value&&c&&(o.value=!0,c.resetPointsTime(),c.draw())}return window.addEventListener("resize",f),document.addEventListener("visibilitychange",p),T(()=>{f()}),D(()=>{o.value=!1,window.removeEventListener("resize",f),document.removeEventListener("visibilitychange",p),c=null}),(d,t)=>(_(),R("div",A,[P("canvas",{ref_key:"myCanvas",ref:a,class:"size-full bg-[#333436]"},null,512)]))}});export{k as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var pt=Object.defineProperty;var gt=(t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>gt(t,typeof e!="symbol"?e+"":e,n);import{H as Y}from"./atom-one-dark-
|
|
1
|
+
var pt=Object.defineProperty;var gt=(t,e,n)=>e in t?pt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>gt(t,typeof e!="symbol"?e+"":e,n);import{H as Y}from"./atom-one-dark-DBsRExYg.js";import{d as qe,h as ae,G as Dt,a2 as ft,a0 as mt,c as Ft,o as Ue,a as oe,ao as Ze,B as bt,p as kt,K as Et,k as Ct,A as At,w as xt,ax as wt,n as yt,aw as Bt}from"./index-CFekoWse.js";function Ae(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var X=Ae();function Ge(t){X=t}var te={exec:()=>null};function k(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(B.caret,"$1"),n=n.replace(r,o),s},getRegex:()=>new RegExp(n,e)};return s}var B={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},St=/^(?:[ \t]*(?:\n|$))+/,Tt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,re=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xe=/(?:[*+-]|\d{1,9}[.)])/,je=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Qe=k(je).replace(/bull/g,xe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Rt=k(je).replace(/bull/g,xe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),we=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Nt=/^[^\n]+/,ye=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$t=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ye).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Lt=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xe).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Be=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,It=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Be).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xe=k(we).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),Ot=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xe).getRegex(),Se={blockquote:Ot,code:Tt,def:$t,fences:vt,heading:_t,hr:re,html:It,lheading:Qe,list:Lt,newline:St,paragraph:Xe,table:te,text:Nt},Ne=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),zt={...Se,lheading:Rt,table:Ne,paragraph:k(we).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ne).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},Mt={...Se,html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Be).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:te,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(we).replace("hr",re).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",Qe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Pt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ht=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,We=/^( {2,}|\\)\n(?!\s*$)/,qt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ge=/[\p{P}\p{S}]/u,Te=/[\s\p{P}\p{S}]/u,Ke=/[^\s\p{P}\p{S}]/u,Ut=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Te).getRegex(),Ve=/(?!~)[\p{P}\p{S}]/u,Zt=/(?!~)[\s\p{P}\p{S}]/u,Gt=/(?:[^\s\p{P}\p{S}]|~)/u,jt=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,Ye=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qt=k(Ye,"u").replace(/punct/g,ge).getRegex(),Xt=k(Ye,"u").replace(/punct/g,Ve).getRegex(),Je="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Wt=k(Je,"gu").replace(/notPunctSpace/g,Ke).replace(/punctSpace/g,Te).replace(/punct/g,ge).getRegex(),Kt=k(Je,"gu").replace(/notPunctSpace/g,Gt).replace(/punctSpace/g,Zt).replace(/punct/g,Ve).getRegex(),Vt=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ke).replace(/punctSpace/g,Te).replace(/punct/g,ge).getRegex(),Yt=k(/\\(punct)/,"gu").replace(/punct/g,ge).getRegex(),Jt=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),en=k(Be).replace("(?:-->|$)","-->").getRegex(),tn=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",en).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ce=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,nn=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ce).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),et=k(/^!?\[(label)\]\[(ref)\]/).replace("label",ce).replace("ref",ye).getRegex(),tt=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",ye).getRegex(),rn=k("reflink|nolink(?!\\()","g").replace("reflink",et).replace("nolink",tt).getRegex(),ve={_backpedal:te,anyPunctuation:Yt,autolink:Jt,blockSkip:jt,br:We,code:Ht,del:te,emStrongLDelim:Qt,emStrongRDelimAst:Wt,emStrongRDelimUnd:Vt,escape:Pt,link:nn,nolink:tt,punctuation:Ut,reflink:et,reflinkSearch:rn,tag:tn,text:qt,url:te},sn={...ve,link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",ce).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ce).getRegex()},be={...ve,emStrongRDelimAst:Kt,emStrongLDelim:Xt,url:k(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},ln={...be,br:k(We).replace("{2,}","*").getRegex(),text:k(be.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},le={normal:Se,gfm:zt,pedantic:Mt},J={normal:ve,gfm:be,breaks:ln,pedantic:sn},an={"&":"&","<":"<",">":">",'"':""","'":"'"},$e=t=>an[t];function I(t,e){if(e){if(B.escapeTest.test(t))return t.replace(B.escapeReplace,$e)}else if(B.escapeTestNoEncode.test(t))return t.replace(B.escapeReplaceNoEncode,$e);return t}function Le(t){try{t=encodeURI(t).replace(B.percentDecode,"%")}catch{return null}return t}function Ie(t,e){var i;let n=t.replace(B.findPipe,(o,a,u)=>{let l=!1,c=a;for(;--c>=0&&u[c]==="\\";)l=!l;return l?"|":" |"}),s=n.split(B.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(B.slashPipe,"|");return s}function ee(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function on(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Oe(t,e,n,s,r){let i=e.href,o=e.title||null,a=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,u}function un(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
3
3
|
`).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(`
|
|
4
4
|
`)}var de=class{constructor(t){A(this,"options");A(this,"rules");A(this,"lexer");this.options=t||X}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ee(n,`
|
|
@@ -58,4 +58,4 @@ ${t}</tr>
|
|
|
58
58
|
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${I(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let s=this.parser.parseInline(n),r=Le(t);if(r===null)return s;t=r;let i='<a href="'+t+'"';return e&&(i+=' title="'+I(e)+'"'),i+=">"+s+"</a>",i}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=Le(t);if(r===null)return I(n);t=r;let i=`<img src="${t}" alt="${n}"`;return e&&(i+=` title="${I(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:I(t.text)}},_e=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},P=class Ee{constructor(e){A(this,"options");A(this,"renderer");A(this,"textRenderer");this.options=e||X,this.options.renderer=this.options.renderer||new he,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _e}static parse(e,n){return new Ee(n).parse(e)}static parseInline(e,n){return new Ee(n).parseInline(e)}parse(e,n=!0){var r,i;let s="";for(let o=0;o<e.length;o++){let a=e[o];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[a.type]){let l=a,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){s+=c||"";continue}}let u=a;switch(u.type){case"space":{s+=this.renderer.space(u);continue}case"hr":{s+=this.renderer.hr(u);continue}case"heading":{s+=this.renderer.heading(u);continue}case"code":{s+=this.renderer.code(u);continue}case"table":{s+=this.renderer.table(u);continue}case"blockquote":{s+=this.renderer.blockquote(u);continue}case"list":{s+=this.renderer.list(u);continue}case"html":{s+=this.renderer.html(u);continue}case"def":{s+=this.renderer.def(u);continue}case"paragraph":{s+=this.renderer.paragraph(u);continue}case"text":{let l=u,c=this.renderer.text(l);for(;o+1<e.length&&e[o+1].type==="text";)l=e[++o],c+=`
|
|
59
59
|
`+this.renderer.text(l);n?s+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):s+=c;continue}default:{let l='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return s}parseInline(e,n=this.renderer){var r,i;let s="";for(let o=0;o<e.length;o++){let a=e[o];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=l||"";continue}}let u=a;switch(u.type){case"escape":{s+=n.text(u);break}case"html":{s+=n.html(u);break}case"link":{s+=n.link(u);break}case"image":{s+=n.image(u);break}case"strong":{s+=n.strong(u);break}case"em":{s+=n.em(u);break}case"codespan":{s+=n.codespan(u);break}case"br":{s+=n.br(u);break}case"del":{s+=n.del(u);break}case"text":{s+=n.text(u);break}default:{let l='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return s}},Fe,ue=(Fe=class{constructor(t){A(this,"options");A(this,"block");this.options=t||X}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?M.lex:M.lexInline}provideParser(){return this.block?P.parse:P.parseInline}},A(Fe,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Fe),cn=class{constructor(...t){A(this,"defaults",Ae());A(this,"options",this.setOptions);A(this,"parse",this.parseMarkdown(!0));A(this,"parseInline",this.parseMarkdown(!1));A(this,"Parser",P);A(this,"Renderer",he);A(this,"TextRenderer",_e);A(this,"Lexer",M);A(this,"Tokenizer",de);A(this,"Hooks",ue);this.use(...t)}walkTokens(t,e){var s,r;let n=[];for(let i of t)switch(n=n.concat(e.call(this,i)),i.type){case"table":{let o=i;for(let a of o.header)n=n.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let u of a)n=n.concat(this.walkTokens(u.tokens,e));break}case"list":{let o=i;n=n.concat(this.walkTokens(o.items,e));break}default:{let o=i;(r=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&r[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let u=o[a].flat(1/0);n=n.concat(this.walkTokens(u,e))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...o){let a=r.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new he(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,a=n.renderer[o],u=r[o];r[o]=(...l)=>{let c=a.apply(r,l);return c===!1&&(c=u.apply(r,l)),c||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new de(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,a=n.tokenizer[o],u=r[o];r[o]=(...l)=>{let c=a.apply(r,l);return c===!1&&(c=u.apply(r,l)),c}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new ue;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,a=n.hooks[o],u=r[o];ue.passThroughHooks.has(i)?r[o]=l=>{if(this.defaults.async)return Promise.resolve(a.call(r,l)).then(h=>u.call(r,h));let c=a.call(r,l);return u.call(r,c)}:r[o]=(...l)=>{let c=a.apply(r,l);return c===!1&&(c=u.apply(r,l)),c}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),r&&(a=a.concat(r.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return M.lex(t,e??this.defaults)}parser(t,e){return P.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=t);let o=r.hooks?r.hooks.provideLexer():t?M.lex:M.lexInline,a=r.hooks?r.hooks.provideParser():t?P.parse:P.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(e):e).then(u=>o(u,r)).then(u=>r.hooks?r.hooks.processAllTokens(u):u).then(u=>r.walkTokens?Promise.all(this.walkTokens(u,r.walkTokens)).then(()=>u):u).then(u=>a(u,r)).then(u=>r.hooks?r.hooks.postprocess(u):u).catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let u=o(e,r);r.hooks&&(u=r.hooks.processAllTokens(u)),r.walkTokens&&this.walkTokens(u,r.walkTokens);let l=a(u,r);return r.hooks&&(l=r.hooks.postprocess(l)),l}catch(u){return i(u)}}}onError(t,e){return n=>{if(n.message+=`
|
|
60
60
|
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+I(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},Q=new cn;function b(t,e){return Q.parse(t,e)}b.options=b.setOptions=function(t){return Q.setOptions(t),b.defaults=Q.defaults,Ge(b.defaults),b};b.getDefaults=Ae;b.defaults=X;b.use=function(...t){return Q.use(...t),b.defaults=Q.defaults,Ge(b.defaults),b};b.walkTokens=function(t,e){return Q.walkTokens(t,e)};b.parseInline=Q.parseInline;b.Parser=P;b.parser=P.parse;b.Renderer=he;b.TextRenderer=_e;b.Lexer=M;b.lexer=M.lex;b.Tokenizer=de;b.Hooks=ue;b.parse=b;b.options;b.setOptions;b.use;b.walkTokens;b.parseInline;P.parse;M.lex;function ze(t){const e=t.regex,n=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s=/[\p{L}0-9._:-]+/u,r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},i={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=t.inherit(i,{begin:/\(/,end:/\)/}),a=t.inherit(t.APOS_STRING_MODE,{className:"string"}),u=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),l={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:s,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[i,u,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[i,o,u,a]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[u]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[l],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[l],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(n,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:l}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const Me="[A-Za-z$_][0-9A-Za-z$_]*",dn=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],hn=["true","false","null","undefined","NaN","Infinity"],nt=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],rt=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],st=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],pn=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],gn=[].concat(st,nt,rt);function Dn(t){const e=t.regex,n=(T,{after:q})=>{const z="</"+T[0].slice(1);return T.input.indexOf(z,q)!==-1},s=Me,r={begin:"<>",end:"</>"},i=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(T,q)=>{const z=T[0].length+T.index,U=T.input[z];if(U==="<"||U===","){q.ignoreMatch();return}U===">"&&(n(T,{after:z})||q.ignoreMatch());let G;const ie=T.input.substring(z);if(G=ie.match(/^\s*=/)){q.ignoreMatch();return}if((G=ie.match(/^\s+extends\s+/))&&G.index===0){q.ignoreMatch();return}}},a={$pattern:Me,keyword:dn,literal:hn,built_in:gn,"variable.language":pn},u="[0-9](_?[0-9])*",l=`\\.(${u})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",h={className:"number",variants:[{begin:`(\\b(${c})((${l})|\\.)?|(${l}))[eE][+-]?(${u})\\b`},{begin:`\\b(${c})\\b((${l})\\b|\\.)?|(${l})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},D={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},g={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"css"}},F={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,d],subLanguage:"graphql"}},y={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,d]},S={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:s+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},O=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,D,g,F,y,{match:/\$\d+/},h];d.contains=O.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(O)});const L=[].concat(S,d.contains),H=L.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(L)}]),v={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:H},_={variants:[{match:[/class/,/\s+/,s,/\s+/,/extends/,/\s+/,e.concat(s,"(",e.concat(/\./,s),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,s],scope:{1:"keyword",3:"title.class"}}]},W={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...nt,...rt]}},De={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},p={variants:[{match:[/function/,/\s+/,s,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[v],illegal:/%/},f={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function E(T){return e.concat("(?!",T.join("|"),")")}const C={match:e.concat(/\b/,E([...st,"super","import"].map(T=>`${T}\\s*\\(`)),s,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},x={begin:e.concat(/\./,e.lookahead(e.concat(s,/(?![0-9A-Za-z$_(])/))),end:s,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},K={match:[/get|set/,/\s+/,s,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},v]},V="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",se={match:[/const|var|let/,/\s+/,s,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(V)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[v]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:H,CLASS_REFERENCE:W},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),De,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,D,g,F,y,S,{match:/\$\d+/},h,W,{scope:"attr",match:s+e.lookahead(":"),relevance:0},se,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[S,t.REGEXP_MODE,{className:"function",begin:V,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:H}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r.begin,end:r.end},{match:i},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},p,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[v,t.inherit(t.TITLE_MODE,{begin:s,className:"title.function"})]},{match:/\.\.\./,relevance:0},x,{match:"\\$"+s,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[v]},C,f,_,K,{match:/\$[(.]/}]}}const fn=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),mn=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Fn=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],bn=[...mn,...Fn],kn=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),En=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Cn=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),An=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function xn(t){const e=t.regex,n=fn(t),s={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r="and or not only",i=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,s,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+En.join("|")+")"},{begin:":(:)?("+Cn.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+An.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:i},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:r,attribute:kn.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+bn.join("|")+")\\b"}]}}const wn=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,yn=Object.hasOwnProperty;class it{constructor(){this.occurrences,this.reset()}slug(e,n){const s=this;let r=Bn(e,n===!0);const i=r;for(;yn.call(s.occurrences,r);)s.occurrences[i]++,r=i+"-"+s.occurrences[i];return s.occurrences[r]=0,r}reset(){this.occurrences=Object.create(null)}}function Bn(t,e){return typeof t!="string"?"":(e||(t=t.toLowerCase()),t.replace(wn,"").replace(/ /g,"-"))}let lt=new it,at=[];const Sn=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Tn(t){return t.replace(Sn,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}function vn({prefix:t="",globalSlugs:e=!1}={}){return{headerIds:!1,hooks:{preprocess(n){return e||_n(),n}},useNewRenderer:!0,renderer:{heading({tokens:n,depth:s}){const r=this.parser.parseInline(n),i=Tn(r).trim().replace(/<[!\/a-z].*?>/gi,""),o=s,a=`${t}${lt.slug(i.toLowerCase())}`,u={level:o,text:r,id:a,raw:i};return at.push(u),`<h${o} id="${a}">${r}</h${o}>
|
|
61
|
-
`}}}}function _n(){at=[],lt=new it}function Rn(t){const e=[].forEach,n=[].some,s=typeof window<"u"&&document.body,r=" ";let i,o=!0,a=0;function u(p,f){const E=f.appendChild(c(p));if(p.children.length){const C=h(p.isCollapsed);p.children.forEach(x=>{u(x,C)}),E.appendChild(C)}}function l(p,f){const C=h(!1);if(f.forEach(x=>{u(x,C)}),i=p||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),f.length===0?i:i.appendChild(C)}function c(p){const f=document.createElement("li"),E=document.createElement("a");return t.listItemClass&&f.setAttribute("class",t.listItemClass),t.onClick&&(E.onclick=t.onClick),t.includeTitleTags&&E.setAttribute("title",p.textContent),t.includeHtml&&p.childNodes.length?e.call(p.childNodes,C=>{E.appendChild(C.cloneNode(!0))}):E.textContent=p.textContent,E.setAttribute("href",`${t.basePath}#${p.id}`),E.setAttribute("class",`${t.linkClass+r}node-name--${p.nodeName}${r}${t.extraLinkClasses}`),f.appendChild(E),f}function h(p){const f=t.orderedList?"ol":"ul",E=document.createElement(f);let C=t.listClass+r+t.extraListClasses;return p&&(C=C+r+t.collapsibleClass,C=C+r+t.isCollapsedClass),E.setAttribute("class",C),E}function d(){const p=_(),f=document.querySelector(t.positionFixedSelector);t.fixedSidebarOffset==="auto"&&(t.fixedSidebarOffset=i.offsetTop),p>t.fixedSidebarOffset?f.className.indexOf(t.positionFixedClass)===-1&&(f.className+=r+t.positionFixedClass):f.className=f.className.replace(r+t.positionFixedClass,"")}function D(p){let f=0;return p!==null&&(f=p.offsetTop,t.hasInnerContainers&&(f+=D(p.offsetParent))),f}function g(p,f){return p&&p.className!==f&&(p.className=f),p}function F(p,f){var V,se;t.positionFixedSelector&&d();const E=p,C=(V=f==null?void 0:f.target)!=null&&V.getAttribute?(se=f==null?void 0:f.target)==null?void 0:se.getAttribute("href"):null,x=C&&C.charAt(0)==="#"?L(C.replace("#","")):!1,K=o||x;if(f&&a<5&&a++,K&&i&&E.length>0){const T=W(E),q=i.querySelector(`.${t.activeLinkClass}`),z=T.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1"),U=window.location.hash.replace("#","");let G=z;const ie=H();C&&x?G=C.replace("#",""):U&&U!==z&&ie&&(L(z)||a<=2)&&(G=U);const w=i.querySelector(`.${t.linkClass}[href="${t.basePath}#${G}"]`);if(q===w)return;const ct=i.querySelectorAll(`.${t.linkClass}`);e.call(ct,Z=>{g(Z,Z.className.replace(r+t.activeLinkClass,""))});const dt=i.querySelectorAll(`.${t.listItemClass}`);e.call(dt,Z=>{g(Z,Z.className.replace(r+t.activeListItemClass,""))}),w&&w.className.indexOf(t.activeLinkClass)===-1&&(w.className+=r+t.activeLinkClass);const fe=w==null?void 0:w.parentNode;fe&&fe.className.indexOf(t.activeListItemClass)===-1&&(fe.className+=r+t.activeListItemClass);const ht=i.querySelectorAll(`.${t.listClass}.${t.collapsibleClass}`);e.call(ht,Z=>{Z.className.indexOf(t.isCollapsedClass)===-1&&(Z.className+=r+t.isCollapsedClass)}),w!=null&&w.nextSibling&&w.nextSibling.className.indexOf(t.isCollapsedClass)!==-1&&g(w.nextSibling,w.nextSibling.className.replace(r+t.isCollapsedClass,"")),y(w==null?void 0:w.parentNode.parentNode)}}function y(p){return p&&p.className.indexOf(t.collapsibleClass)!==-1&&p.className.indexOf(t.isCollapsedClass)!==-1?(g(p,p.className.replace(r+t.isCollapsedClass,"")),y(p.parentNode.parentNode)):p}function R(p){const f=p.target||p.srcElement;typeof f.className!="string"||f.className.indexOf(t.linkClass)===-1||(o=!1)}function S(){o=!0}function O(){return o}function L(p){const f=v();return(document==null?void 0:document.getElementById(p)).offsetTop>f.offsetHeight-f.clientHeight*1.4-t.bottomModeThreshold}function H(){const p=v(),f=p.scrollHeight>p.clientHeight,E=_()+p.clientHeight>p.offsetHeight-t.bottomModeThreshold;return f&&E}function v(){let p;return t.scrollContainer&&document.querySelector(t.scrollContainer)?p=document.querySelector(t.scrollContainer):p=document.documentElement||s,p}function _(){const p=v();return(p==null?void 0:p.scrollTop)||0}function W(p,f=_()){let E;return n.call(p,(C,x)=>{if(D(C)>f+t.headingsOffset+10){const K=x===0?x:x-1;return E=p[K],!0}if(x===p.length-1)return E=p[p.length-1],!0}),E}function De(p){const f=_(),E=W(p,f),C=H();if((!E||f<5)&&!C)window.location.hash==="#"||window.location.hash===""||window.history.pushState(null,null,"#");else if(E&&!C){const x=`#${E.id}`;window.location.hash!==x&&window.history.pushState(null,null,x)}}return{enableTocAnimation:S,disableTocAnimation:R,render:l,updateToc:F,getCurrentlyHighlighting:O,getTopHeader:W,getScrollTop:_,updateUrlHashForHeader:De}}const Nn={tocSelector:".js-toc",tocElement:null,contentSelector:".js-toc-content",contentElement:null,headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(t){},headingsOffset:1,enableUrlHashUpdateOnScroll:!1,scrollHandlerType:"auto",scrollHandlerTimeout:50,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(t){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollingWrapper:null,tocScrollOffset:30,bottomModeThreshold:30};function $n(t){const e=[].reduce;function n(l){return l[l.length-1]}function s(l){return+l.nodeName.toUpperCase().replace("H","")}function r(l){try{return l instanceof window.HTMLElement||l instanceof window.parent.HTMLElement}catch{return l instanceof window.HTMLElement}}function i(l){if(!r(l))return l;if(t.ignoreHiddenElements&&(!l.offsetHeight||!l.offsetParent))return null;const c=l.getAttribute("data-heading-label")||(t.headingLabelCallback?String(t.headingLabelCallback(l.innerText)):(l.innerText||l.textContent).trim()),h={id:l.id,children:[],nodeName:l.nodeName,headingLevel:s(l),textContent:c};return t.includeHtml&&(h.childNodes=l.childNodes),t.headingObjectCallback?t.headingObjectCallback(h,l):h}function o(l,c){const h=i(l),d=h.headingLevel;let D=c,g=n(D);const F=g?g.headingLevel:0;let y=d-F;for(;y>0&&(g=n(D),!(g&&d===g.headingLevel));)g&&g.children!==void 0&&(D=g.children),y--;return d>=t.collapseDepth&&(h.isCollapsed=!0),D.push(h),D}function a(l,c){let h=c;t.ignoreSelector&&(h=c.split(",").map(function(D){return`${D.trim()}:not(${t.ignoreSelector})`}));try{return l.querySelectorAll(h)}catch{return console.warn(`Headers not found with selector: ${h}`),null}}function u(l){return e.call(l,function(h,d){const D=i(d);return D&&o(D,h.nest),h},{nest:[]})}return{nestHeadingsArray:u,selectHeadings:a}}function Ln(t){var e=t.duration,n=t.offset;if(typeof window>"u"||typeof location>"u")return;var s=location.hash?o(location.href):location.href;r();function r(){document.body.addEventListener("click",u,!1);function u(l){!i(l.target)||l.target.className.indexOf("no-smooth-scroll")>-1||l.target.href.charAt(l.target.href.length-2)==="#"&&l.target.href.charAt(l.target.href.length-1)==="!"||l.target.className.indexOf(t.linkClass)===-1||In(l.target.hash,{duration:e,offset:n,callback:function(){a(l.target.hash)}})}}function i(u){return u.tagName.toLowerCase()==="a"&&(u.hash.length>0||u.href.charAt(u.href.length-1)==="#")&&(o(u.href)===s||o(u.href)+"#"===s)}function o(u){return u.slice(0,u.lastIndexOf("#"))}function a(u){var l=document.getElementById(u.substring(1));l&&(/^(?:a|select|input|button|textarea)$/i.test(l.tagName)||(l.tabIndex=-1),l.focus())}}function In(t,e){var n=window.pageYOffset,s={duration:e.duration,offset:e.offset||0,callback:e.callback,easing:e.easing||h},r=document.querySelector('[id="'+decodeURI(t).split("#").join("")+'"]')||document.querySelector('[id="'+t.split("#").join("")+'"]'),i=typeof t=="string"?s.offset+(t?r&&r.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):t,o=typeof s.duration=="function"?s.duration(i):s.duration,a,u;requestAnimationFrame(function(d){a=d,l(d)});function l(d){u=d-a,window.scrollTo(0,s.easing(u,n,i,o)),u<o?requestAnimationFrame(l):c()}function c(){window.scrollTo(0,n+i),typeof s.callback=="function"&&s.callback()}function h(d,D,g,F){return d/=F/2,d<1?g/2*d*d+D:(d--,-g/2*(d*(d-2)-1)+D)}}function On(t){const e=t.tocScrollingWrapper||t.tocElement||document.querySelector(t.tocSelector);if(e&&e.scrollHeight>e.clientHeight){const n=e.querySelector(`.${t.activeListItemClass}`);if(n){const r=n.offsetTop-t.tocScrollOffset;e.scrollTop=r>0?r:0}}}let m={},N,me,j,$,ne;function ot(t){let e=!1;m=Pn(Nn,t||{}),m.scrollSmooth&&(m.duration=m.scrollSmoothDuration,m.offset=m.scrollSmoothOffset,Ln(m)),N=Rn(m),me=$n(m),Re();const n=qn(m);if(n===null)return;const s=ut(m);if(s===null||(j=me.selectHeadings(n,m.headingSelector),j===null))return;const i=me.nestHeadingsArray(j).nest;if(!m.skipRendering)N.render(s,i);else return this;let o=!1;const a=m.scrollHandlerTimeout||m.throttleTimeout;$=((c,h)=>Hn(c,h,m.scrollHandlerType))(c=>{var d,D,g;N.updateToc(j,c),!m.disableTocScrollSync&&!o&&On(m),m.enableUrlHashUpdateOnScroll&&e&&N.getCurrentlyHighlighting()&&N.updateUrlHashForHeader(j);const h=((D=(d=c==null?void 0:c.target)==null?void 0:d.scrollingElement)==null?void 0:D.scrollTop)===0;(c&&(c.eventPhase===0||c.currentTarget===null)||h)&&(N.updateToc(j),(g=m.scrollEndCallback)==null||g.call(m,c))},a),e||($(),e=!0),window.onhashchange=window.onscrollend=c=>{$(c)},m.scrollContainer&&document.querySelector(m.scrollContainer)?(document.querySelector(m.scrollContainer).addEventListener("scroll",$,!1),document.querySelector(m.scrollContainer).addEventListener("resize",$,!1)):(document.addEventListener("scroll",$,!1),document.addEventListener("resize",$,!1));let l=null;ne=Ce(c=>{o=!0,m.scrollSmooth&&N.disableTocAnimation(c),N.updateToc(j,c),l&&clearTimeout(l),l=setTimeout(()=>{N.enableTocAnimation()},m.scrollSmoothDuration),setTimeout(()=>{o=!1},m.scrollSmoothDuration+100)},m.throttleTimeout),m.scrollContainer&&document.querySelector(m.scrollContainer)?document.querySelector(m.scrollContainer).addEventListener("click",ne,!1):document.addEventListener("click",ne,!1)}function Re(){const t=ut(m);t!==null&&(m.skipRendering||t&&(t.innerHTML=""),m.scrollContainer&&document.querySelector(m.scrollContainer)?(document.querySelector(m.scrollContainer).removeEventListener("scroll",$,!1),document.querySelector(m.scrollContainer).removeEventListener("resize",$,!1),N&&document.querySelector(m.scrollContainer).removeEventListener("click",ne,!1)):(document.removeEventListener("scroll",$,!1),document.removeEventListener("resize",$,!1),N&&document.removeEventListener("click",ne,!1)))}function zn(t){Re(),ot(t||m)}const Mn=Object.prototype.hasOwnProperty;function Pn(...t){const e={};for(let n=0;n<t.length;n++){const s=t[n];for(const r in s)Mn.call(s,r)&&(e[r]=s[r])}return e}function Ce(t,e,n){e||(e=250);let s,r;return function(...i){const o=this,a=+new Date;s&&a<s+e?(clearTimeout(r),r=setTimeout(()=>{s=a,t.apply(o,i)},e)):(s=a,t.apply(o,i))}}function Pe(t,e){let n;return(...s)=>{clearTimeout(n),n=setTimeout(()=>t.apply(this,s),e)}}function Hn(t,e,n="auto"){switch(n){case"debounce":return Pe(t,e);case"throttle":return Ce(t,e);default:return e<334?Pe(t,e):Ce(t,e)}}function qn(t){try{return t.contentElement||document.querySelector(t.contentSelector)}catch{return console.warn(`Contents element not found: ${t.contentSelector}`),null}}function ut(t){try{return t.tocElement||document.querySelector(t.tocSelector)}catch{return console.warn(`TOC element not found: ${t.tocSelector}`),null}}const He={destroy:Re,init:ot,refresh:zn},Un=qe({__name:"index",props:{contentSelector:{},headingSelector:{default:"h1,h2,h3,h4,h5,h6"},scrollContainer:{}},setup(t,{expose:e}){const n=t,s=kt(),r=Et(),i=ae(!1),o=async()=>{He.destroy();const h=document.querySelector(n.contentSelector);if(!h)return;const d=document.querySelector(n.scrollContainer);d&&(d.addEventListener("scroll",bt.debounce(a,300)),He.init({tocSelector:"#toc",contentSelector:n.contentSelector,headingSelector:n.headingSelector,collapseDepth:6,onClick:function(D){D.preventDefault(),D.stopPropagation();const g=D.target.getAttribute("href"),F=h.querySelector(g);F&&(i.value=!0,d.scrollTo({top:F.offsetTop,behavior:"smooth"}),c(g))}}),l())};function a(){console.log("滚动结束!"),i.value=!1}const u=()=>{const h=n.headingSelector.split(",").map(D=>`${n.contentSelector} ${D.trim()}`).join(",");return document.querySelectorAll(h)},l=()=>{const h=document.querySelector(n.contentSelector),d=document.querySelector(n.scrollContainer);if(!d||!h)return;const D=u();if(!D.length)return;let g="";const F=new IntersectionObserver(y=>{const R=[];if(y.forEach(S=>{S.isIntersecting&&R.push(S.target)}),R.length>0){R.sort((O,L)=>O.getBoundingClientRect().top-L.getBoundingClientRect().top);const S=R[0].id;S!==g&&!i.value&&(g=S,s.replace({...r,hash:`#${g}`}))}},{root:d,rootMargin:"0px 0px -80% 0px",threshold:0});return D.forEach(y=>{F.observe(y)}),()=>{F.disconnect()}},c=h=>{document.querySelectorAll("#toc a.toc-link").forEach(D=>{const g=D.closest("li.toc-list-item"),F=D.getAttribute("href")===h;D.classList.toggle("is-active-link",F),g&&g.classList.toggle("is-active-li",F)})};return Dt(()=>{l()}),ft(()=>r.hash,async h=>{h&&c(h)},{immediate:!0}),mt(()=>{c(r.hash)}),e({initToc:o}),(h,d)=>(Ue(),Ft("div",null,[d[0]||(d[0]=oe("nav",{id:"toc",class:"sticky top-2"},null,-1)),Ze(h.$slots,"default")]))}}),Zn={class:"flex-1 p-[10px] flex flex-col"},Gn={class:"md-content break-all"},jn=["innerHTML"],Kn=qe({__name:"index",props:{src:{},showToc:{type:Boolean,default:!1},scrollContainer:{}},setup(t){Y.registerLanguage("xml",ze),Y.registerLanguage("js",Dn),Y.registerLanguage("css",xn),Y.registerLanguage("vue",ze),b.use(vn({prefix:""}));const e=t,n=ae(""),s=ae(),r=ae(!1);return Ct(async()=>{var i;try{if(!e.src){n.value="作者没有配置README.md文件",r.value=!0;return}const a=await(await fetch(e.src)).text();n.value=await b.parse(a),await wt(),Y.highlightAll(),e.showToc&&((i=s.value)==null||i.initToc()),r.value=!0}catch(o){n.value="加载失败:"+o}}),(i,o)=>(Ue(),At(Un,{contentSelector:".md-content",scrollContainer:i.scrollContainer||".prose",class:"flex items-start p-[5px]",ref_key:"tocbotContainerRef",ref:s},{default:xt(()=>[oe("div",Zn,[oe("div",Gn,[oe("div",{class:Bt(["prose",{empty:!i.src}]),innerHTML:n.value},null,10,jn)]),r.value?Ze(i.$slots,"footer",{key:0}):yt("",!0)])]),_:3},8,["scrollContainer"]))}});export{Kn as _};
|
|
61
|
+
`}}}}function _n(){at=[],lt=new it}function Rn(t){const e=[].forEach,n=[].some,s=typeof window<"u"&&document.body,r=" ";let i,o=!0,a=0;function u(p,f){const E=f.appendChild(c(p));if(p.children.length){const C=h(p.isCollapsed);p.children.forEach(x=>{u(x,C)}),E.appendChild(C)}}function l(p,f){const C=h(!1);if(f.forEach(x=>{u(x,C)}),i=p||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),f.length===0?i:i.appendChild(C)}function c(p){const f=document.createElement("li"),E=document.createElement("a");return t.listItemClass&&f.setAttribute("class",t.listItemClass),t.onClick&&(E.onclick=t.onClick),t.includeTitleTags&&E.setAttribute("title",p.textContent),t.includeHtml&&p.childNodes.length?e.call(p.childNodes,C=>{E.appendChild(C.cloneNode(!0))}):E.textContent=p.textContent,E.setAttribute("href",`${t.basePath}#${p.id}`),E.setAttribute("class",`${t.linkClass+r}node-name--${p.nodeName}${r}${t.extraLinkClasses}`),f.appendChild(E),f}function h(p){const f=t.orderedList?"ol":"ul",E=document.createElement(f);let C=t.listClass+r+t.extraListClasses;return p&&(C=C+r+t.collapsibleClass,C=C+r+t.isCollapsedClass),E.setAttribute("class",C),E}function d(){const p=_(),f=document.querySelector(t.positionFixedSelector);t.fixedSidebarOffset==="auto"&&(t.fixedSidebarOffset=i.offsetTop),p>t.fixedSidebarOffset?f.className.indexOf(t.positionFixedClass)===-1&&(f.className+=r+t.positionFixedClass):f.className=f.className.replace(r+t.positionFixedClass,"")}function D(p){let f=0;return p!==null&&(f=p.offsetTop,t.hasInnerContainers&&(f+=D(p.offsetParent))),f}function g(p,f){return p&&p.className!==f&&(p.className=f),p}function F(p,f){var V,se;t.positionFixedSelector&&d();const E=p,C=(V=f==null?void 0:f.target)!=null&&V.getAttribute?(se=f==null?void 0:f.target)==null?void 0:se.getAttribute("href"):null,x=C&&C.charAt(0)==="#"?L(C.replace("#","")):!1,K=o||x;if(f&&a<5&&a++,K&&i&&E.length>0){const T=W(E),q=i.querySelector(`.${t.activeLinkClass}`),z=T.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1"),U=window.location.hash.replace("#","");let G=z;const ie=H();C&&x?G=C.replace("#",""):U&&U!==z&&ie&&(L(z)||a<=2)&&(G=U);const w=i.querySelector(`.${t.linkClass}[href="${t.basePath}#${G}"]`);if(q===w)return;const ct=i.querySelectorAll(`.${t.linkClass}`);e.call(ct,Z=>{g(Z,Z.className.replace(r+t.activeLinkClass,""))});const dt=i.querySelectorAll(`.${t.listItemClass}`);e.call(dt,Z=>{g(Z,Z.className.replace(r+t.activeListItemClass,""))}),w&&w.className.indexOf(t.activeLinkClass)===-1&&(w.className+=r+t.activeLinkClass);const fe=w==null?void 0:w.parentNode;fe&&fe.className.indexOf(t.activeListItemClass)===-1&&(fe.className+=r+t.activeListItemClass);const ht=i.querySelectorAll(`.${t.listClass}.${t.collapsibleClass}`);e.call(ht,Z=>{Z.className.indexOf(t.isCollapsedClass)===-1&&(Z.className+=r+t.isCollapsedClass)}),w!=null&&w.nextSibling&&w.nextSibling.className.indexOf(t.isCollapsedClass)!==-1&&g(w.nextSibling,w.nextSibling.className.replace(r+t.isCollapsedClass,"")),y(w==null?void 0:w.parentNode.parentNode)}}function y(p){return p&&p.className.indexOf(t.collapsibleClass)!==-1&&p.className.indexOf(t.isCollapsedClass)!==-1?(g(p,p.className.replace(r+t.isCollapsedClass,"")),y(p.parentNode.parentNode)):p}function R(p){const f=p.target||p.srcElement;typeof f.className!="string"||f.className.indexOf(t.linkClass)===-1||(o=!1)}function S(){o=!0}function O(){return o}function L(p){const f=v();return(document==null?void 0:document.getElementById(p)).offsetTop>f.offsetHeight-f.clientHeight*1.4-t.bottomModeThreshold}function H(){const p=v(),f=p.scrollHeight>p.clientHeight,E=_()+p.clientHeight>p.offsetHeight-t.bottomModeThreshold;return f&&E}function v(){let p;return t.scrollContainer&&document.querySelector(t.scrollContainer)?p=document.querySelector(t.scrollContainer):p=document.documentElement||s,p}function _(){const p=v();return(p==null?void 0:p.scrollTop)||0}function W(p,f=_()){let E;return n.call(p,(C,x)=>{if(D(C)>f+t.headingsOffset+10){const K=x===0?x:x-1;return E=p[K],!0}if(x===p.length-1)return E=p[p.length-1],!0}),E}function De(p){const f=_(),E=W(p,f),C=H();if((!E||f<5)&&!C)window.location.hash==="#"||window.location.hash===""||window.history.pushState(null,null,"#");else if(E&&!C){const x=`#${E.id}`;window.location.hash!==x&&window.history.pushState(null,null,x)}}return{enableTocAnimation:S,disableTocAnimation:R,render:l,updateToc:F,getCurrentlyHighlighting:O,getTopHeader:W,getScrollTop:_,updateUrlHashForHeader:De}}const Nn={tocSelector:".js-toc",tocElement:null,contentSelector:".js-toc-content",contentElement:null,headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(t){},headingsOffset:1,enableUrlHashUpdateOnScroll:!1,scrollHandlerType:"auto",scrollHandlerTimeout:50,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(t){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollingWrapper:null,tocScrollOffset:30,bottomModeThreshold:30};function $n(t){const e=[].reduce;function n(l){return l[l.length-1]}function s(l){return+l.nodeName.toUpperCase().replace("H","")}function r(l){try{return l instanceof window.HTMLElement||l instanceof window.parent.HTMLElement}catch{return l instanceof window.HTMLElement}}function i(l){if(!r(l))return l;if(t.ignoreHiddenElements&&(!l.offsetHeight||!l.offsetParent))return null;const c=l.getAttribute("data-heading-label")||(t.headingLabelCallback?String(t.headingLabelCallback(l.innerText)):(l.innerText||l.textContent).trim()),h={id:l.id,children:[],nodeName:l.nodeName,headingLevel:s(l),textContent:c};return t.includeHtml&&(h.childNodes=l.childNodes),t.headingObjectCallback?t.headingObjectCallback(h,l):h}function o(l,c){const h=i(l),d=h.headingLevel;let D=c,g=n(D);const F=g?g.headingLevel:0;let y=d-F;for(;y>0&&(g=n(D),!(g&&d===g.headingLevel));)g&&g.children!==void 0&&(D=g.children),y--;return d>=t.collapseDepth&&(h.isCollapsed=!0),D.push(h),D}function a(l,c){let h=c;t.ignoreSelector&&(h=c.split(",").map(function(D){return`${D.trim()}:not(${t.ignoreSelector})`}));try{return l.querySelectorAll(h)}catch{return console.warn(`Headers not found with selector: ${h}`),null}}function u(l){return e.call(l,function(h,d){const D=i(d);return D&&o(D,h.nest),h},{nest:[]})}return{nestHeadingsArray:u,selectHeadings:a}}function Ln(t){var e=t.duration,n=t.offset;if(typeof window>"u"||typeof location>"u")return;var s=location.hash?o(location.href):location.href;r();function r(){document.body.addEventListener("click",u,!1);function u(l){!i(l.target)||l.target.className.indexOf("no-smooth-scroll")>-1||l.target.href.charAt(l.target.href.length-2)==="#"&&l.target.href.charAt(l.target.href.length-1)==="!"||l.target.className.indexOf(t.linkClass)===-1||In(l.target.hash,{duration:e,offset:n,callback:function(){a(l.target.hash)}})}}function i(u){return u.tagName.toLowerCase()==="a"&&(u.hash.length>0||u.href.charAt(u.href.length-1)==="#")&&(o(u.href)===s||o(u.href)+"#"===s)}function o(u){return u.slice(0,u.lastIndexOf("#"))}function a(u){var l=document.getElementById(u.substring(1));l&&(/^(?:a|select|input|button|textarea)$/i.test(l.tagName)||(l.tabIndex=-1),l.focus())}}function In(t,e){var n=window.pageYOffset,s={duration:e.duration,offset:e.offset||0,callback:e.callback,easing:e.easing||h},r=document.querySelector('[id="'+decodeURI(t).split("#").join("")+'"]')||document.querySelector('[id="'+t.split("#").join("")+'"]'),i=typeof t=="string"?s.offset+(t?r&&r.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):t,o=typeof s.duration=="function"?s.duration(i):s.duration,a,u;requestAnimationFrame(function(d){a=d,l(d)});function l(d){u=d-a,window.scrollTo(0,s.easing(u,n,i,o)),u<o?requestAnimationFrame(l):c()}function c(){window.scrollTo(0,n+i),typeof s.callback=="function"&&s.callback()}function h(d,D,g,F){return d/=F/2,d<1?g/2*d*d+D:(d--,-g/2*(d*(d-2)-1)+D)}}function On(t){const e=t.tocScrollingWrapper||t.tocElement||document.querySelector(t.tocSelector);if(e&&e.scrollHeight>e.clientHeight){const n=e.querySelector(`.${t.activeListItemClass}`);if(n){const r=n.offsetTop-t.tocScrollOffset;e.scrollTop=r>0?r:0}}}let m={},N,me,j,$,ne;function ot(t){let e=!1;m=Pn(Nn,t||{}),m.scrollSmooth&&(m.duration=m.scrollSmoothDuration,m.offset=m.scrollSmoothOffset,Ln(m)),N=Rn(m),me=$n(m),Re();const n=qn(m);if(n===null)return;const s=ut(m);if(s===null||(j=me.selectHeadings(n,m.headingSelector),j===null))return;const i=me.nestHeadingsArray(j).nest;if(!m.skipRendering)N.render(s,i);else return this;let o=!1;const a=m.scrollHandlerTimeout||m.throttleTimeout;$=((c,h)=>Hn(c,h,m.scrollHandlerType))(c=>{var d,D,g;N.updateToc(j,c),!m.disableTocScrollSync&&!o&&On(m),m.enableUrlHashUpdateOnScroll&&e&&N.getCurrentlyHighlighting()&&N.updateUrlHashForHeader(j);const h=((D=(d=c==null?void 0:c.target)==null?void 0:d.scrollingElement)==null?void 0:D.scrollTop)===0;(c&&(c.eventPhase===0||c.currentTarget===null)||h)&&(N.updateToc(j),(g=m.scrollEndCallback)==null||g.call(m,c))},a),e||($(),e=!0),window.onhashchange=window.onscrollend=c=>{$(c)},m.scrollContainer&&document.querySelector(m.scrollContainer)?(document.querySelector(m.scrollContainer).addEventListener("scroll",$,!1),document.querySelector(m.scrollContainer).addEventListener("resize",$,!1)):(document.addEventListener("scroll",$,!1),document.addEventListener("resize",$,!1));let l=null;ne=Ce(c=>{o=!0,m.scrollSmooth&&N.disableTocAnimation(c),N.updateToc(j,c),l&&clearTimeout(l),l=setTimeout(()=>{N.enableTocAnimation()},m.scrollSmoothDuration),setTimeout(()=>{o=!1},m.scrollSmoothDuration+100)},m.throttleTimeout),m.scrollContainer&&document.querySelector(m.scrollContainer)?document.querySelector(m.scrollContainer).addEventListener("click",ne,!1):document.addEventListener("click",ne,!1)}function Re(){const t=ut(m);t!==null&&(m.skipRendering||t&&(t.innerHTML=""),m.scrollContainer&&document.querySelector(m.scrollContainer)?(document.querySelector(m.scrollContainer).removeEventListener("scroll",$,!1),document.querySelector(m.scrollContainer).removeEventListener("resize",$,!1),N&&document.querySelector(m.scrollContainer).removeEventListener("click",ne,!1)):(document.removeEventListener("scroll",$,!1),document.removeEventListener("resize",$,!1),N&&document.removeEventListener("click",ne,!1)))}function zn(t){Re(),ot(t||m)}const Mn=Object.prototype.hasOwnProperty;function Pn(...t){const e={};for(let n=0;n<t.length;n++){const s=t[n];for(const r in s)Mn.call(s,r)&&(e[r]=s[r])}return e}function Ce(t,e,n){e||(e=250);let s,r;return function(...i){const o=this,a=+new Date;s&&a<s+e?(clearTimeout(r),r=setTimeout(()=>{s=a,t.apply(o,i)},e)):(s=a,t.apply(o,i))}}function Pe(t,e){let n;return(...s)=>{clearTimeout(n),n=setTimeout(()=>t.apply(this,s),e)}}function Hn(t,e,n="auto"){switch(n){case"debounce":return Pe(t,e);case"throttle":return Ce(t,e);default:return e<334?Pe(t,e):Ce(t,e)}}function qn(t){try{return t.contentElement||document.querySelector(t.contentSelector)}catch{return console.warn(`Contents element not found: ${t.contentSelector}`),null}}function ut(t){try{return t.tocElement||document.querySelector(t.tocSelector)}catch{return console.warn(`TOC element not found: ${t.tocSelector}`),null}}const He={destroy:Re,init:ot,refresh:zn},Un=qe({__name:"index",props:{contentSelector:{},headingSelector:{default:"h1,h2,h3,h4,h5,h6"},scrollContainer:{}},setup(t,{expose:e}){const n=t,s=kt(),r=Et(),i=ae(!1),o=async()=>{He.destroy();const h=document.querySelector(n.contentSelector);if(!h)return;const d=document.querySelector(n.scrollContainer);d&&(d.addEventListener("scroll",bt.debounce(a,300)),He.init({tocSelector:"#toc",contentSelector:n.contentSelector,headingSelector:n.headingSelector,collapseDepth:6,onClick:function(D){D.preventDefault(),D.stopPropagation();const g=D.target.getAttribute("href"),F=h.querySelector(g);F&&(i.value=!0,d.scrollTo({top:F.offsetTop,behavior:"smooth"}),c(g))}}),l())};function a(){console.log("滚动结束!"),i.value=!1}const u=()=>{const h=n.headingSelector.split(",").map(D=>`${n.contentSelector} ${D.trim()}`).join(",");return document.querySelectorAll(h)},l=()=>{const h=document.querySelector(n.contentSelector),d=document.querySelector(n.scrollContainer);if(!d||!h)return;const D=u();if(!D.length)return;let g="";const F=new IntersectionObserver(y=>{const R=[];if(y.forEach(S=>{S.isIntersecting&&R.push(S.target)}),R.length>0){R.sort((O,L)=>O.getBoundingClientRect().top-L.getBoundingClientRect().top);const S=R[0].id;S!==g&&!i.value&&(g=S,s.replace({...r,hash:`#${g}`}))}},{root:d,rootMargin:"0px 0px -80% 0px",threshold:0});return D.forEach(y=>{F.observe(y)}),()=>{F.disconnect()}},c=h=>{document.querySelectorAll("#toc a.toc-link").forEach(D=>{const g=D.closest("li.toc-list-item"),F=D.getAttribute("href")===h;D.classList.toggle("is-active-link",F),g&&g.classList.toggle("is-active-li",F)})};return Dt(()=>{l()}),ft(()=>r.hash,async h=>{h&&c(h)},{immediate:!0}),mt(()=>{c(r.hash)}),e({initToc:o}),(h,d)=>(Ue(),Ft("div",null,[d[0]||(d[0]=oe("nav",{id:"toc",class:"sticky top-2"},null,-1)),Ze(h.$slots,"default")]))}}),Zn={class:"flex-1 p-[10px] flex flex-col overflow-auto"},Gn={class:"md-content break-all"},jn=["innerHTML"],Kn=qe({__name:"index",props:{src:{},showToc:{type:Boolean,default:!1},scrollContainer:{}},setup(t){Y.registerLanguage("xml",ze),Y.registerLanguage("js",Dn),Y.registerLanguage("css",xn),Y.registerLanguage("vue",ze),b.use(vn({prefix:""}));const e=t,n=ae(""),s=ae(),r=ae(!1);return Ct(async()=>{var i;try{if(!e.src){n.value="作者没有配置README.md文件",r.value=!0;return}const a=await(await fetch(e.src)).text();n.value=await b.parse(a),await wt(),Y.highlightAll(),e.showToc&&((i=s.value)==null||i.initToc()),r.value=!0}catch(o){n.value="加载失败:"+o}}),(i,o)=>(Ue(),At(Un,{contentSelector:".md-content",scrollContainer:i.scrollContainer||".prose",class:"flex items-start p-[5px]",ref_key:"tocbotContainerRef",ref:s},{default:xt(()=>[oe("div",Zn,[oe("div",Gn,[oe("div",{class:Bt(["prose",{empty:!i.src}]),innerHTML:n.value},null,10,jn)]),r.value?Ze(i.$slots,"footer",{key:0}):yt("",!0)])]),_:3},8,["scrollContainer"]))}});export{Kn as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aS as E,aW as H}from"./index-CFekoWse.js";async function $(p,l){return E("/__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:p})}var g={exports:{}},x={exports:{}},_;function O(){return _||(_=1,(function(){var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l={rotl:function(f,i){return f<<i|f>>>32-i},rotr:function(f,i){return f<<32-i|f>>>i},endian:function(f){if(f.constructor==Number)return l.rotl(f,8)&16711935|l.rotl(f,24)&4278255360;for(var i=0;i<f.length;i++)f[i]=l.endian(f[i]);return f},randomBytes:function(f){for(var i=[];f>0;f--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(f){for(var i=[],c=0,a=0;c<f.length;c++,a+=8)i[a>>>5]|=f[c]<<24-a%32;return i},wordsToBytes:function(f){for(var i=[],c=0;c<f.length*32;c+=8)i.push(f[c>>>5]>>>24-c%32&255);return i},bytesToHex:function(f){for(var i=[],c=0;c<f.length;c++)i.push((f[c]>>>4).toString(16)),i.push((f[c]&15).toString(16));return i.join("")},hexToBytes:function(f){for(var i=[],c=0;c<f.length;c+=2)i.push(parseInt(f.substr(c,2),16));return i},bytesToBase64:function(f){for(var i=[],c=0;c<f.length;c+=3)for(var a=f[c]<<16|f[c+1]<<8|f[c+2],h=0;h<4;h++)c*8+h*6<=f.length*8?i.push(p.charAt(a>>>6*(3-h)&63)):i.push("=");return i.join("")},base64ToBytes:function(f){f=f.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],c=0,a=0;c<f.length;a=++c%4)a!=0&&i.push((p.indexOf(f.charAt(c-1))&Math.pow(2,-2*a+8)-1)<<a*2|p.indexOf(f.charAt(c))>>>6-a*2);return i}};x.exports=l})()),x.exports}var B,S;function C(){if(S)return B;S=1;var p={utf8:{stringToBytes:function(l){return p.bin.stringToBytes(unescape(encodeURIComponent(l)))},bytesToString:function(l){return decodeURIComponent(escape(p.bin.bytesToString(l)))}},bin:{stringToBytes:function(l){for(var f=[],i=0;i<l.length;i++)f.push(l.charCodeAt(i)&255);return f},bytesToString:function(l){for(var f=[],i=0;i<l.length;i++)f.push(String.fromCharCode(l[i]));return f.join("")}}};return B=p,B}/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
6
6
|
<link rel="icon" href="/dist/favicon.ico">
|
|
7
|
+
|
|
7
8
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
9
|
<script src="/dist/js/vue2-sfc-loader.js"></script>
|
|
9
10
|
<script src="/dist/js/vue3-sfc-loader.js"></script>
|
|
10
11
|
<script src="/dist/font/iconfont.js"></script>
|
|
11
12
|
|
|
12
|
-
<script type="module" crossorigin src="/dist/assets/index-
|
|
13
|
-
<link rel="stylesheet" crossorigin href="/dist/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/dist/assets/index-CFekoWse.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="/dist/assets/index-BEUiJ6Cs.css">
|
|
14
15
|
</head>
|
|
15
16
|
|
|
16
17
|
<body>
|
|
@@ -257,5 +257,5 @@
|
|
|
257
257
|
} catch (e) {
|
|
258
258
|
return Promise.reject(e);
|
|
259
259
|
}
|
|
260
|
-
}`)}else y.get("body").unshiftContainer("body",f);return!0};var a=n(2),r=n(390);const i=a.template.statement("\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n"),s=a.template.statement("\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n"),o=a.template.statement("\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n"),d=a.template.statement("\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{node:t,scope:n}=e;if(!function(e){const t=e.params.length;return t>0&&a.types.isRestElement(e.params[t-1])}(t))return!1;const s=e.get(`params.${t.params.length-1}.argument`);if(!s.isIdentifier()){const t=new Set;(0,r.collectShadowedParamsNames)(s,e.scope,t);let i=t.size>0;if(!i){const e={needsOuterBinding:!1,scope:n};s.traverse(r.iifeVisitor,e),i=e.needsOuterBinding}i&&(e.ensureBlock(),e.set("body",a.types.blockStatement([(0,r.buildScopeIIFE)(t,e.node.body)])))}let o=s.node;if(t.params.pop(),a.types.isPattern(o)){const r=o;o=n.generateUidIdentifier("ref");const i=a.types.variableDeclaration("let",[a.types.variableDeclarator(r,o)]);e.ensureBlock(),t.body.body.unshift(i)}else"arguments"===o.name&&n.rename(o.name);const d=a.types.identifier("arguments"),l=function(e){let t=e.params.length;return t>0&&a.types.isIdentifier(e.params[0],{name:"this"})&&(t-=1),t}(t),f={references:[],offset:l,argumentsNode:d,outerBinding:n.getBindingIdentifier(o.name),candidates:[],name:o.name,deopted:!1};if(e.traverse(c,f),!f.deopted&&!f.references.length){for(const{path:e,cause:t}of f.candidates){const n=a.types.cloneNode(d);switch(t){case"indexGetter":u(e,n,f.offset);break;case"lengthGetter":p(e,n,f.offset);break;default:e.replaceWith(n)}}return!0}f.references.push(...f.candidates.map((e=>{let{path:t}=e;return t})));const g=a.types.numericLiteral(l),h=n.generateUidIdentifier("key"),m=n.generateUidIdentifier("len");let y,R;l?(y=a.types.binaryExpression("-",a.types.cloneNode(h),a.types.cloneNode(g)),R=a.types.conditionalExpression(a.types.binaryExpression(">",a.types.cloneNode(m),a.types.cloneNode(g)),a.types.binaryExpression("-",a.types.cloneNode(m),a.types.cloneNode(g)),a.types.numericLiteral(0))):(y=a.types.identifier(h.name),R=a.types.identifier(m.name));const b=i({ARGUMENTS:d,ARRAY_KEY:y,ARRAY_LEN:R,START:g,ARRAY:o,KEY:h,LEN:m});if(f.deopted)t.body.body.unshift(b);else{let t=e.getEarliestCommonAncestorFrom(f.references).getStatementParent();t.findParent((e=>{if(!e.isLoop())return e.isFunction();t=e})),t.insertBefore(b)}return!0};var a=n(2),r=n(390);const i=a.template.statement("\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n"),s=a.template.expression("\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n"),o=a.template.expression("\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n"),d=a.template.expression("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n");function l(e,t){return e.node.name===t.name&&e.scope.bindingIdentifierEquals(t.name,t.outerBinding)}const c={Scope(e,t){e.scope.bindingIdentifierEquals(t.name,t.outerBinding)||e.skip()},Flow(e){e.isTypeCastExpression()||e.skip()},Function(e,t){const n=t.noOptimise;t.noOptimise=!0,e.traverse(c,t),t.noOptimise=n,e.skip()},ReferencedIdentifier(e,t){const{node:n}=e;if("arguments"===n.name&&(t.deopted=!0),l(e,t))if(t.noOptimise)t.deopted=!0;else{const{parentPath:a}=e;if("params"===a.listKey&&a.key<t.offset)return;if(a.isMemberExpression({object:n})){const n=a.parentPath;if(!t.deopted&&!(n.isAssignmentExpression()&&a.node===n.node.left||n.isLVal()||n.isForXStatement()||n.isUpdateExpression()||n.isUnaryExpression({operator:"delete"})||(n.isCallExpression()||n.isNewExpression())&&a.node===n.node.callee))if(a.node.computed){if(a.get("property").isBaseType("number"))return void t.candidates.push({cause:"indexGetter",path:e})}else if("length"===a.node.property.name)return void t.candidates.push({cause:"lengthGetter",path:e})}if(0===t.offset&&a.isSpreadElement()){const n=a.parentPath;if(n.isCallExpression()&&1===n.node.arguments.length)return void t.candidates.push({cause:"argSpread",path:e})}t.references.push(e)}},BindingIdentifier(e,t){l(e,t)&&(t.deopted=!0)}};function u(e,t,n){const r=a.types.numericLiteral(n);let i;const d=e.parent;i=a.types.isNumericLiteral(d.property)?a.types.numericLiteral(d.property.value+n):0===n?d.property:a.types.binaryExpression("+",d.property,a.types.cloneNode(r));const{scope:l,parentPath:c}=e;if(l.isPure(i)){c.replaceWith(s({ARGUMENTS:t,OFFSET:r,INDEX:i}));const e=c,n=e.get("test"),a=n.get("left").evaluate();a.confident&&(!0===a.value?e.replaceWith(l.buildUndefinedNode()):n.replaceWith(n.get("right")))}else{const e=l.generateUidIdentifierBasedOnNode(i);l.push({id:e,kind:"var"}),c.replaceWith(o({ARGUMENTS:t,OFFSET:r,INDEX:i,REF:a.types.cloneNode(e)}))}}function p(e,t,n){n?e.parentPath.replaceWith(d({ARGUMENTS:t,OFFSET:a.types.numericLiteral(n)})):e.replaceWith(t)}}],t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var i=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var a={};return function(){"use strict";n.r(a),n.d(a,{buildTemplateProcessor:function(){return U},loadModule:function(){return F},version:function(){return I},vueVersion:function(){return N}});var e=n(9),t=n(2),r=n(35),i=n(46),s=n(538),o=n(392),d=n(343),l=n.n(d),c=n(547),u=n(202),p=n(376),f=n.n(p),g=n(379),h=n.n(g),m=n(356);const y=T(...Object.keys(Object.assign({},{"@babel/plugin-transform-duplicate-named-capturing-groups-regex":n(393),"@babel/plugin-bugfix-firefox-class-in-computed-class-key":n(394),"@babel/plugin-bugfix-safari-class-field-initializer-scope":n(395),"@babel/plugin-transform-class-static-block":n(396),"@babel/plugin-transform-parameters":n(397)}))),R=!1,b=!0,v=!1,E="0.9.5";function S(e,t,n){return t+"\n"+e}function x(e,t,n,a,r){if(!a)return S(e,t);const s={start:{line:1,column:a}};return r&&(s.end={line:1,column:r}),S((0,i.codeFrameColumns)(n,s,{message:e}),t)}function T(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>e.append(String(t))),new(l())).end()}async function P(e,t,n){let a=!1;const r={preventCache:()=>a=!0};if(void 0===e)return await n(r);const i=T(...t),s=await e.get(i);if(void 0!==s)return JSON.parse(s);const o=await n(r);return!1===a&&await e.set(i,JSON.stringify(o)),o}class w{constructor(e){this.promise=e}}const A=Object.assign({},{"@babel/plugin-transform-duplicate-named-capturing-groups-regex":n(393),"@babel/plugin-bugfix-firefox-class-in-computed-class-key":n(394),"@babel/plugin-bugfix-safari-class-field-initializer-scope":n(395),"@babel/plugin-transform-class-static-block":n(396),"@babel/plugin-transform-parameters":n(397)});async function C(e,n,a,o,d,l){let c,u,p=arguments.length>6&&void 0!==arguments[6]&&arguments[6];try{c=(0,r.parse)(e,{sourceType:"unambiguous",sourceFilename:a.toString(),plugins:[...void 0!==o?o:[]]}),u=c.program.sourceType}catch(t){throw null==l||l("error","parse script",function(e,t,n,a,r){if(!a)return S(e,t);const s={start:{line:a,column:r}};return S((0,i.codeFrameColumns)(n,s,{message:e}),t)}(t.message,a.toString(),e,t.loc.line,t.loc.column+1)),t}var f;f=c,(0,t.traverse)(f,{CallExpression(e){t.types.isImport(e.node.callee)&&e.replaceWith(t.types.callExpression(t.types.identifier("__vsfcl_import__"),e.node.arguments))}});const g=function(e){const n=[];return(0,t.traverse)(e,{ExportAllDeclaration(e){n.push(e.node.source.value)},ImportDeclaration(e){n.push(e.node.source.value)},CallExpression(e){"require"===e.node.callee.name&&1===e.node.arguments.length&&t.types.isStringLiteral(e.node.arguments[0])&&n.push(e.node.arguments[0].value)}}),n}(c),h=await(0,t.transformFromAstAsync)(c,e,{sourceMaps:v,plugins:[..."module"===u?[s.a]:[],...Object.values(A),...void 0!==d?Object.values(d):[]],babelrc:!1,configFile:!1,highlightCode:!1,compact:!p,comments:p,retainLines:p,sourceType:u});if(null===h||null==h.code){const e=`unable to transform script "${a.toString()}"`;throw null==l||l("error",e),new Error(e)}return[g,h.code]}async function _(e,t){const{moduleCache:n,loadModule:a,handleModule:r}=t,{id:i,path:s,getContent:d}=t.getResource(e,t);return i in n?n[i]instanceof w?await n[i].promise:n[i]:(n[i]=new w((async()=>{let e;if(a&&(e=await a(i,t)),void 0===e){const{getContentData:n,type:a}=await d();if(void 0!==r&&(e=await r(a,n,s,t)),void 0===e&&(e=await async function(e,t,n,a){var r,i;switch(e){case".vue":return async function(e,t,n){var a;const r=t.toString(),i={},{delimiters:s,whitespace:d,moduleCache:l,compiledCache:p,getResource:g,addStyle:v,log:E,additionalBabelParserPlugins:w=[],additionalBabelPlugins:A={},customBlockHandler:O,devMode:D=!1,createCJSModule:I,processStyles:j}=n,B=(0,c.c)({source:e,filename:r,needMap:R,compiler:u}),M=void 0!==O?await Promise.all(B.customBlocks.map((e=>O(e,t,n)))):[],L=`data-v-${T(r)}`;B.template&&B.template.lang&&await _({refPath:t,relPath:B.template.lang},n);const F=B.styles.some((e=>e.scoped));F&&Object.assign(i,{_scopeId:L});const U=B.template?{source:B.template.src?await(await g({refPath:t,relPath:B.template.src},n).getContent()).getContentData(!1):B.template.content,filename:r,compiler:u,compilerOptions:{delimiters:s,whitespace:d,outputSourceRange:!0,scopeId:F?L:null,comments:!0},isProduction:b,prettify:D}:null;if(null===(a=B.template)||void 0===a?void 0:a.lang){const e=l[B.template.lang];U.source=await P(p,[N,U.source,B.template.lang],(async t=>{let{preventCache:n}=t;return await new Promise(((t,n)=>{e.render(U.source,U.preprocessOptions,((e,a)=>{e?n(e):t(a)}))}))}))}if(B.script){const e=B.script.src?await(await g({refPath:t,relPath:B.script.src},n).getContent()).getContentData(!1):B.script.content,[a,s]=await P(p,[N,b,D,e,B.script.lang,w,Object.keys(A),y],(async t=>{let{preventCache:n}=t;var a;let i=["jsx"],s={jsx:f(),babelSugarInjectH:h()};return"ts"===(null===(a=B.script)||void 0===a?void 0:a.lang)&&(i=[...i,"typescript"],s=Object.assign(Object.assign({},s),{typescript:o.a})),await C(e,!0,r,[...i,...w],Object.assign(Object.assign({},s),A),E,D)}));await k(t,a,n),Object.assign(i,(q=I(t,s,n).exports,q&&q.__esModule?q:{default:q}).default)}var q;if(null!==B.template){const[a,o]=await P(p,[N,D,U.source,s,d,L,w,Object.keys(A),y],(async n=>{let{preventCache:a}=n;const i=(0,c.b)(U);if(i.code+="\nmodule.exports = { render: render, staticRenderFns: staticRenderFns }",i.errors.length){a();for(let e of i.errors)"object"!=typeof e&&(e={msg:e,start:void 0,end:void 0}),null==E||E("error","SFC template",x(e.msg,r,U.source.trim(),e.start,e.end))}for(let t of i.tips)"object"!=typeof t&&(t={msg:t,start:void 0,end:void 0}),null==E||E("info","SFC template",x(t.msg,r,e,t.start,t.end));return await C(i.code,!0,t,w,A,E,D)}));await k(t,a,n),Object.assign(i,I(t,o,n).exports)}for(const e of B.styles){const a=e.src?await(await g({refPath:t,relPath:e.src},n).getContent()).getContentData(!1):e.content;v(await P(p,[N,a,e.lang,L,e.scoped],(async i=>{let{preventCache:s}=i;const o=void 0!==j?await j(a,e.lang,t,n):a;void 0===o&&s();const d=Object.assign({source:o,filename:r,id:L,scoped:void 0!==e.scoped&&e.scoped,trim:!1},void 0===j?{preprocessLang:e.lang,preprocessOptions:{preprocessOptions:{customRequire:e=>l[e]}}}:{});e.lang&&void 0===m.processors[e.lang]&&(m.processors[e.lang]=await _({refPath:t,relPath:e.lang},n));const u=await(0,c.a)(d);if(u.errors.length){s();for(const e of u.errors)null==E||E("error","SFC style",S(e,r))}return u.code})),e.scoped?L:void 0,t)}return void 0!==O&&await Promise.all(M.map((e=>null==e?void 0:e(i)))),i}(await t(!1),n,a);case".js":return D(await t(!1),!1,n,a);case".mjs":return D(await t(!1),!0,n,a);case".ts":return D(await t(!1),!0,n,Object.assign(Object.assign({},a),{additionalBabelParserPlugins:["typescript",...null!==(r=a.additionalBabelParserPlugins)&&void 0!==r?r:[]],additionalBabelPlugins:Object.assign({typescript:o.a},null!==(i=a.additionalBabelPlugins)&&void 0!==i?i:{})}))}}(a,n,s,t)),void 0===e)throw new TypeError(`Unable to handle ${a} files (${s})`)}return n[i]=e})()),await n[i].promise)}function O(e,t,n){const{moduleCache:a,pathResolve:r,getResource:i}=n,s={exports:{}};return Function("exports","require","module","__filename","__dirname","__vsfcl_import__",t).call(s.exports,s.exports,(function(t){const{id:r}=i({refPath:e,relPath:t},n);if(r in a)return a[r];throw new Error(`require(${JSON.stringify(r)}) failed. module not found in moduleCache`)}),s,e,r({refPath:e,relPath:"."},n),(async function(t){return await _({refPath:e,relPath:t},n)})),s}async function D(e,t,n,a){const{compiledCache:r,additionalBabelParserPlugins:i,additionalBabelPlugins:s,createCJSModule:o,log:d}=a,[l,c]=await P(r,[E,e,n,a.devMode,i||"",s?Object.keys(s):""],(async()=>await C(e,t,n,i,s,d,a.devMode)));return await k(n,l,a),o(n,c,a).exports}async function k(e,t,n){await Promise.all(t.map((t=>_({refPath:e,relPath:t},n))))}const I="0.9.5",N="2.7.16";function j(e){throw new ReferenceError(`${e} is not defined`)}const B=e=>{const t=e.indexOf("?");return-1!==t?e.slice(0,t):e},M=(t,n)=>{let{refPath:a,relPath:r}=t;const{getPathname:i}=n;if(void 0===a)return r;const s=r.toString();return"."!==s[0]?r:e.posix.normalize(e.posix.join(e.posix.dirname(i(a.toString())),s))};function L(t,n){const{pathResolve:a,getPathname:r,getFile:i,log:s}=n,o=a(t,n),d=o.toString();return{id:d,path:o,getContent:async()=>{const t=await i(o);return"string"==typeof t||t instanceof ArrayBuffer?{type:e.posix.extname(r(d)),getContentData:async e=>(t instanceof ArrayBuffer!==e&&(null==s||s("warn",`unexpected data type. ${e?"binary":"string"} is expected for "${o}"`)),t)}:(t||null==s||s("error",`There is no file avaialable such as "${o}"`),{type:void 0!==t.type?t.type:e.posix.extname(r(d)),getContentData:t.getContentData})}}}async function F(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j("options");var n;const{moduleCache:a=j("options.moduleCache"),getFile:r=j("options.getFile()"),addStyle:i=j("options.addStyle()"),pathResolve:s=M,getResource:o=L,createCJSModule:d=O,getPathname:l=B}=t;a instanceof Object&&Object.setPrototypeOf(a,null);const c=Object.assign({moduleCache:a,pathResolve:s,getResource:o,createCJSModule:d,getPathname:l},t);return t.devMode&&void 0===t.compiledCache&&(null===(n=t.log)||void 0===n||n.call(t,"info","options.compiledCache is not defined, performance will be affected")),await _({refPath:void 0,relPath:e},c)}function U(e){return{render:(t,n,a)=>{try{const r=e(t,n);"string"==typeof r?a(null,r):(r.then((e=>{a(null,e)})),r.catch((e=>{a(e,null)})))}catch(e){a(e,null)}}}}}(),a}()}));
|
|
260
|
+
}`)}else y.get("body").unshiftContainer("body",f);return!0};var a=n(2),r=n(390);const i=a.template.statement("\n let VARIABLE_NAME =\n arguments.length > ARGUMENT_KEY && arguments[ARGUMENT_KEY] !== undefined ?\n arguments[ARGUMENT_KEY]\n :\n DEFAULT_VALUE;\n"),s=a.template.statement("\n if (ASSIGNMENT_IDENTIFIER === UNDEFINED) {\n ASSIGNMENT_IDENTIFIER = DEFAULT_VALUE;\n }\n"),o=a.template.statement("\n let ASSIGNMENT_IDENTIFIER = PARAMETER_NAME === UNDEFINED ? DEFAULT_VALUE : PARAMETER_NAME ;\n"),d=a.template.statement("\n let $0 = arguments.length > $1 ? arguments[$1] : undefined;\n")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const{node:t,scope:n}=e;if(!function(e){const t=e.params.length;return t>0&&a.types.isRestElement(e.params[t-1])}(t))return!1;const s=e.get(`params.${t.params.length-1}.argument`);if(!s.isIdentifier()){const t=new Set;(0,r.collectShadowedParamsNames)(s,e.scope,t);let i=t.size>0;if(!i){const e={needsOuterBinding:!1,scope:n};s.traverse(r.iifeVisitor,e),i=e.needsOuterBinding}i&&(e.ensureBlock(),e.set("body",a.types.blockStatement([(0,r.buildScopeIIFE)(t,e.node.body)])))}let o=s.node;if(t.params.pop(),a.types.isPattern(o)){const r=o;o=n.generateUidIdentifier("ref");const i=a.types.variableDeclaration("let",[a.types.variableDeclarator(r,o)]);e.ensureBlock(),t.body.body.unshift(i)}else"arguments"===o.name&&n.rename(o.name);const d=a.types.identifier("arguments"),l=function(e){let t=e.params.length;return t>0&&a.types.isIdentifier(e.params[0],{name:"this"})&&(t-=1),t}(t),f={references:[],offset:l,argumentsNode:d,outerBinding:n.getBindingIdentifier(o.name),candidates:[],name:o.name,deopted:!1};if(e.traverse(c,f),!f.deopted&&!f.references.length){for(const{path:e,cause:t}of f.candidates){const n=a.types.cloneNode(d);switch(t){case"indexGetter":u(e,n,f.offset);break;case"lengthGetter":p(e,n,f.offset);break;default:e.replaceWith(n)}}return!0}f.references.push(...f.candidates.map((e=>{let{path:t}=e;return t})));const g=a.types.numericLiteral(l),h=n.generateUidIdentifier("key"),m=n.generateUidIdentifier("len");let y,R;l?(y=a.types.binaryExpression("-",a.types.cloneNode(h),a.types.cloneNode(g)),R=a.types.conditionalExpression(a.types.binaryExpression(">",a.types.cloneNode(m),a.types.cloneNode(g)),a.types.binaryExpression("-",a.types.cloneNode(m),a.types.cloneNode(g)),a.types.numericLiteral(0))):(y=a.types.identifier(h.name),R=a.types.identifier(m.name));const b=i({ARGUMENTS:d,ARRAY_KEY:y,ARRAY_LEN:R,START:g,ARRAY:o,KEY:h,LEN:m});if(f.deopted)t.body.body.unshift(b);else{let t=e.getEarliestCommonAncestorFrom(f.references).getStatementParent();t.findParent((e=>{if(!e.isLoop())return e.isFunction();t=e})),t.insertBefore(b)}return!0};var a=n(2),r=n(390);const i=a.template.statement("\n for (var LEN = ARGUMENTS.length,\n ARRAY = new Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n"),s=a.template.expression("\n (INDEX < OFFSET || ARGUMENTS.length <= INDEX) ? undefined : ARGUMENTS[INDEX]\n"),o=a.template.expression("\n REF = INDEX, (REF < OFFSET || ARGUMENTS.length <= REF) ? undefined : ARGUMENTS[REF]\n"),d=a.template.expression("\n ARGUMENTS.length <= OFFSET ? 0 : ARGUMENTS.length - OFFSET\n");function l(e,t){return e.node.name===t.name&&e.scope.bindingIdentifierEquals(t.name,t.outerBinding)}const c={Scope(e,t){e.scope.bindingIdentifierEquals(t.name,t.outerBinding)||e.skip()},Flow(e){e.isTypeCastExpression()||e.skip()},Function(e,t){const n=t.noOptimise;t.noOptimise=!0,e.traverse(c,t),t.noOptimise=n,e.skip()},ReferencedIdentifier(e,t){const{node:n}=e;if("arguments"===n.name&&(t.deopted=!0),l(e,t))if(t.noOptimise)t.deopted=!0;else{const{parentPath:a}=e;if("params"===a.listKey&&a.key<t.offset)return;if(a.isMemberExpression({object:n})){const n=a.parentPath;if(!t.deopted&&!(n.isAssignmentExpression()&&a.node===n.node.left||n.isLVal()||n.isForXStatement()||n.isUpdateExpression()||n.isUnaryExpression({operator:"delete"})||(n.isCallExpression()||n.isNewExpression())&&a.node===n.node.callee))if(a.node.computed){if(a.get("property").isBaseType("number"))return void t.candidates.push({cause:"indexGetter",path:e})}else if("length"===a.node.property.name)return void t.candidates.push({cause:"lengthGetter",path:e})}if(0===t.offset&&a.isSpreadElement()){const n=a.parentPath;if(n.isCallExpression()&&1===n.node.arguments.length)return void t.candidates.push({cause:"argSpread",path:e})}t.references.push(e)}},BindingIdentifier(e,t){l(e,t)&&(t.deopted=!0)}};function u(e,t,n){const r=a.types.numericLiteral(n);let i;const d=e.parent;i=a.types.isNumericLiteral(d.property)?a.types.numericLiteral(d.property.value+n):0===n?d.property:a.types.binaryExpression("+",d.property,a.types.cloneNode(r));const{scope:l,parentPath:c}=e;if(l.isPure(i)){c.replaceWith(s({ARGUMENTS:t,OFFSET:r,INDEX:i}));const e=c,n=e.get("test"),a=n.get("left").evaluate();a.confident&&(!0===a.value?e.replaceWith(l.buildUndefinedNode()):n.replaceWith(n.get("right")))}else{const e=l.generateUidIdentifierBasedOnNode(i);l.push({id:e,kind:"var"}),c.replaceWith(o({ARGUMENTS:t,OFFSET:r,INDEX:i,REF:a.types.cloneNode(e)}))}}function p(e,t,n){n?e.parentPath.replaceWith(d({ARGUMENTS:t,OFFSET:a.types.numericLiteral(n)})):e.replaceWith(t)}}],t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var i=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var a={};return function(){"use strict";n.r(a),n.d(a,{buildTemplateProcessor:function(){return U},loadModule:function(){return F},version:function(){return I},vueVersion:function(){return N}});var e=n(9),t=n(2),r=n(35),i=n(46),s=n(538),o=n(392),d=n(343),l=n.n(d),c=n(547),u=n(202),p=n(376),f=n.n(p),g=n(379),h=n.n(g),m=n(356);const y=T(...Object.keys(Object.assign({},{"@babel/plugin-transform-duplicate-named-capturing-groups-regex":n(393),"@babel/plugin-bugfix-firefox-class-in-computed-class-key":n(394),"@babel/plugin-bugfix-safari-class-field-initializer-scope":n(395),"@babel/plugin-transform-class-static-block":n(396),"@babel/plugin-transform-parameters":n(397)}))),R=!1,b=!0,v=!1,E="0.9.5";function S(e,t,n){return t+"\n"+e}function x(e,t,n,a,r){if(!a)return S(e,t);const s={start:{line:1,column:a}};return r&&(s.end={line:1,column:r}),S((0,i.codeFrameColumns)(n,s,{message:e}),t)}function T(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(((e,t)=>e.append(String(t))),new(l())).end()}async function P(e,t,n){let a=!1;const r={preventCache:()=>a=!0};if(void 0===e)return await n(r);const i=T(...t),s=await e.get(i);if(void 0!==s)return JSON.parse(s);const o=await n(r);return!1===a&&await e.set(i,JSON.stringify(o)),o}class w{constructor(e){this.promise=e}}const A=Object.assign({},{"@babel/plugin-transform-duplicate-named-capturing-groups-regex":n(393),"@babel/plugin-bugfix-firefox-class-in-computed-class-key":n(394),"@babel/plugin-bugfix-safari-class-field-initializer-scope":n(395),"@babel/plugin-transform-class-static-block":n(396),"@babel/plugin-transform-parameters":n(397)});async function C(e,n,a,o,d,l){let c,u,p=arguments.length>6&&void 0!==arguments[6]&&arguments[6];try{c=(0,r.parse)(e,{sourceType:"unambiguous",sourceFilename:a.toString(),plugins:[...void 0!==o?o:[]]}),u=c.program.sourceType}catch(t){throw null==l||l("error","parse script",function(e,t,n,a,r){if(!a)return S(e,t);const s={start:{line:a,column:r}};return S((0,i.codeFrameColumns)(n,s,{message:e}),t)}(t.message,a.toString(),e,t.loc.line,t.loc.column+1)),t}var f;f=c,(0,t.traverse)(f,{CallExpression(e){t.types.isImport(e.node.callee)&&e.replaceWith(t.types.callExpression(t.types.identifier("__vsfcl_import__"),e.node.arguments))}});const g=function(e){const n=[];return(0,t.traverse)(e,{ExportAllDeclaration(e){n.push(e.node.source.value)},ImportDeclaration(e){n.push(e.node.source.value)},CallExpression(e){"require"===e.node.callee.name&&1===e.node.arguments.length&&t.types.isStringLiteral(e.node.arguments[0])&&n.push(e.node.arguments[0].value)}}),n}(c),h=await(0,t.transformFromAstAsync)(c,e,{sourceMaps:v,plugins:[..."module"===u?[s.a]:[],...Object.values(A),...void 0!==d?Object.values(d):[]],babelrc:!1,configFile:!1,highlightCode:!1,compact:!p,comments:p,retainLines:p,sourceType:u});if(null===h||null==h.code){const e=`unable to transform script "${a.toString()}"`;throw null==l||l("error",e),new Error(e)}return[g,h.code]}async function _(e,t){const{moduleCache:n,loadModule:a,handleModule:r}=t,{id:i,path:s,getContent:d}=t.getResource(e,t);return i in n?n[i]instanceof w?await n[i].promise:n[i]:(n[i]=new w((async()=>{let e;if(a&&(e=await a(i,t)),void 0===e){const{getContentData:n,type:a}=await d();if(void 0!==r&&(e=await r(a,n,s,t)),void 0===e&&(e=await async function(e,t,n,a){var r,i;switch(e){case".vue":return async function(e,t,n){var a;const r=t.toString(),i={},{delimiters:s,whitespace:d,moduleCache:l,compiledCache:p,getResource:g,addStyle:v,log:E,additionalBabelParserPlugins:w=[],additionalBabelPlugins:A={},customBlockHandler:O,devMode:D=!1,createCJSModule:I,processStyles:j}=n,B=(0,c.c)({source:e,filename:r,needMap:R,compiler:u}),M=void 0!==O?await Promise.all(B.customBlocks.map((e=>O(e,t,n)))):[],L=`data-v-${T(r)}`;B.template&&B.template.lang&&await _({refPath:t,relPath:B.template.lang},n);const F=B.styles.some((e=>e.scoped));F&&Object.assign(i,{_scopeId:L});const U=B.template?{source:B.template.src?await(await g({refPath:t,relPath:B.template.src},n).getContent()).getContentData(!1):B.template.content,filename:r,compiler:u,compilerOptions:{delimiters:s,whitespace:d,outputSourceRange:!0,scopeId:F?L:null,comments:!0},isProduction:b,prettify:D}:null;if(null===(a=B.template)||void 0===a?void 0:a.lang){const e=l[B.template.lang];U.source=await P(p,[N,U.source,B.template.lang],(async t=>{let{preventCache:n}=t;return await new Promise(((t,n)=>{e.render(U.source,U.preprocessOptions,((e,a)=>{e?n(e):t(a)}))}))}))}if(B.script){const e=B.script.src?await(await g({refPath:t,relPath:B.script.src},n).getContent()).getContentData(!1):B.script.content,[a,s]=await P(p,[N,b,D,e,B.script.lang,w,Object.keys(A),y],(async t=>{let{preventCache:n}=t;var a;let i=["jsx"],s={jsx:f(),babelSugarInjectH:h()};return"ts"===(null===(a=B.script)||void 0===a?void 0:a.lang)&&(i=[...i,"typescript"],s=Object.assign(Object.assign({},s),{typescript:o.a})),await C(e,!0,r,[...i,...w],Object.assign(Object.assign({},s),A),E,D)}));await k(t,a,n),Object.assign(i,(q=I(t,s,n).exports,q&&q.__esModule?q:{default:q}).default)}var q;if(null!==B.template){const[a,o]=await P(p,[N,D,U.source,s,d,L,w,Object.keys(A),y],(async n=>{let{preventCache:a}=n;const i=(0,c.b)(U);if(i.code+="\nmodule.exports = { render: render, staticRenderFns: staticRenderFns }",i.errors.length){a();for(let e of i.errors)"object"!=typeof e&&(e={msg:e,start:void 0,end:void 0}),null==E||E("error","SFC template",x(e.msg,r,U.source.trim(),e.start,e.end))}for(let t of i.tips)"object"!=typeof t&&(t={msg:t,start:void 0,end:void 0}),null==E||E("info","SFC template",x(t.msg,r,e,t.start,t.end));return await C(i.code,!0,t,w,A,E,D)}));await k(t,a,n),Object.assign(i,I(t,o,n).exports)}for(const e of B.styles){const a=e.src?await(await g({refPath:t,relPath:e.src},n).getContent()).getContentData(!1):e.content,i=await P(p,[N,a,e.lang,L,e.scoped],(async i=>{let{preventCache:s}=i;const o=void 0!==j?await j(a,e.lang,t,n):a;void 0===o&&s();const d=Object.assign({source:o,filename:r,id:L,scoped:void 0!==e.scoped&&e.scoped,trim:!1},void 0===j?{preprocessLang:e.lang,preprocessOptions:{preprocessOptions:{customRequire:e=>l[e]}}}:{});e.lang&&void 0===m.processors[e.lang]&&(m.processors[e.lang]=await _({refPath:t,relPath:e.lang},n));const u=await(0,c.a)(d);if(u.errors.length){s();for(const e of u.errors)null==E||E("error","SFC style",S(e,r))}return u.code}));await v(i,e.scoped?L:void 0,t)}return void 0!==O&&await Promise.all(M.map((e=>null==e?void 0:e(i)))),i}(await t(!1),n,a);case".js":return D(await t(!1),!1,n,a);case".mjs":return D(await t(!1),!0,n,a);case".ts":return D(await t(!1),!0,n,Object.assign(Object.assign({},a),{additionalBabelParserPlugins:["typescript",...null!==(r=a.additionalBabelParserPlugins)&&void 0!==r?r:[]],additionalBabelPlugins:Object.assign({typescript:o.a},null!==(i=a.additionalBabelPlugins)&&void 0!==i?i:{})}))}}(a,n,s,t)),void 0===e)throw new TypeError(`Unable to handle ${a} files (${s})`)}return n[i]=e})()),await n[i].promise)}function O(e,t,n){const{moduleCache:a,pathResolve:r,getResource:i}=n,s={exports:{}};return Function("exports","require","module","__filename","__dirname","__vsfcl_import__",t).call(s.exports,s.exports,(function(t){const{id:r}=i({refPath:e,relPath:t},n);if(r in a)return a[r];throw new Error(`require(${JSON.stringify(r)}) failed. module not found in moduleCache`)}),s,e,r({refPath:e,relPath:"."},n),(async function(t){return await _({refPath:e,relPath:t},n)})),s}async function D(e,t,n,a){const{compiledCache:r,additionalBabelParserPlugins:i,additionalBabelPlugins:s,createCJSModule:o,log:d}=a,[l,c]=await P(r,[E,e,n,a.devMode,i||"",s?Object.keys(s):""],(async()=>await C(e,t,n,i,s,d,a.devMode)));return await k(n,l,a),o(n,c,a).exports}async function k(e,t,n){await Promise.all(t.map((t=>_({refPath:e,relPath:t},n))))}const I="0.9.5",N="2.7.16";function j(e){throw new ReferenceError(`${e} is not defined`)}const B=e=>{const t=e.indexOf("?");return-1!==t?e.slice(0,t):e},M=(t,n)=>{let{refPath:a,relPath:r}=t;const{getPathname:i}=n;if(void 0===a)return r;const s=r.toString();return"."!==s[0]?r:e.posix.normalize(e.posix.join(e.posix.dirname(i(a.toString())),s))};function L(t,n){const{pathResolve:a,getPathname:r,getFile:i,log:s}=n,o=a(t,n),d=o.toString();return{id:d,path:o,getContent:async()=>{const t=await i(o);return"string"==typeof t||t instanceof ArrayBuffer?{type:e.posix.extname(r(d)),getContentData:async e=>(t instanceof ArrayBuffer!==e&&(null==s||s("warn",`unexpected data type. ${e?"binary":"string"} is expected for "${o}"`)),t)}:(t||null==s||s("error",`There is no file avaialable such as "${o}"`),{type:void 0!==t.type?t.type:e.posix.extname(r(d)),getContentData:t.getContentData})}}}async function F(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j("options");var n;const{moduleCache:a=j("options.moduleCache"),getFile:r=j("options.getFile()"),addStyle:i=j("options.addStyle()"),pathResolve:s=M,getResource:o=L,createCJSModule:d=O,getPathname:l=B}=t;a instanceof Object&&Object.setPrototypeOf(a,null);const c=Object.assign({moduleCache:a,pathResolve:s,getResource:o,createCJSModule:d,getPathname:l},t);return t.devMode&&void 0===t.compiledCache&&(null===(n=t.log)||void 0===n||n.call(t,"info","options.compiledCache is not defined, performance will be affected")),await _({refPath:void 0,relPath:e},c)}function U(e){return{render:(t,n,a)=>{try{const r=e(t,n);"string"==typeof r?a(null,r):(r.then((e=>{a(null,e)})),r.catch((e=>{a(e,null)})))}catch(e){a(e,null)}}}}}(),a}()}));
|
|
261
261
|
//# sourceMappingURL=vue2-sfc-loader.js.map
|