"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),F={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},G=r.createElementVNode("path",{fill:"currentColor",d:"m23 12l-7.071 7.071l-1.414-1.414L20.172 12l-5.657-5.657l1.414-1.414zM3.828 12l5.657 5.657l-1.414 1.414L1 12l7.071-7.071l1.414 1.414z"},null,-1),Q=[G];function J(n,e){return r.openBlock(),r.createElementBlock("svg",F,[...Q])}const X={name:"ri-code-line",render:J},Y={viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Z=r.createElementVNode("path",{fill:"currentColor",d:"M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1.001 1.001 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z"},null,-1),ee=[Z];function te(n,e){return r.openBlock(),r.createElementBlock("svg",Y,[...ee])}const ne={name:"ri-file-copy-line",render:te};function re(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var z={exports:{}},p=z.exports={},w,b;function $(){throw new Error("setTimeout has not been defined")}function L(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?w=setTimeout:w=$}catch{w=$}try{typeof clearTimeout=="function"?b=clearTimeout:b=L}catch{b=L}})();function R(n){if(w===setTimeout)return setTimeout(n,0);if((w===$||!w)&&setTimeout)return w=setTimeout,setTimeout(n,0);try{return w(n,0)}catch{try{return w.call(null,n,0)}catch{return w.call(this,n,0)}}}function oe(n){if(b===clearTimeout)return clearTimeout(n);if((b===L||!b)&&clearTimeout)return b=clearTimeout,clearTimeout(n);try{return b(n)}catch{try{return b.call(null,n)}catch{return b.call(this,n)}}}var C=[],E=!1,S,V=-1;function ie(){!E||!S||(E=!1,S.length?C=S.concat(C):V=-1,C.length&&j())}function j(){if(!E){var n=R(ie);E=!0;for(var e=C.length;e;){for(S=C,C=[];++V1)for(var t=1;tae.call(n)==="[object Object]",ue=()=>{};function fe(n){let e;function t(){return e||(e=n()),e}return t.reset=async()=>{const o=e;e=void 0,o&&await o},t}function de(n,e,t={}){const{immediate:o=!0}=t,s=r.ref(!1);let l=null;function i(){l&&(clearTimeout(l),l=null)}function a(){s.value=!1,i()}function c(...d){i(),s.value=!0,l=setTimeout(()=>{s.value=!1,l=null,n(...d)},k(e))}return o&&(s.value=!0,B&&c()),q(a),{isPending:r.readonly(s),start:c,stop:a}}function me(n=!1,e={}){const{truthyValue:t=!0,falsyValue:o=!1}=e,s=r.isRef(n),l=r.ref(n);function i(a){if(arguments.length)return l.value=a,l.value;{const c=k(t);return l.value=l.value===c?k(o):c,l.value}}return s?i:[l,i]}function ve(n){var e;const t=k(n);return(e=t==null?void 0:t.$el)!=null?e:t}const pe=B?window:void 0,O=B?window.navigator:void 0;function H(...n){let e,t,o,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,o,s]=n,e=pe):[e,t,o,s]=n,!e)return ue;Array.isArray(t)||(t=[t]),Array.isArray(o)||(o=[o]);const l=[],i=()=>{l.forEach(f=>f()),l.length=0},a=(f,u,h,m)=>(f.addEventListener(u,h,m),()=>f.removeEventListener(u,h,m)),c=r.watch(()=>[ve(e),k(s)],([f,u])=>{if(i(),!f)return;const h=ce(u)?{...u}:u;l.push(...t.flatMap(m=>o.map(v=>a(f,m,v,h))))},{immediate:!0,flush:"post"}),d=()=>{c(),i()};return q(d),d}function ge(){const n=r.ref(!1);return r.getCurrentInstance()&&r.onMounted(()=>{n.value=!0}),n}function K(n){const e=ge();return r.computed(()=>(e.value,!!n()))}function D(n,e={}){const{controls:t=!1,navigator:o=O}=e,s=K(()=>o&&"permissions"in o);let l;const i=typeof n=="string"?{name:n}:n,a=r.ref(),c=()=>{l&&(a.value=l.state)},d=fe(async()=>{if(s.value){if(!l)try{l=await o.permissions.query(i),H(l,"change",c),c()}catch{a.value="prompt"}return l}});return d(),t?{state:a,isSupported:s,query:d}:a}function he(n={}){const{navigator:e=O,read:t=!1,source:o,copiedDuring:s=1500,legacy:l=!1}=n,i=K(()=>e&&"clipboard"in e),a=D("clipboard-read"),c=D("clipboard-write"),d=r.computed(()=>i.value||l),f=r.ref(""),u=r.ref(!1),h=de(()=>u.value=!1,s);function m(){i.value&&a.value!=="denied"?e.clipboard.readText().then(g=>{f.value=g}):f.value=M()}d.value&&t&&H(["copy","cut"],m);async function v(g=k(o)){d.value&&g!=null&&(i.value&&c.value!=="denied"?await e.clipboard.writeText(g):N(g),f.value=g,u.value=!0,h.start())}function N(g){const _=document.createElement("textarea");_.value=g??"",_.style.position="absolute",_.style.opacity="0",document.body.appendChild(_),_.select(),document.execCommand("copy"),_.remove()}function M(){var g,_,x;return(x=(_=(g=document==null?void 0:document.getSelection)==null?void 0:g.call(document))==null?void 0:_.toString())!=null?x:""}return{isSupported:d,text:f,copied:u,copy:v}}/*! Element Plus Icons Vue v2.3.1 */var _e=r.defineComponent({name:"CaretTop",__name:"caret-top",setup(n){return(e,t)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),ye=_e;const we={class:"mt-example-showcase"},be=r.defineComponent({__name:"vp-example",props:{file:{type:String,required:!0},demo:{type:Object,required:!0}},setup(n){return(e,t)=>(r.openBlock(),r.createElementBlock("div",we,[n.demo?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.demo),r.normalizeProps(r.mergeProps({key:0},e.$attrs)),null,16)):r.createCommentVNode("",!0)]))}}),Ce={class:"example-source-wrapper"},Te=["innerHTML"],Se=r.defineComponent({__name:"vp-source-code",props:{source:{type:String,required:!0}},setup(n){const e=n,t=r.computed(()=>decodeURIComponent(e.source));return(o,s)=>(r.openBlock(),r.createElementBlock("div",Ce,[r.createElementVNode("div",{class:"example-source language-vue",innerHTML:t.value},null,8,Te)]))}}),Ee=["innerHTML"],Ae={class:"mt-example"},ke={class:"op-btns"},xe=["aria-label"],Ve=r.createElementVNode("span",null,"隐藏源代码",-1),Ne=r.defineComponent({__name:"vp-demo",props:{demos:{},source:{},path:{},rawSource:{},description:{}},setup(n){const e=n,t=r.getCurrentInstance(),{copy:o,isSupported:s}=he({source:decodeURIComponent(e.rawSource),read:!1}),[l,i]=me(),a=r.ref(),c=e.demos,d=r.computed(()=>{const m={};return Object.keys(c).forEach(v=>{m[v.replace("../../examples/","").replace(".vue","")]=c[v].default}),m}),f=r.computed(()=>decodeURIComponent(e.description));function u(m){var v;["Enter","Space"].includes(m.code)&&(m.preventDefault(),i(!1),(v=a.value)==null||v.focus())}async function h(){const{$message:m}=t.appContext.config.globalProperties;s||m.error("复制失败");try{await o(),m.success("已复制")}catch(v){m.error(v.message)}}return(m,v)=>{const N=r.resolveComponent("ElDivider"),M=ne,g=r.resolveComponent("ElIcon"),_=r.resolveComponent("ElTooltip"),x=X,W=r.resolveComponent("ElCollapseTransition");return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("p",{text:"sm",innerHTML:f.value},null,8,Ee),r.createElementVNode("div",Ae,[r.createVNode(be,{file:m.path,demo:d.value[m.path]},null,8,["file","demo"]),r.createVNode(N,{class:"m-0"}),r.createElementVNode("div",ke,[r.createVNode(_,{content:"复制代码","show-arrow":!1,trigger:["hover","focus"],"trigger-keys":[]},{default:r.withCtx(()=>[r.createVNode(g,{size:16,"aria-label":"复制代码",class:"op-btn",tabindex:"0",role:"button",onClick:h,onKeydown:[r.withKeys(r.withModifiers(h,["prevent"]),["enter"]),r.withKeys(r.withModifiers(h,["prevent"]),["space"])]},{default:r.withCtx(()=>[r.createVNode(M)]),_:1},8,["onKeydown"])]),_:1}),r.createVNode(_,{content:"查看源码","show-arrow":!1,trigger:["hover","focus"],"trigger-keys":[]},{default:r.withCtx(()=>[r.createElementVNode("button",{ref_key:"sourceCodeRef",ref:a,"aria-label":r.unref(l)?"隐藏源代码":"查看源代码",class:"reset-btn el-icon op-btn",onClick:v[0]||(v[0]=U=>r.unref(i)())},[r.createVNode(g,{size:16},{default:r.withCtx(()=>[r.createVNode(x)]),_:1})],8,xe)]),_:1})]),r.createVNode(W,null,{default:r.withCtx(()=>[r.withDirectives(r.createVNode(Se,{source:m.source},null,8,["source"]),[[r.vShow,r.unref(l)]])]),_:1}),r.createVNode(r.Transition,{name:"el-fade-in-linear"},{default:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",{class:"mt-example-float-control",tabindex:"0",role:"button",onClick:v[1]||(v[1]=U=>r.unref(i)(!1)),onKeydown:u},[r.createVNode(g,{size:16},{default:r.withCtx(()=>[r.createVNode(r.unref(ye))]),_:1}),Ve],544),[[r.vShow,r.unref(l)]])]),_:1})])],64)}}}),Me=[["Demo",Ne]];function y(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function P(n,e){for(var t="",o=0,s=-1,l=0,i,a=0;a<=n.length;++a){if(a2){var c=t.lastIndexOf("/");if(c!==t.length-1){c===-1?(t="",o=0):(t=t.slice(0,c),o=t.length-1-t.lastIndexOf("/")),s=a,l=0;continue}}else if(t.length===2||t.length===1){t="",o=0,s=a,l=0;continue}}e&&(t.length>0?t+="/..":t="..",o=2)}else t.length>0?t+="/"+n.slice(s+1,a):t=n.slice(s+1,a),o=a-s-1;s=a,l=0}else i===46&&l!==-1?++l:l=-1}return t}function $e(n,e){var t=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+o:t+n+o:o}var A={resolve:function(){for(var e="",t=!1,o,s=arguments.length-1;s>=-1&&!t;s--){var l;s>=0?l=arguments[s]:(o===void 0&&(o=le.cwd()),l=o),y(l),l.length!==0&&(e=l+"/"+e,t=l.charCodeAt(0)===47)}return e=P(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(y(e),e.length===0)return".";var t=e.charCodeAt(0)===47,o=e.charCodeAt(e.length-1)===47;return e=P(e,!t),e.length===0&&!t&&(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return y(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t0&&(e===void 0?e=o:e+="/"+o)}return e===void 0?".":A.normalize(e)},relative:function(e,t){if(y(e),y(t),e===t||(e=A.resolve(e),t=A.resolve(t),e===t))return"";for(var o=1;od){if(t.charCodeAt(i+u)===47)return t.slice(i+u+1);if(u===0)return t.slice(i+u)}else l>d&&(e.charCodeAt(o+u)===47?f=u:u===0&&(f=0));break}var h=e.charCodeAt(o+u),m=t.charCodeAt(i+u);if(h!==m)break;h===47&&(f=u)}var v="";for(u=o+f+1;u<=s;++u)(u===s||e.charCodeAt(u)===47)&&(v.length===0?v+="..":v+="/..");return v.length>0?v+t.slice(i+f):(i+=f,t.charCodeAt(i)===47&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(y(e),e.length===0)return".";for(var t=e.charCodeAt(0),o=t===47,s=-1,l=!0,i=e.length-1;i>=1;--i)if(t=e.charCodeAt(i),t===47){if(!l){s=i;break}}else l=!1;return s===-1?o?"/":".":o&&s===1?"//":e.slice(0,s)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');y(e);var o=0,s=-1,l=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,c=-1;for(i=e.length-1;i>=0;--i){var d=e.charCodeAt(i);if(d===47){if(!l){o=i+1;break}}else c===-1&&(l=!1,c=i+1),a>=0&&(d===t.charCodeAt(a)?--a===-1&&(s=i):(a=-1,s=c))}return o===s?s=c:s===-1&&(s=e.length),e.slice(o,s)}else{for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===47){if(!l){o=i+1;break}}else s===-1&&(l=!1,s=i+1);return s===-1?"":e.slice(o,s)}},extname:function(e){y(e);for(var t=-1,o=0,s=-1,l=!0,i=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(c===47){if(!l){o=a+1;break}continue}s===-1&&(l=!1,s=a+1),c===46?t===-1?t=a:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||s===-1||i===0||i===1&&t===s-1&&t===o+1?"":e.slice(t,s)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return $e("/",e)},parse:function(e){y(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var o=e.charCodeAt(0),s=o===47,l;s?(t.root="/",l=1):l=0;for(var i=-1,a=0,c=-1,d=!0,f=e.length-1,u=0;f>=l;--f){if(o=e.charCodeAt(f),o===47){if(!d){a=f+1;break}continue}c===-1&&(d=!1,c=f+1),o===46?i===-1?i=f:u!==1&&(u=1):i!==-1&&(u=-1)}return i===-1||c===-1||u===0||u===1&&i===c-1&&i===a+1?c!==-1&&(a===0&&s?t.base=t.name=e.slice(1,c):t.base=t.name=e.slice(a,c)):(a===0&&s?(t.name=e.slice(1,i),t.base=e.slice(1,c)):(t.name=e.slice(a,i),t.base=e.slice(a,c)),t.ext=e.slice(i,c)),a>0?t.dir=e.slice(0,a-1):s&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};A.posix=A;var Le=A;function Be(){return{name:"md-demo-transform",enforce:"pre",async buildStart(){},async transform(n,e){if(!e.endsWith(".md"))return;const t=Le.basename(e,".md"),o={headers:[],footers:[],scriptSetups:[`const demos = import.meta.glob('../../examples/${t}/*.vue', { eager: true })`]};return De(n,[Pe(o.scriptSetups),...o.headers],o.footers)}}}function De(n,e,t){const o=n.indexOf(`--- `),s=n.search(/\n#{1,6}\s.+/),l=s<0?o<0?0:o+4:s;return e.length>0&&(n=n.slice(0,l)+e.join(` `)+n.slice(l)),n+=t.join(` `),`${n} `}function Pe(n){return`